In C, how to disable optimization in the makefile? -


i have following makefile structure

# default optimization level o ?= 2  tests = $(patsubst %.c,%,$(sort $(wildcard test[0-9][0-9][0-9].c)))  all: $(tests) hhtest  -include build/rules.mk libs = -lm  %.o: %.c $(buildstamp) $(call run,$(cc) $(cppflags) $(cflags) -o$(o) $(depcflags) -o $@ -c,compile,$<)  test%: test%.o m61.o $(call run,$(cc) $(cflags) -o $@ $^ $(ldflags) $(libs),link $@)  hhtest: hhtest.o m61.o $(call run,$(cc) $(cflags) -o $@ $^ $(ldflags) $(libs),link $@) 

and when debugging have <optimized out> value:

print ptr <optimized out> 

how disable issue?

your code seems structured in such way (i.e. pass -o$(o) cc) should able say:

o ?= 0 

instead of o ?= 2.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -