]> git.saurik.com Git - wxWidgets.git/blame_incremental - samples/widgets/makefile.gcc
fix the tests to pass with both gcc and msvc (2nd part of patch 1462778)
[wxWidgets.git] / samples / widgets / makefile.gcc
... / ...
CommitLineData
1# =========================================================================
2# This makefile was generated by
3# Bakefile 0.2.0 (http://bakefile.sourceforge.net)
4# Do not modify, all changes will be overwritten!
5# =========================================================================
6
7include ../../build/msw/config.gcc
8
9# -------------------------------------------------------------------------
10# Do not modify the rest of this file!
11# -------------------------------------------------------------------------
12
13### Variables: ###
14
15CPPDEPS = -MT$@ -MF$@.d -MD
16WX_RELEASE_NODOT = 27
17OBJS = \
18 gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
19LIBDIRNAME = .\..\..\lib\gcc_$(LIBTYPE_SUFFIX)$(CFG)
20SETUPHDIR = \
21 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
22WIDGETS_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG) \
23 $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
24 $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
25 $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
26 -I$(SETUPHDIR) -I.\..\..\include -W -Wall -I. $(__DLLFLAG_p) -I.\..\..\samples \
27 -DNOPCH $(__RTTIFLAG_5) $(__EXCEPTIONSFLAG_6) -Wno-ctor-dtor-privacy \
28 $(CPPFLAGS) $(CXXFLAGS)
29WIDGETS_OBJECTS = \
30 $(OBJS)\widgets_button.o \
31 $(OBJS)\widgets_checkbox.o \
32 $(OBJS)\widgets_combobox.o \
33 $(OBJS)\widgets_datepick.o \
34 $(OBJS)\widgets_gauge.o \
35 $(OBJS)\widgets_hyperlnk.o \
36 $(OBJS)\widgets_listbox.o \
37 $(OBJS)\widgets_notebook.o \
38 $(OBJS)\widgets_radiobox.o \
39 $(OBJS)\widgets_slider.o \
40 $(OBJS)\widgets_spinbtn.o \
41 $(OBJS)\widgets_static.o \
42 $(OBJS)\widgets_textctrl.o \
43 $(OBJS)\widgets_toggle.o \
44 $(OBJS)\widgets_widgets.o \
45 $(OBJS)\widgets_sample_rc.o
46
47### Conditionally set variables: ###
48
49ifeq ($(GCC_VERSION),2.95)
50GCCFLAGS = -fvtable-thunks
51endif
52ifeq ($(USE_GUI),0)
53PORTNAME = base
54endif
55ifeq ($(USE_GUI),1)
56PORTNAME = msw
57endif
58ifeq ($(BUILD),debug)
59ifeq ($(DEBUG_FLAG),default)
60WXDEBUGFLAG = d
61endif
62endif
63ifeq ($(DEBUG_FLAG),1)
64WXDEBUGFLAG = d
65endif
66ifeq ($(UNICODE),1)
67WXUNICODEFLAG = u
68endif
69ifeq ($(WXUNIV),1)
70WXUNIVNAME = univ
71endif
72ifeq ($(SHARED),1)
73WXDLLFLAG = dll
74endif
75ifeq ($(SHARED),0)
76LIBTYPE_SUFFIX = lib
77endif
78ifeq ($(SHARED),1)
79LIBTYPE_SUFFIX = dll
80endif
81ifeq ($(MONOLITHIC),0)
82EXTRALIBS_FOR_BASE =
83endif
84ifeq ($(MONOLITHIC),1)
85EXTRALIBS_FOR_BASE =
86endif
87ifeq ($(BUILD),debug)
88__OPTIMIZEFLAG_2 = -O0
89endif
90ifeq ($(BUILD),release)
91__OPTIMIZEFLAG_2 = -O2
92endif
93ifeq ($(USE_RTTI),0)
94__RTTIFLAG_5 = -fno-rtti
95endif
96ifeq ($(USE_RTTI),1)
97__RTTIFLAG_5 =
98endif
99ifeq ($(USE_EXCEPTIONS),0)
100__EXCEPTIONSFLAG_6 = -fno-exceptions
101endif
102ifeq ($(USE_EXCEPTIONS),1)
103__EXCEPTIONSFLAG_6 =
104endif
105ifeq ($(WXUNIV),1)
106__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
107endif
108ifeq ($(WXUNIV),1)
109__WXUNIV_DEFINE_p_1 = --define __WXUNIVERSAL__
110endif
111ifeq ($(BUILD),debug)
112ifeq ($(DEBUG_FLAG),default)
113__DEBUG_DEFINE_p = -D__WXDEBUG__
114endif
115endif
116ifeq ($(DEBUG_FLAG),1)
117__DEBUG_DEFINE_p = -D__WXDEBUG__
118endif
119ifeq ($(BUILD),debug)
120ifeq ($(DEBUG_FLAG),default)
121__DEBUG_DEFINE_p_1 = --define __WXDEBUG__
122endif
123endif
124ifeq ($(DEBUG_FLAG),1)
125__DEBUG_DEFINE_p_1 = --define __WXDEBUG__
126endif
127ifeq ($(USE_EXCEPTIONS),0)
128__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
129endif
130ifeq ($(USE_EXCEPTIONS),0)
131__EXCEPTIONS_DEFINE_p_1 = --define wxNO_EXCEPTIONS
132endif
133ifeq ($(USE_RTTI),0)
134__RTTI_DEFINE_p = -DwxNO_RTTI
135endif
136ifeq ($(USE_RTTI),0)
137__RTTI_DEFINE_p_1 = --define wxNO_RTTI
138endif
139ifeq ($(USE_THREADS),0)
140__THREAD_DEFINE_p = -DwxNO_THREADS
141endif
142ifeq ($(USE_THREADS),0)
143__THREAD_DEFINE_p_1 = --define wxNO_THREADS
144endif
145ifeq ($(UNICODE),1)
146__UNICODE_DEFINE_p = -D_UNICODE
147endif
148ifeq ($(UNICODE),1)
149__UNICODE_DEFINE_p_1 = --define _UNICODE
150endif
151ifeq ($(MSLU),1)
152__MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1
153endif
154ifeq ($(MSLU),1)
155__MSLU_DEFINE_p_1 = --define wxUSE_UNICODE_MSLU=1
156endif
157ifeq ($(SHARED),1)
158__DLLFLAG_p = -DWXUSINGDLL
159endif
160ifeq ($(SHARED),1)
161__DLLFLAG_p_1 = --define WXUSINGDLL
162endif
163ifeq ($(MONOLITHIC),0)
164__WXLIB_ADV_p = \
165 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv
166endif
167ifeq ($(MONOLITHIC),0)
168__WXLIB_HTML_p = \
169 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html
170endif
171ifeq ($(MONOLITHIC),0)
172__WXLIB_CORE_p = \
173 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
174endif
175ifeq ($(MONOLITHIC),0)
176__WXLIB_BASE_p = \
177 -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
178endif
179ifeq ($(MONOLITHIC),1)
180__WXLIB_MONO_p = \
181 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
182endif
183ifeq ($(USE_GUI),1)
184__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
185endif
186ifeq ($(USE_GUI),1)
187__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
188endif
189ifeq ($(USE_GUI),1)
190__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
191endif
192ifeq ($(MSLU),1)
193__UNICOWS_LIB_p = -lunicows
194endif
195ifeq ($(BUILD),debug)
196ifeq ($(DEBUG_INFO),default)
197__DEBUGINFO = -g
198endif
199endif
200ifeq ($(BUILD),release)
201ifeq ($(DEBUG_INFO),default)
202__DEBUGINFO =
203endif
204endif
205ifeq ($(DEBUG_INFO),0)
206__DEBUGINFO =
207endif
208ifeq ($(DEBUG_INFO),1)
209__DEBUGINFO = -g
210endif
211ifeq ($(USE_THREADS),0)
212__THREADSFLAG =
213endif
214ifeq ($(USE_THREADS),1)
215__THREADSFLAG = -mthreads
216endif
217
218
219all: $(OBJS)
220$(OBJS):
221 -if not exist $(OBJS) mkdir $(OBJS)
222
223### Targets: ###
224
225all: $(OBJS)\widgets.exe
226
227clean:
228 -if exist $(OBJS)\*.o del $(OBJS)\*.o
229 -if exist $(OBJS)\*.d del $(OBJS)\*.d
230 -if exist $(OBJS)\widgets.exe del $(OBJS)\widgets.exe
231
232$(OBJS)\widgets.exe: $(WIDGETS_OBJECTS) $(OBJS)\widgets_sample_rc.o
233 $(CXX) -o $@ $(WIDGETS_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
234
235$(OBJS)\widgets_button.o: ./button.cpp
236 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
237
238$(OBJS)\widgets_checkbox.o: ./checkbox.cpp
239 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
240
241$(OBJS)\widgets_combobox.o: ./combobox.cpp
242 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
243
244$(OBJS)\widgets_datepick.o: ./datepick.cpp
245 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
246
247$(OBJS)\widgets_gauge.o: ./gauge.cpp
248 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
249
250$(OBJS)\widgets_hyperlnk.o: ./hyperlnk.cpp
251 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
252
253$(OBJS)\widgets_listbox.o: ./listbox.cpp
254 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
255
256$(OBJS)\widgets_notebook.o: ./notebook.cpp
257 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
258
259$(OBJS)\widgets_radiobox.o: ./radiobox.cpp
260 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
261
262$(OBJS)\widgets_slider.o: ./slider.cpp
263 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
264
265$(OBJS)\widgets_spinbtn.o: ./spinbtn.cpp
266 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
267
268$(OBJS)\widgets_static.o: ./static.cpp
269 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
270
271$(OBJS)\widgets_textctrl.o: ./textctrl.cpp
272 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
273
274$(OBJS)\widgets_toggle.o: ./toggle.cpp
275 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
276
277$(OBJS)\widgets_widgets.o: ./widgets.cpp
278 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
279
280$(OBJS)\widgets_sample_rc.o: ./../sample.rc
281 windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) --include-dir $(SETUPHDIR) --include-dir ./../../include --include-dir . $(__DLLFLAG_p_1) --include-dir ./../../samples --define NOPCH
282
283.PHONY: all clean
284
285
286# Dependencies tracking:
287-include $(OBJS)/*.d