forked from PureMVC/puremvc-cpp-multicore-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.gcc
269 lines (206 loc) · 8.27 KB
/
makefile.gcc
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# =========================================================================
# This makefile was generated by
# Bakefile 0.2.9 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
# -------------------------------------------------------------------------
# These are configurable options:
# -------------------------------------------------------------------------
# 'install' program location
INSTALL ?= install
# Location where the package is installed by 'make install'
prefix ?= /usr/local
# Destination root (/ is used if empty)
DESTDIR ?=
#
AR ?= ar
#
RANLIB ?= ranlib
# Compiler flags to link shared library
LINK_DLL_FLAGS ?= -shared
# C++ compiler
CXX = g++
# Standard flags for C++
CXXFLAGS ?=
# Standard preprocessor flags (common for CC and CXX)
CPPFLAGS ?=
# Standard linker flags
LDFLAGS ?=
# Set to 1 to build debug version [0,1]
DEBUG ?= 0
# Set to 1 to build with C++0x support [0,1]
CPP0X ?= 0
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
CPPDEPS = -MT$@ -MF`echo $@ | sed -e 's,\.o$$,.d,'` -MD -MP
PUREMVC_LIB_CXXFLAGS = $(____DEBUG) $(____DEBUG_0) $(____DEBUG_1) \
$(____DEBUG_2) $(____DEBUG_3) -Iinclude -D_THREAD_SAFE -pthread $(__CPP0X) \
$(CPPFLAGS) $(CXXFLAGS)
PUREMVC_LIB_OBJECTS = \
gcc$(__DEBUG_0)/PureMVC_lib_PureMVC.o \
gcc$(__DEBUG_0)/PureMVC_lib_Model.o \
gcc$(__DEBUG_0)/PureMVC_lib_View.o \
gcc$(__DEBUG_0)/PureMVC_lib_Controller.o \
gcc$(__DEBUG_0)/PureMVC_lib_Notifier.o \
gcc$(__DEBUG_0)/PureMVC_lib_Notification.o \
gcc$(__DEBUG_0)/PureMVC_lib_SimpleCommand.o \
gcc$(__DEBUG_0)/PureMVC_lib_MacroCommand.o \
gcc$(__DEBUG_0)/PureMVC_lib_Mediator.o \
gcc$(__DEBUG_0)/PureMVC_lib_Facade.o \
gcc$(__DEBUG_0)/PureMVC_lib_Proxy.o
PUREMVC_CXXFLAGS = $(____DEBUG) $(____DEBUG_0) $(____DEBUG_1) $(____DEBUG_2) \
$(____DEBUG_3) $(__CPP0X) -Iinclude -D_THREAD_SAFE -pthread -fPIC -DPIC \
$(CPPFLAGS) $(CXXFLAGS)
PUREMVC_OBJECTS = \
gcc$(__DEBUG_0)/PureMVC_PureMVC.o \
gcc$(__DEBUG_0)/PureMVC_Model.o \
gcc$(__DEBUG_0)/PureMVC_View.o \
gcc$(__DEBUG_0)/PureMVC_Controller.o \
gcc$(__DEBUG_0)/PureMVC_Notifier.o \
gcc$(__DEBUG_0)/PureMVC_Notification.o \
gcc$(__DEBUG_0)/PureMVC_SimpleCommand.o \
gcc$(__DEBUG_0)/PureMVC_MacroCommand.o \
gcc$(__DEBUG_0)/PureMVC_Mediator.o \
gcc$(__DEBUG_0)/PureMVC_Facade.o \
gcc$(__DEBUG_0)/PureMVC_Proxy.o
### Conditionally set variables: ###
ifeq ($(DEBUG),0)
__DEBUG_0 = /release
endif
ifeq ($(DEBUG),1)
__DEBUG_0 = /debug
endif
ifeq ($(DEBUG),0)
__DEBUG_1 =
endif
ifeq ($(DEBUG),1)
__DEBUG_1 = d
endif
ifeq ($(DEBUG),0)
____DEBUG = -DNDEBUG
endif
ifeq ($(DEBUG),1)
____DEBUG = -D_DEBUG
endif
ifeq ($(DEBUG),0)
____DEBUG_0 = -DNDEBUG
endif
ifeq ($(DEBUG),1)
____DEBUG_0 = -DDEBUG
endif
ifeq ($(DEBUG),0)
____DEBUG_1 = -O2
endif
ifeq ($(DEBUG),1)
____DEBUG_1 = -O0
endif
ifeq ($(DEBUG),0)
____DEBUG_3 =
endif
ifeq ($(DEBUG),1)
____DEBUG_3 = -W -Wall
endif
ifeq ($(CPP0X),0)
__CPP0X =
endif
ifeq ($(CPP0X),1)
__CPP0X = -std=c++0x
endif
ifeq ($(DEBUG),0)
____DEBUG_2 =
endif
ifeq ($(DEBUG),1)
____DEBUG_2 = -g
endif
all: gcc$(__DEBUG_0)
gcc$(__DEBUG_0):
@mkdir -p gcc$(__DEBUG_0)
### Targets: ###
all: first_check gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).a gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).so bin/gcc/libPureMVC$(__DEBUG_1).so lib/gcc/libPureMVC$(__DEBUG_1).a
install: install_PureMVC_lib install_PureMVC
uninstall: uninstall_PureMVC_lib uninstall_PureMVC
clean:
rm -f gcc$(__DEBUG_0)/*.o
rm -f gcc$(__DEBUG_0)/*.d
rm -f gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).a
rm -f gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).so
rm -f gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).so
first_check:
mkdir -p bin
mkdir -p lib
mkdir -p bin/gcc
mkdir -p lib/gcc
if test $(DEBUG) = 1;then mkdir -p gcc$(__DEBUG_0);fi
if test $(DEBUG) = 0;then mkdir -p gcc$(__DEBUG_0);fi
gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).a: $(PUREMVC_LIB_OBJECTS) gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).so
rm -f $@
$(AR) rcu $@ $(PUREMVC_LIB_OBJECTS)
$(RANLIB) $@
install_PureMVC_lib: gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).a
$(INSTALL) -d $(DESTDIR)$(prefix)/lib
$(INSTALL) -m 644 gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).a $(DESTDIR)$(prefix)/lib
uninstall_PureMVC_lib:
rm -f $(DESTDIR)$(prefix)/lib/libPureMVC$(__DEBUG_1).a
gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).so: $(PUREMVC_OBJECTS)
$(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(PUREMVC_OBJECTS) $(____DEBUG_2) -dynamiclib -pthread -ldl -lpthread $(LDFLAGS)
install_PureMVC: gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).so
$(INSTALL) -d $(DESTDIR)$(prefix)/lib
$(INSTALL) -m 644 gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).so $(DESTDIR)$(prefix)/lib
install -c gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).so $(DESTDIR)$(prefix)/lib
uninstall_PureMVC:
rm -f $(DESTDIR)$(prefix)/lib/libPureMVC$(__DEBUG_1).so
rm -f $(DESTDIR)$(prefix)/lib/libPureMVC$(__DEBUG_1).so
bin/gcc/libPureMVC$(__DEBUG_1).so: gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).so
cp -pf gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).so bin/gcc/libPureMVC$(__DEBUG_1).so
lib/gcc/libPureMVC$(__DEBUG_1).a: gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).a
cp -pf gcc$(__DEBUG_0)/libPureMVC$(__DEBUG_1).a lib/gcc/libPureMVC$(__DEBUG_1).a
gcc$(__DEBUG_0)/PureMVC_lib_PureMVC.o: ./src/PureMVC/PureMVC.cpp
$(CXX) -c -o $@ $(PUREMVC_LIB_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_lib_Model.o: ./src/PureMVC/Core/Model.cpp
$(CXX) -c -o $@ $(PUREMVC_LIB_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_lib_View.o: ./src/PureMVC/Core/View.cpp
$(CXX) -c -o $@ $(PUREMVC_LIB_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_lib_Controller.o: ./src/PureMVC/Core/Controller.cpp
$(CXX) -c -o $@ $(PUREMVC_LIB_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_lib_Notifier.o: ./src/PureMVC/Patterns/Observer/Notifier.cpp
$(CXX) -c -o $@ $(PUREMVC_LIB_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_lib_Notification.o: ./src/PureMVC/Patterns/Observer/Notification.cpp
$(CXX) -c -o $@ $(PUREMVC_LIB_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_lib_SimpleCommand.o: ./src/PureMVC/Patterns/Command/SimpleCommand.cpp
$(CXX) -c -o $@ $(PUREMVC_LIB_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_lib_MacroCommand.o: ./src/PureMVC/Patterns/Command/MacroCommand.cpp
$(CXX) -c -o $@ $(PUREMVC_LIB_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_lib_Mediator.o: ./src/PureMVC/Patterns/Mediator/Mediator.cpp
$(CXX) -c -o $@ $(PUREMVC_LIB_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_lib_Facade.o: ./src/PureMVC/Patterns/Facade/Facade.cpp
$(CXX) -c -o $@ $(PUREMVC_LIB_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_lib_Proxy.o: ./src/PureMVC/Patterns/Proxy/Proxy.cpp
$(CXX) -c -o $@ $(PUREMVC_LIB_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_PureMVC.o: ./src/PureMVC/PureMVC.cpp
$(CXX) -c -o $@ $(PUREMVC_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_Model.o: ./src/PureMVC/Core/Model.cpp
$(CXX) -c -o $@ $(PUREMVC_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_View.o: ./src/PureMVC/Core/View.cpp
$(CXX) -c -o $@ $(PUREMVC_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_Controller.o: ./src/PureMVC/Core/Controller.cpp
$(CXX) -c -o $@ $(PUREMVC_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_Notifier.o: ./src/PureMVC/Patterns/Observer/Notifier.cpp
$(CXX) -c -o $@ $(PUREMVC_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_Notification.o: ./src/PureMVC/Patterns/Observer/Notification.cpp
$(CXX) -c -o $@ $(PUREMVC_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_SimpleCommand.o: ./src/PureMVC/Patterns/Command/SimpleCommand.cpp
$(CXX) -c -o $@ $(PUREMVC_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_MacroCommand.o: ./src/PureMVC/Patterns/Command/MacroCommand.cpp
$(CXX) -c -o $@ $(PUREMVC_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_Mediator.o: ./src/PureMVC/Patterns/Mediator/Mediator.cpp
$(CXX) -c -o $@ $(PUREMVC_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_Facade.o: ./src/PureMVC/Patterns/Facade/Facade.cpp
$(CXX) -c -o $@ $(PUREMVC_CXXFLAGS) $(CPPDEPS) $<
gcc$(__DEBUG_0)/PureMVC_Proxy.o: ./src/PureMVC/Patterns/Proxy/Proxy.cpp
$(CXX) -c -o $@ $(PUREMVC_CXXFLAGS) $(CPPDEPS) $<
.PHONY: all install uninstall clean install_PureMVC_lib uninstall_PureMVC_lib \
install_PureMVC uninstall_PureMVC
# Dependencies tracking:
-include gcc$(__DEBUG_0)/*.d