Skip to content

Commit da9f552

Browse files
committed
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)
1 parent d4b8d9b commit da9f552

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

makefile_include.mk

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,28 +96,26 @@ ifdef LTC_DEBUG
9696
$(info Debug build)
9797
# compile for DEBUGGING (required for ccmalloc checking!!!)
9898
LTC_CFLAGS += -g3 -DLTC_NO_ASM
99+
99100
ifneq (,$(strip $(LTC_DEBUG)))
100101
LTC_CFLAGS += -DLTC_TEST_DBG=$(LTC_DEBUG)
101102
else
102103
LTC_CFLAGS += -DLTC_TEST_DBG
103104
endif
104-
else
105-
106-
ifdef LTC_SMALL
107-
# optimize for SIZE
108-
LTC_CFLAGS += -Os -DLTC_SMALL_CODE
109-
else
105+
endif # LTC_DEBUG
110106

111107
ifndef IGNORE_SPEED
112108
# optimize for SPEED
113109
LTC_CFLAGS += -O3 -funroll-loops
114110

115111
# add -fomit-frame-pointer. hinders debugging!
116112
LTC_CFLAGS += -fomit-frame-pointer
117-
endif
113+
endif # IGNORE_SPEED
118114

119-
endif # COMPILE_SMALL
120-
endif # COMPILE_DEBUG
115+
ifdef LTC_SMALL
116+
# optimize for SIZE
117+
LTC_CFLAGS += -Os -DLTC_SMALL_CODE
118+
endif # LTC_SMALL
121119

122120

123121
ifneq ($(findstring clang,$(CC)),)

0 commit comments

Comments
 (0)