]> git.saurik.com Git - wxWidgets.git/blob - tests/benchmarks/makefile.gcc
Extract compiler-specific macro definitions in a new wx/compiler.h.
[wxWidgets.git] / tests / benchmarks / makefile.gcc
1 # =========================================================================
2 # This makefile was generated by
3 # Bakefile 0.2.9 (http://www.bakefile.org)
4 # Do not modify, all changes will be overwritten!
5 # =========================================================================
6
7 include ../../build/msw/config.gcc
8
9 # -------------------------------------------------------------------------
10 # Do not modify the rest of this file!
11 # -------------------------------------------------------------------------
12
13 ### Variables: ###
14
15 CPPDEPS = -MT$@ -MF$@.d -MD -MP
16 WX_RELEASE_NODOT = 29
17 COMPILER_PREFIX = gcc
18 OBJS = \
19 $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
20 LIBDIRNAME = \
21 .\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
22 SETUPHDIR = \
23 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
24 BENCH_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \
25 -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
26 $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
27 $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
28 -I$(SETUPHDIR) -I.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \
29 -I. $(__DLLFLAG_p) -DwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \
30 -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
31 BENCH_OBJECTS = \
32 $(OBJS)\bench_bench.o \
33 $(OBJS)\bench_datetime.o \
34 $(OBJS)\bench_htmlpars.o \
35 $(OBJS)\bench_htmltag.o \
36 $(OBJS)\bench_ipcclient.o \
37 $(OBJS)\bench_log.o \
38 $(OBJS)\bench_mbconv.o \
39 $(OBJS)\bench_strings.o \
40 $(OBJS)\bench_tls.o \
41 $(OBJS)\bench_printfbench.o
42 BENCH_GUI_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \
43 $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
44 $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
45 $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \
46 $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include \
47 $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -I. $(__DLLFLAG_p) \
48 -I.\..\..\samples -DNOPCH $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \
49 -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
50 BENCH_GUI_OBJECTS = \
51 $(OBJS)\bench_gui_sample_rc.o \
52 $(OBJS)\bench_gui_bench.o \
53 $(OBJS)\bench_gui_image.o
54
55 ### Conditionally set variables: ###
56
57 ifeq ($(GCC_VERSION),2.95)
58 GCCFLAGS = -fvtable-thunks
59 endif
60 ifeq ($(USE_GUI),0)
61 PORTNAME = base
62 endif
63 ifeq ($(USE_GUI),1)
64 PORTNAME = msw$(TOOLKIT_VERSION)
65 endif
66 ifeq ($(OFFICIAL_BUILD),1)
67 COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
68 endif
69 ifeq ($(BUILD),debug)
70 WXDEBUGFLAG = d
71 endif
72 ifeq ($(UNICODE),1)
73 WXUNICODEFLAG = u
74 endif
75 ifeq ($(WXUNIV),1)
76 WXUNIVNAME = univ
77 endif
78 ifeq ($(SHARED),1)
79 WXDLLFLAG = dll
80 endif
81 ifeq ($(SHARED),0)
82 LIBTYPE_SUFFIX = lib
83 endif
84 ifeq ($(SHARED),1)
85 LIBTYPE_SUFFIX = dll
86 endif
87 ifeq ($(MONOLITHIC),0)
88 EXTRALIBS_FOR_BASE =
89 endif
90 ifeq ($(MONOLITHIC),1)
91 EXTRALIBS_FOR_BASE =
92 endif
93 ifeq ($(MONOLITHIC),0)
94 __WXLIB_NET_p = \
95 -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net
96 endif
97 ifeq ($(MONOLITHIC),1)
98 __LIB_PNG_IF_MONO_p = $(__LIB_PNG_p)
99 endif
100 ifeq ($(USE_GUI),1)
101 __bench_gui___depname = $(OBJS)\bench_gui.exe
102 endif
103 ifeq ($(WXUNIV),1)
104 __WXUNIV_DEFINE_p_3 = --define __WXUNIVERSAL__
105 endif
106 ifeq ($(DEBUG_FLAG),0)
107 __DEBUG_DEFINE_p_3 = --define wxDEBUG_LEVEL=0
108 endif
109 ifeq ($(BUILD),release)
110 __NDEBUG_DEFINE_p_3 = --define NDEBUG
111 endif
112 ifeq ($(USE_EXCEPTIONS),0)
113 __EXCEPTIONS_DEFINE_p_3 = --define wxNO_EXCEPTIONS
114 endif
115 ifeq ($(USE_RTTI),0)
116 __RTTI_DEFINE_p_3 = --define wxNO_RTTI
117 endif
118 ifeq ($(USE_THREADS),0)
119 __THREAD_DEFINE_p_3 = --define wxNO_THREADS
120 endif
121 ifeq ($(UNICODE),0)
122 __UNICODE_DEFINE_p_3 = --define wxUSE_UNICODE=0
123 endif
124 ifeq ($(UNICODE),1)
125 __UNICODE_DEFINE_p_3 = --define _UNICODE
126 endif
127 ifeq ($(MSLU),1)
128 __MSLU_DEFINE_p_3 = --define wxUSE_UNICODE_MSLU=1
129 endif
130 ifeq ($(USE_CAIRO),1)
131 __CAIRO_INCLUDEDIR_p_1 = --include-dir $(CAIRO_ROOT)/include/cairo
132 endif
133 ifeq ($(SHARED),1)
134 __DLLFLAG_p_3 = --define WXUSINGDLL
135 endif
136 ifeq ($(MONOLITHIC),0)
137 __WXLIB_CORE_p = \
138 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
139 endif
140 ifeq ($(MONOLITHIC),1)
141 __LIB_SCINTILLA_IF_MONO_p = -lwxscintilla$(WXDEBUGFLAG)
142 endif
143 ifeq ($(USE_GUI),1)
144 __LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
145 endif
146 ifeq ($(USE_GUI),1)
147 __LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
148 endif
149 ifeq ($(BUILD),debug)
150 __OPTIMIZEFLAG = -O0
151 endif
152 ifeq ($(BUILD),release)
153 __OPTIMIZEFLAG = -O2
154 endif
155 ifeq ($(USE_RTTI),0)
156 __RTTIFLAG = -fno-rtti
157 endif
158 ifeq ($(USE_RTTI),1)
159 __RTTIFLAG =
160 endif
161 ifeq ($(USE_EXCEPTIONS),0)
162 __EXCEPTIONSFLAG = -fno-exceptions
163 endif
164 ifeq ($(USE_EXCEPTIONS),1)
165 __EXCEPTIONSFLAG =
166 endif
167 ifeq ($(WXUNIV),1)
168 __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
169 endif
170 ifeq ($(DEBUG_FLAG),0)
171 __DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
172 endif
173 ifeq ($(BUILD),release)
174 __NDEBUG_DEFINE_p = -DNDEBUG
175 endif
176 ifeq ($(USE_EXCEPTIONS),0)
177 __EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
178 endif
179 ifeq ($(USE_RTTI),0)
180 __RTTI_DEFINE_p = -DwxNO_RTTI
181 endif
182 ifeq ($(USE_THREADS),0)
183 __THREAD_DEFINE_p = -DwxNO_THREADS
184 endif
185 ifeq ($(UNICODE),0)
186 __UNICODE_DEFINE_p = -DwxUSE_UNICODE=0
187 endif
188 ifeq ($(UNICODE),1)
189 __UNICODE_DEFINE_p = -D_UNICODE
190 endif
191 ifeq ($(MSLU),1)
192 __MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1
193 endif
194 ifeq ($(USE_CAIRO),1)
195 ____CAIRO_INCLUDEDIR_FILENAMES = -I$(CAIRO_ROOT)\include\cairo
196 endif
197 ifeq ($(SHARED),1)
198 __DLLFLAG_p = -DWXUSINGDLL
199 endif
200 ifeq ($(MONOLITHIC),0)
201 __WXLIB_BASE_p = \
202 -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
203 endif
204 ifeq ($(MONOLITHIC),1)
205 __WXLIB_MONO_p = \
206 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
207 endif
208 ifeq ($(USE_GUI),1)
209 __LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
210 endif
211 ifeq ($(MSLU),1)
212 __UNICOWS_LIB_p = -lunicows
213 endif
214 ifeq ($(USE_CAIRO),1)
215 __CAIRO_LIB_p = -lcairo
216 endif
217 ifeq ($(USE_CAIRO),1)
218 ____CAIRO_LIBDIR_FILENAMES = -L$(CAIRO_ROOT)\lib
219 endif
220 ifeq ($(BUILD),debug)
221 ifeq ($(DEBUG_INFO),default)
222 __DEBUGINFO = -g
223 endif
224 endif
225 ifeq ($(BUILD),release)
226 ifeq ($(DEBUG_INFO),default)
227 __DEBUGINFO =
228 endif
229 endif
230 ifeq ($(DEBUG_INFO),0)
231 __DEBUGINFO =
232 endif
233 ifeq ($(DEBUG_INFO),1)
234 __DEBUGINFO = -g
235 endif
236 ifeq ($(USE_THREADS),0)
237 __THREADSFLAG =
238 endif
239 ifeq ($(USE_THREADS),1)
240 __THREADSFLAG = -mthreads
241 endif
242
243
244 all: $(OBJS)
245 $(OBJS):
246 -if not exist $(OBJS) mkdir $(OBJS)
247
248 ### Targets: ###
249
250 all: $(OBJS)\bench.exe data $(__bench_gui___depname) data-image
251
252 clean:
253 -if exist $(OBJS)\*.o del $(OBJS)\*.o
254 -if exist $(OBJS)\*.d del $(OBJS)\*.d
255 -if exist $(OBJS)\bench.exe del $(OBJS)\bench.exe
256 -if exist $(OBJS)\bench_gui.exe del $(OBJS)\bench_gui.exe
257
258 $(OBJS)\bench.exe: $(BENCH_OBJECTS)
259 $(CXX) -o $@ $(BENCH_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet
260
261 data:
262 if not exist $(OBJS) mkdir $(OBJS)
263 for %%f in (htmltest.html) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS)
264
265 ifeq ($(USE_GUI),1)
266 $(OBJS)\bench_gui.exe: $(BENCH_GUI_OBJECTS) $(OBJS)\bench_gui_sample_rc.o
267 $(CXX) -o $@ $(BENCH_GUI_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet
268 endif
269
270 data-image:
271 if not exist $(OBJS) mkdir $(OBJS)
272 for %%f in (../../samples/image/horse.bmp ../../samples/image/horse.jpg ../../samples/image/horse.png ../../samples/image/horse.tif) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS)
273
274 $(OBJS)\bench_bench.o: ./bench.cpp
275 $(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
276
277 $(OBJS)\bench_datetime.o: ./datetime.cpp
278 $(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
279
280 $(OBJS)\bench_htmlpars.o: ./htmlparser/htmlpars.cpp
281 $(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
282
283 $(OBJS)\bench_htmltag.o: ./htmlparser/htmltag.cpp
284 $(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
285
286 $(OBJS)\bench_ipcclient.o: ./ipcclient.cpp
287 $(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
288
289 $(OBJS)\bench_log.o: ./log.cpp
290 $(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
291
292 $(OBJS)\bench_mbconv.o: ./mbconv.cpp
293 $(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
294
295 $(OBJS)\bench_strings.o: ./strings.cpp
296 $(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
297
298 $(OBJS)\bench_tls.o: ./tls.cpp
299 $(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
300
301 $(OBJS)\bench_printfbench.o: ./printfbench.cpp
302 $(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
303
304 $(OBJS)\bench_gui_sample_rc.o: ./../../samples/sample.rc
305 windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__NDEBUG_DEFINE_p_3) $(__EXCEPTIONS_DEFINE_p_3) $(__RTTI_DEFINE_p_3) $(__THREAD_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) $(__MSLU_DEFINE_p_3) --include-dir $(SETUPHDIR) --include-dir ./../../include $(__CAIRO_INCLUDEDIR_p_1) --include-dir . $(__DLLFLAG_p_3) --include-dir ./../../samples --define NOPCH
306
307 $(OBJS)\bench_gui_bench.o: ./bench.cpp
308 $(CXX) -c -o $@ $(BENCH_GUI_CXXFLAGS) $(CPPDEPS) $<
309
310 $(OBJS)\bench_gui_image.o: ./image.cpp
311 $(CXX) -c -o $@ $(BENCH_GUI_CXXFLAGS) $(CPPDEPS) $<
312
313 .PHONY: all clean data data-image
314
315
316 SHELL := $(COMSPEC)
317
318 # Dependencies tracking:
319 -include $(OBJS)/*.d