Skip to content

Commit

Permalink
fix: fast fail, disable pragma once warnings and add debug alias.
Browse files Browse the repository at this point in the history
Signed-off-by: divy9881 <divy9881@gmail.com>
  • Loading branch information
divy9881 committed Jan 7, 2021
1 parent a73a9ef commit d2bffa4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ AR := ar
OBJ_FLAG := -c
FILE_FLAG := -o
STD_FLAG := -std=c++11
DIS_WARN := -w

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

.PHONY: object
object:
$(foreach OBJ_DIR, $(OBJ_DIRS),\
$(MKDIR_P) $(OBJ_DIR);\
)
$(foreach SRC_FILE, $(SRC_FILES),\
set -e
$(CXX) $(DIS_WARN) $(STD_FLAG) $(OBJ_FLAG) $(FILE_FLAG) $(SRC_FILE:$(SRC_DIR)/%.$(SRC_EXT)=$(OBJ_DIR)/$(SRC_DIR)/%.$(OBJ_EXT)) $(SRC_FILE);\
)

.PHONY: debug
debug:
$(foreach OBJ_DIR, $(OBJ_DIRS),\
$(MKDIR_P) $(OBJ_DIR);\
)
Expand Down

0 comments on commit d2bffa4

Please sign in to comment.