Skip to content

Commit 52929cb

Browse files
committed
fix: fast fail, disable pragma once warnings and add debug alias.
Signed-off-by: divy9881 <[email protected]>
1 parent a73a9ef commit 52929cb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ AR := ar
66
OBJ_FLAG := -c
77
FILE_FLAG := -o
88
STD_FLAG := -std=c++11
9+
DIS_WARN := -w
910

1011
# Define archive flags
1112
AR_FLAG := crv
@@ -33,6 +34,16 @@ OBJ_DIRS := $(addprefix $(OBJ_DIR)/, $(INC_DIRS))
3334

3435
.PHONY: object
3536
object:
37+
$(foreach OBJ_DIR, $(OBJ_DIRS),\
38+
$(MKDIR_P) $(OBJ_DIR);\
39+
)
40+
$(foreach SRC_FILE, $(SRC_FILES),\
41+
set -e;\
42+
$(CXX) $(DIS_WARN) $(STD_FLAG) $(OBJ_FLAG) $(FILE_FLAG) $(SRC_FILE:$(SRC_DIR)/%.$(SRC_EXT)=$(OBJ_DIR)/$(SRC_DIR)/%.$(OBJ_EXT)) $(SRC_FILE);\
43+
)
44+
45+
.PHONY: debug
46+
debug:
3647
$(foreach OBJ_DIR, $(OBJ_DIRS),\
3748
$(MKDIR_P) $(OBJ_DIR);\
3849
)

0 commit comments

Comments
 (0)