-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
33 lines (22 loc) · 706 Bytes
/
makefile
File metadata and controls
33 lines (22 loc) · 706 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
.PHONY : clean
DIR_DEST = bin
DIR_INCLUDE = src iface
FILES = test #start feature_01
FILES_TARGET = $(foreach FILE,$(FILES),$(addprefix $(DIR_DEST)/debug/,$(FILE)) $(addprefix $(DIR_DEST)/release/,$(FILE)))
CPPFLAGS = $(patsubst %,-I%,$(DIR_INCLUDE)) -Wall
all : $(FILES_TARGET)
@for f in $^; do echo -n Executing ./$$f && ./$$f && echo " : Done"; done;
bin/debug/% : test/%.cpp | bin/debug
g++ $(CPPFLAGS) -g -o $@ $<
bin/release/% : test/%.cpp | bin/release
g++ $(CPPFLAGS) -O3 -o $@ $<
bin/debug :
@mkdir -p bin/debug
bin/release :
@mkdir -p bin/release
clean :
@rm bin/debug/*
@rm bin/release/*
@rmdir bin/debug
@rmdir bin/release
@rmdir bin