-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 822 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
MKFILE_PATH=$(abspath $(lastword $(MAKEFILE_LIST)))
MKFILE_DIR=$(dir $(MKFILE_PATH))
export ROOT_PROJECT_DIRECTORY=$(MKFILE_DIR)
TOPTARGETS=all cppcheck
SUBDIRS=src
.PHONY: $(TOPTARGETS)
-include $(ROOT_PROJECT_DIRECTORY)options.mk
all: $(BUILD_DIRECTORY) $(BIN_DIRECTORY) $(LIB_DIRECTORY) $(OBJ_DIRECTORY)
@:
$(BUILD_DIRECTORY) $(BIN_DIRECTORY) $(LIB_DIRECTORY) $(OBJ_DIRECTORY):
$(AT)mkdir -p $@
clean:
$(RM) -r $(BUILD_DIRECTORY)
$(TOPTARGETS): $(SUBDIRS)
.PHONY: $(SUBDIRS)
$(SUBDIRS):
@printf "$(COLOR_RED)$(COLOR_BOLD)MAKE -C $@ $(MAKECMDGOALS)$(COLOR_RESET)\n"
@$(MAKE) --no-print-directory -C $@ $(MAKECMDGOALS)
.PHONY: dump_paths
dump_paths:
$(info CC=$(CC_1))
$(info CXX=$(CXX_1))
$(info LD=$(LD_1))
$(info YACC=$(YACC_1))
$(info LEX=$(LEX_1))
$(info AR=$(AR_1))
$(info RANLIB=$(RANLIB_1))