Browse Source

don't exclude other settings when giving make options

Now `make LTC_DEBUG=1` builds a full-speed library but with debug infos.

One has to do `make LTC_DEBUG=1 IGNORE_SPEED=1` now to have the same
results as before.

This was done since
1. it makes sense to enable optimization also when adding debug infos
2. clang+valgrind creates errors if there's no optimization enabled
   (c.f. #497)
Steffen Jaeckel 6 years ago
parent
commit
da9f55231f
1 changed files with 7 additions and 9 deletions
  1. 7 9
      makefile_include.mk

+ 7 - 9
makefile_include.mk

@@ -96,17 +96,13 @@ ifdef LTC_DEBUG
 $(info Debug build)
 # compile for DEBUGGING (required for ccmalloc checking!!!)
 LTC_CFLAGS += -g3 -DLTC_NO_ASM
+
 ifneq (,$(strip $(LTC_DEBUG)))
 LTC_CFLAGS += -DLTC_TEST_DBG=$(LTC_DEBUG)
 else
 LTC_CFLAGS += -DLTC_TEST_DBG
 endif
-else
-
-ifdef LTC_SMALL
-# optimize for SIZE
-LTC_CFLAGS += -Os -DLTC_SMALL_CODE
-else
+endif # LTC_DEBUG
 
 ifndef IGNORE_SPEED
 # optimize for SPEED
@@ -114,10 +110,12 @@ LTC_CFLAGS += -O3 -funroll-loops
 
 # add -fomit-frame-pointer.  hinders debugging!
 LTC_CFLAGS += -fomit-frame-pointer
-endif
+endif # IGNORE_SPEED
 
-endif # COMPILE_SMALL
-endif # COMPILE_DEBUG
+ifdef LTC_SMALL
+# optimize for SIZE
+LTC_CFLAGS += -Os -DLTC_SMALL_CODE
+endif # LTC_SMALL
 
 
 ifneq ($(findstring clang,$(CC)),)