]> git.saurik.com Git - wxWidgets.git/blame - 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
3b20263d
VS
1# =========================================================================
2# This makefile was generated by
77a7dfc1 3# Bakefile 0.2.0 (http://bakefile.sourceforge.net)
3b20263d
VS
4# Do not modify, all changes will be overwritten!
5# =========================================================================
6
fd9f42b6 7include ../../build/msw/config.gcc
3b20263d
VS
8
9# -------------------------------------------------------------------------
10# Do not modify the rest of this file!
11# -------------------------------------------------------------------------
12
13### Variables: ###
14
0d90d6ea 15CPPDEPS = -MT$@ -MF$@.d -MD
4cbcfb73 16WX_RELEASE_NODOT = 27
25a73439
VS
17OBJS = \
18 gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
b14abf14 19LIBDIRNAME = .\..\..\lib\gcc_$(LIBTYPE_SUFFIX)$(CFG)
75a0a7b7
VS
20SETUPHDIR = \
21 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
8c9f8f91
JS
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) \
2113bc77 25 $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
77a7dfc1 26 -I$(SETUPHDIR) -I.\..\..\include -W -Wall -I. $(__DLLFLAG_p) -I.\..\..\samples \
2113bc77
MW
27 -DNOPCH $(__RTTIFLAG_5) $(__EXCEPTIONSFLAG_6) -Wno-ctor-dtor-privacy \
28 $(CPPFLAGS) $(CXXFLAGS)
25a73439
VS
29WIDGETS_OBJECTS = \
30 $(OBJS)\widgets_button.o \
8941fa88 31 $(OBJS)\widgets_checkbox.o \
25a73439 32 $(OBJS)\widgets_combobox.o \
f2fdc4d5 33 $(OBJS)\widgets_datepick.o \
25a73439 34 $(OBJS)\widgets_gauge.o \
f9300d42 35 $(OBJS)\widgets_hyperlnk.o \
25a73439
VS
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 \
32816f9a 43 $(OBJS)\widgets_toggle.o \
25a73439 44 $(OBJS)\widgets_widgets.o \
f2fdc4d5 45 $(OBJS)\widgets_sample_rc.o
3b20263d
VS
46
47### Conditionally set variables: ###
48
250700e4
RD
49ifeq ($(GCC_VERSION),2.95)
50GCCFLAGS = -fvtable-thunks
51endif
3b20263d
VS
52ifeq ($(USE_GUI),0)
53PORTNAME = base
54endif
55ifeq ($(USE_GUI),1)
56PORTNAME = msw
57endif
58ifeq ($(BUILD),debug)
25a73439
VS
59ifeq ($(DEBUG_FLAG),default)
60WXDEBUGFLAG = d
61endif
62endif
63ifeq ($(DEBUG_FLAG),1)
3b20263d
VS
64WXDEBUGFLAG = d
65endif
3b20263d
VS
66ifeq ($(UNICODE),1)
67WXUNICODEFLAG = u
68endif
69ifeq ($(WXUNIV),1)
70WXUNIVNAME = univ
71endif
b17c1746
DE
72ifeq ($(SHARED),1)
73WXDLLFLAG = dll
25a73439 74endif
b14abf14
JS
75ifeq ($(SHARED),0)
76LIBTYPE_SUFFIX = lib
77endif
78ifeq ($(SHARED),1)
79LIBTYPE_SUFFIX = dll
80endif
dd65d8c8
RN
81ifeq ($(MONOLITHIC),0)
82EXTRALIBS_FOR_BASE =
83endif
84ifeq ($(MONOLITHIC),1)
85EXTRALIBS_FOR_BASE =
86endif
b17c1746
DE
87ifeq ($(BUILD),debug)
88__OPTIMIZEFLAG_2 = -O0
250700e4
RD
89endif
90ifeq ($(BUILD),release)
b17c1746 91__OPTIMIZEFLAG_2 = -O2
25a73439 92endif
8c9f8f91
JS
93ifeq ($(USE_RTTI),0)
94__RTTIFLAG_5 = -fno-rtti
25a73439 95endif
8c9f8f91
JS
96ifeq ($(USE_RTTI),1)
97__RTTIFLAG_5 =
25a73439 98endif
b17c1746 99ifeq ($(USE_EXCEPTIONS),0)
8c9f8f91 100__EXCEPTIONSFLAG_6 = -fno-exceptions
b17c1746
DE
101endif
102ifeq ($(USE_EXCEPTIONS),1)
8c9f8f91 103__EXCEPTIONSFLAG_6 =
b17c1746
DE
104endif
105ifeq ($(WXUNIV),1)
106__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
107endif
108ifeq ($(WXUNIV),1)
109__WXUNIV_DEFINE_p_1 = --define __WXUNIVERSAL__
250700e4
RD
110endif
111ifeq ($(BUILD),debug)
25a73439
VS
112ifeq ($(DEBUG_FLAG),default)
113__DEBUG_DEFINE_p = -D__WXDEBUG__
114endif
115endif
116ifeq ($(DEBUG_FLAG),1)
3b20263d
VS
117__DEBUG_DEFINE_p = -D__WXDEBUG__
118endif
119ifeq ($(BUILD),debug)
25a73439
VS
120ifeq ($(DEBUG_FLAG),default)
121__DEBUG_DEFINE_p_1 = --define __WXDEBUG__
122endif
123endif
124ifeq ($(DEBUG_FLAG),1)
3b20263d
VS
125__DEBUG_DEFINE_p_1 = --define __WXDEBUG__
126endif
8c9f8f91
JS
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
b17c1746
DE
145ifeq ($(UNICODE),1)
146__UNICODE_DEFINE_p = -D_UNICODE
147endif
148ifeq ($(UNICODE),1)
149__UNICODE_DEFINE_p_1 = --define _UNICODE
150endif
2113bc77
MW
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
3b20263d
VS
157ifeq ($(SHARED),1)
158__DLLFLAG_p = -DWXUSINGDLL
159endif
160ifeq ($(SHARED),1)
161__DLLFLAG_p_1 = --define WXUSINGDLL
162endif
b17c1746 163ifeq ($(MONOLITHIC),0)
f2fdc4d5
WS
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)
b17c1746 172__WXLIB_CORE_p = \
c33fae85 173 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
b71531ad 174endif
b17c1746 175ifeq ($(MONOLITHIC),0)
c33fae85
RN
176__WXLIB_BASE_p = \
177 -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
b71531ad 178endif
b17c1746
DE
179ifeq ($(MONOLITHIC),1)
180__WXLIB_MONO_p = \
c33fae85 181 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
b71531ad 182endif
b17c1746 183ifeq ($(USE_GUI),1)
9c2d002b 184__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
b71531ad 185endif
25a73439 186ifeq ($(USE_GUI),1)
9c2d002b 187__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
25a73439
VS
188endif
189ifeq ($(USE_GUI),1)
9c2d002b 190__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
25a73439 191endif
b17c1746
DE
192ifeq ($(MSLU),1)
193__UNICOWS_LIB_p = -lunicows
250700e4 194endif
b17c1746
DE
195ifeq ($(BUILD),debug)
196ifeq ($(DEBUG_INFO),default)
197__DEBUGINFO = -g
4e209a20 198endif
3b20263d 199endif
b17c1746
DE
200ifeq ($(BUILD),release)
201ifeq ($(DEBUG_INFO),default)
202__DEBUGINFO =
3b20263d 203endif
3b20263d 204endif
b17c1746
DE
205ifeq ($(DEBUG_INFO),0)
206__DEBUGINFO =
3b20263d 207endif
b17c1746
DE
208ifeq ($(DEBUG_INFO),1)
209__DEBUGINFO = -g
3b20263d 210endif
8c9f8f91
JS
211ifeq ($(USE_THREADS),0)
212__THREADSFLAG =
213endif
214ifeq ($(USE_THREADS),1)
215__THREADSFLAG = -mthreads
216endif
3b20263d
VS
217
218
219all: $(OBJS)
220$(OBJS):
221 -if not exist $(OBJS) mkdir $(OBJS)
222
223### Targets: ###
224
225all: $(OBJS)\widgets.exe
226
b17c1746
DE
227clean:
228 -if exist $(OBJS)\*.o del $(OBJS)\*.o
0d90d6ea 229 -if exist $(OBJS)\*.d del $(OBJS)\*.d
b17c1746
DE
230 -if exist $(OBJS)\widgets.exe del $(OBJS)\widgets.exe
231
f2fdc4d5
WS
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
b17c1746 234
1c3a6972 235$(OBJS)\widgets_button.o: ./button.cpp
0d90d6ea 236 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 237
8941fa88 238$(OBJS)\widgets_checkbox.o: ./checkbox.cpp
0d90d6ea 239 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
8941fa88 240
1c3a6972 241$(OBJS)\widgets_combobox.o: ./combobox.cpp
0d90d6ea 242 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 243
f2fdc4d5
WS
244$(OBJS)\widgets_datepick.o: ./datepick.cpp
245 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
246
1c3a6972 247$(OBJS)\widgets_gauge.o: ./gauge.cpp
0d90d6ea 248 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 249
f9300d42
WS
250$(OBJS)\widgets_hyperlnk.o: ./hyperlnk.cpp
251 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
252
1c3a6972 253$(OBJS)\widgets_listbox.o: ./listbox.cpp
0d90d6ea 254 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 255
1c3a6972 256$(OBJS)\widgets_notebook.o: ./notebook.cpp
0d90d6ea 257 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 258
1c3a6972 259$(OBJS)\widgets_radiobox.o: ./radiobox.cpp
0d90d6ea 260 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 261
1c3a6972 262$(OBJS)\widgets_slider.o: ./slider.cpp
0d90d6ea 263 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 264
1c3a6972 265$(OBJS)\widgets_spinbtn.o: ./spinbtn.cpp
0d90d6ea 266 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 267
1c3a6972 268$(OBJS)\widgets_static.o: ./static.cpp
0d90d6ea 269 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 270
1c3a6972 271$(OBJS)\widgets_textctrl.o: ./textctrl.cpp
0d90d6ea 272 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 273
32816f9a
WS
274$(OBJS)\widgets_toggle.o: ./toggle.cpp
275 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
276
1c3a6972 277$(OBJS)\widgets_widgets.o: ./widgets.cpp
0d90d6ea 278 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 279
f2fdc4d5 280$(OBJS)\widgets_sample_rc.o: ./../sample.rc
77a7dfc1 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
3b20263d 282
250700e4 283.PHONY: all clean
b14abf14 284
8c9f8f91 285
0d90d6ea
JS
286# Dependencies tracking:
287-include $(OBJS)/*.d