-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (19 loc) · 824 Bytes
/
Makefile
File metadata and controls
29 lines (19 loc) · 824 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
empty :=
space := $(empty) $(empty)
get_abs_path_scape = $(subst $(space),\ ,$(abspath $1))
includes = -I$(call get_abs_path_scape,../../x86/include) -includeCppUTest/MemoryLeakDetectorNewMacros.h
cpp_flags = --std=c++11 -DCPP_UTEST1 -O0 -g -Wall -fmessage-length=0
ld_flags = -L$(call get_abs_path_scape,../../x86/lib)
#-Wl,--verbose=99
#ld_libs = -Wl,-Bstatic -lCppUTest -Wl,-Bstatic -lCppUTestExt
LIBS := -lpthread -lCppUTest
list_grp = $(wildcard *.grp)
list_cpp = $(wildcard *.cpp)
-include $(wildcard *.d)
%.png : %.grp
dot -T png -o $@ $^
%.o : %.cpp $(wildcard *.h)
g++ -c ${includes} ${cpp_flags} -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
Queue.out : $(patsubst %.cpp,%.o,${list_cpp})
g++ ${ld_flags} -o $@ $^ ${ld_libs} ${LIBS}
all : $(patsubst %.grp,%.png,${list_grp}) Queue.out