From cdc787e80a99e825bdd64b3361038dd53a8ad73f Mon Sep 17 00:00:00 2001 From: impressionyang Date: Thu, 1 Aug 2024 17:32:48 +0800 Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=E2=9A=A1=EF=B8=8F=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=BC=96=E8=AF=91=E9=80=89=E9=A1=B9=E7=9A=84=E4=B8=93?= =?UTF-8?q?=E9=97=A8=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fe12c5f..e18d787 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,10 @@ FILES_PATH := ./ SRC_FILES_SUFFIX := %.c HDR_FILES_SUFFIX := %.h +# add build flags +CFLAGS += -fdiagnostics-color=always -g +CFLAGS += -lm + # define func to remove_same_str for debug: $(info get seen ${seen}) define remove_same_str = $(eval seen :=) @@ -60,7 +64,7 @@ INC_DIRS := $(wordlist 1, $(words $(INC_DIRS)), $(INC_DIRS)) # compile job all : - $(CC) -fdiagnostics-color=always -g $(SOURCES) $(HEADERS) $(INC_DIRS) -o $(PROJECT) + $(CC) $(CFLAGS) $(SOURCES) $(HEADERS) $(INC_DIRS) -o $(PROJECT) # virtual clean job .PHONY : clean