Parcourir la source

Makefile: allow to use WITH_CFLAGS

bel2125 il y a 4 ans
Parent
commit
e730c4b639
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      Makefile

+ 5 - 1
Makefile

@@ -67,6 +67,10 @@ endif
 # only set main compile options if none were chosen
 # only set main compile options if none were chosen
 CFLAGS += -Wall -Wextra -Wshadow -Wformat-security -Winit-self -Wmissing-prototypes -D$(TARGET_OS) -Iinclude $(COPT) -DUSE_STACK_SIZE=$(USE_STACK_SIZE)
 CFLAGS += -Wall -Wextra -Wshadow -Wformat-security -Winit-self -Wmissing-prototypes -D$(TARGET_OS) -Iinclude $(COPT) -DUSE_STACK_SIZE=$(USE_STACK_SIZE)
 
 
+ifdef WITH_CFLAGS
+  CFLAGS += $(WITH_CFLAGS)
+endif
+
 LIBS = -lpthread -lm
 LIBS = -lpthread -lm
 
 
 ifdef WITH_DEBUG
 ifdef WITH_DEBUG
@@ -81,7 +85,7 @@ else ifdef TEST_FUZZ
   CXX = clang++
   CXX = clang++
   BUILD_DIRS += $(BUILD_DIR)/fuzztest
   BUILD_DIRS += $(BUILD_DIR)/fuzztest
   APP_SOURCES = fuzztest/fuzzmain.c
   APP_SOURCES = fuzztest/fuzzmain.c
-  OBJECTS = $(LIB_SOURCES:.c=.o) $(APP_SOURCES:.c=.o) 
+  OBJECTS = $(LIB_SOURCES:.c=.o) $(APP_SOURCES:.c=.o)
   CFLAGS += -DTEST_FUZZ$(TEST_FUZZ)
   CFLAGS += -DTEST_FUZZ$(TEST_FUZZ)
 else
 else
   CFLAGS += -O2 -DNDEBUG
   CFLAGS += -O2 -DNDEBUG