-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (25 loc) · 752 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (25 loc) · 752 Bytes
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
37
38
# MASTER MAKEFILE
export EMPTY:=
export HIDE := @$(EMPTY)
export IGN := -$(EMPTY)
export PROJECT_ROOT := $(PWD)
export INCLUDES = $(PROJECT_ROOT)/utils
UTILS := $(PROJECT_ROOT)/utils
_SUBDIRS := $(shell for dir in `ls $(PROJECT_ROOT)`; do [ -d $$dir ] && echo $$dir ; done)
SUBDIRS := $(filter-out $(notdir $(UTILS)),$(_SUBDIRS))
CLRDIRS := $(addsuffix .clean,$(SUBDIRS))
export CC = gcc
export CFLAGS = -I$(UTILS)
default: all
all: ECHO $(SUBDIRS)
$(HIDE)echo ALL compile finished!
$(SUBDIRS):
$(MAKE) -w -C $@
$(HIDE)echo "<$@> was finished!"
$(CLRDIRS):
$(MAKE) -w -C $(@:.clean=) clean
ECHO:
$(HIDE)echo travers [$(SUBDIRS)]
$(HIDE)echo start compiling...
clean: $(CLRDIRS)
.PHONY: default all $(SUBDIRS) clean $(CLRDIRS) ECHO