瀏覽代碼

Makefile: allow to use WITH_CFLAGS

bel2125 4 年之前
父節點
當前提交
e730c4b639
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      Makefile

+ 5 - 1
Makefile

@@ -67,6 +67,10 @@ endif
 # 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)
 
+ifdef WITH_CFLAGS
+  CFLAGS += $(WITH_CFLAGS)
+endif
+
 LIBS = -lpthread -lm
 
 ifdef WITH_DEBUG
@@ -81,7 +85,7 @@ else ifdef TEST_FUZZ
   CXX = clang++
   BUILD_DIRS += $(BUILD_DIR)/fuzztest
   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)
 else
   CFLAGS += -O2 -DNDEBUG