-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile
130 lines (96 loc) · 4.76 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#------------------------------------------------------------------------------#
# This makefile was generated by 'cbp2make' tool rev.147 #
#------------------------------------------------------------------------------#
WORKDIR = `pwd`
CC = gcc
CXX = g++
AR = ar
LD = g++
WINDRES = windres
INC =
CFLAGS = -Wall -fexceptions -std=c++1y
RESINC =
LIBDIR =
LIB =
LDFLAGS = -pthread
INC_STATIC_LIB = $(INC)
CFLAGS_STATIC_LIB = $(CFLAGS)
RESINC_STATIC_LIB = $(RESINC)
RCFLAGS_STATIC_LIB = $(RCFLAGS)
LIBDIR_STATIC_LIB = $(LIBDIR)
LIB_STATIC_LIB = $(LIB)
LDFLAGS_STATIC_LIB = $(LDFLAGS)
OBJDIR_STATIC_LIB = obj
DEP_STATIC_LIB =
OUT_STATIC_LIB = libltest.a
INC_TEST_LTEST_WITH_LTEST = $(INC)
CFLAGS_TEST_LTEST_WITH_LTEST = $(CFLAGS) -O2
RESINC_TEST_LTEST_WITH_LTEST = $(RESINC)
RCFLAGS_TEST_LTEST_WITH_LTEST = $(RCFLAGS)
LIBDIR_TEST_LTEST_WITH_LTEST = $(LIBDIR)
LIB_TEST_LTEST_WITH_LTEST = $(LIB)
LDFLAGS_TEST_LTEST_WITH_LTEST = $(LDFLAGS) -s
OBJDIR_TEST_LTEST_WITH_LTEST = obj/tests
DEP_TEST_LTEST_WITH_LTEST =
OUT_TEST_LTEST_WITH_LTEST = bin/tests/run-ltest-tests
INC_LTESTEXAMPLE = $(INC)
CFLAGS_LTESTEXAMPLE = $(CFLAGS) -g
RESINC_LTESTEXAMPLE = $(RESINC)
RCFLAGS_LTESTEXAMPLE = $(RCFLAGS)
LIBDIR_LTESTEXAMPLE = $(LIBDIR)
LIB_LTESTEXAMPLE = $(LIB)
LDFLAGS_LTESTEXAMPLE = $(LDFLAGS)
OBJDIR_LTESTEXAMPLE = obj/Debug
DEP_LTESTEXAMPLE =
OUT_LTESTEXAMPLE = bin/Debug/LTestExample
OBJ_STATIC_LIB = $(OBJDIR_STATIC_LIB)/src/LTest.o
OBJ_TEST_LTEST_WITH_LTEST = $(OBJDIR_TEST_LTEST_WITH_LTEST)/test-src/run-ltest-tests.o $(OBJDIR_TEST_LTEST_WITH_LTEST)/src/LTest.o
OBJ_LTESTEXAMPLE = $(OBJDIR_LTESTEXAMPLE)/src/LTest.o $(OBJDIR_LTESTEXAMPLE)/examples/main.o
all: static_lib test_ltest_with_ltest ltestexample
clean: clean_static_lib clean_test_ltest_with_ltest clean_ltestexample
before_static_lib:
test -d $(OBJDIR_STATIC_LIB)/src || mkdir -p $(OBJDIR_STATIC_LIB)/src
after_static_lib:
static_lib: before_static_lib out_static_lib after_static_lib
out_static_lib: before_static_lib $(OBJ_STATIC_LIB) $(DEP_STATIC_LIB)
$(AR) rcs $(OUT_STATIC_LIB) $(OBJ_STATIC_LIB)
$(OBJDIR_STATIC_LIB)/src/LTest.o: src/LTest.cpp
$(CXX) $(CFLAGS_STATIC_LIB) $(INC_STATIC_LIB) -c src/LTest.cpp -o $(OBJDIR_STATIC_LIB)/src/LTest.o
clean_static_lib:
rm -f $(OBJ_STATIC_LIB) $(OUT_STATIC_LIB)
rm -rf $(OBJDIR_STATIC_LIB)/src
before_test_ltest_with_ltest:
test -d bin/tests || mkdir -p bin/tests
test -d $(OBJDIR_TEST_LTEST_WITH_LTEST)/test-src || mkdir -p $(OBJDIR_TEST_LTEST_WITH_LTEST)/test-src
test -d $(OBJDIR_TEST_LTEST_WITH_LTEST)/src || mkdir -p $(OBJDIR_TEST_LTEST_WITH_LTEST)/src
after_test_ltest_with_ltest:
test_ltest_with_ltest: before_test_ltest_with_ltest out_test_ltest_with_ltest after_test_ltest_with_ltest
out_test_ltest_with_ltest: before_test_ltest_with_ltest $(OBJ_TEST_LTEST_WITH_LTEST) $(DEP_TEST_LTEST_WITH_LTEST)
$(LD) $(LIBDIR_TEST_LTEST_WITH_LTEST) -o $(OUT_TEST_LTEST_WITH_LTEST) $(OBJ_TEST_LTEST_WITH_LTEST) $(LDFLAGS_TEST_LTEST_WITH_LTEST) $(LIB_TEST_LTEST_WITH_LTEST)
$(OBJDIR_TEST_LTEST_WITH_LTEST)/test-src/run-ltest-tests.o: test-src/run-ltest-tests.cpp
$(CXX) $(CFLAGS_TEST_LTEST_WITH_LTEST) $(INC_TEST_LTEST_WITH_LTEST) -c test-src/run-ltest-tests.cpp -o $(OBJDIR_TEST_LTEST_WITH_LTEST)/test-src/run-ltest-tests.o
$(OBJDIR_TEST_LTEST_WITH_LTEST)/src/LTest.o: src/LTest.cpp
$(CXX) $(CFLAGS_TEST_LTEST_WITH_LTEST) $(INC_TEST_LTEST_WITH_LTEST) -c src/LTest.cpp -o $(OBJDIR_TEST_LTEST_WITH_LTEST)/src/LTest.o
clean_test_ltest_with_ltest:
rm -f $(OBJ_TEST_LTEST_WITH_LTEST) $(OUT_TEST_LTEST_WITH_LTEST)
rm -rf bin/tests
rm -rf $(OBJDIR_TEST_LTEST_WITH_LTEST)/test-src
rm -rf $(OBJDIR_TEST_LTEST_WITH_LTEST)/src
before_ltestexample:
test -d bin/Debug || mkdir -p bin/Debug
test -d $(OBJDIR_LTESTEXAMPLE)/src || mkdir -p $(OBJDIR_LTESTEXAMPLE)/src
test -d $(OBJDIR_LTESTEXAMPLE)/examples || mkdir -p $(OBJDIR_LTESTEXAMPLE)/examples
after_ltestexample:
ltestexample: before_ltestexample out_ltestexample after_ltestexample
out_ltestexample: before_ltestexample $(OBJ_LTESTEXAMPLE) $(DEP_LTESTEXAMPLE)
$(LD) $(LIBDIR_LTESTEXAMPLE) -o $(OUT_LTESTEXAMPLE) $(OBJ_LTESTEXAMPLE) $(LDFLAGS_LTESTEXAMPLE) $(LIB_LTESTEXAMPLE)
$(OBJDIR_LTESTEXAMPLE)/src/LTest.o: src/LTest.cpp
$(CXX) $(CFLAGS_LTESTEXAMPLE) $(INC_LTESTEXAMPLE) -c src/LTest.cpp -o $(OBJDIR_LTESTEXAMPLE)/src/LTest.o
$(OBJDIR_LTESTEXAMPLE)/examples/main.o: examples/main.cpp
$(CXX) $(CFLAGS_LTESTEXAMPLE) $(INC_LTESTEXAMPLE) -c examples/main.cpp -o $(OBJDIR_LTESTEXAMPLE)/examples/main.o
clean_ltestexample:
rm -f $(OBJ_LTESTEXAMPLE) $(OUT_LTESTEXAMPLE)
rm -rf bin/Debug
rm -rf $(OBJDIR_LTESTEXAMPLE)/src
rm -rf $(OBJDIR_LTESTEXAMPLE)/examples
.PHONY: before_static_lib after_static_lib clean_static_lib before_test_ltest_with_ltest after_test_ltest_with_ltest clean_test_ltest_with_ltest before_ltestexample after_ltestexample clean_ltestexample