]> git.saurik.com Git - wxWidgets.git/blame - samples/widgets/makefile.gcc
fix for potential crash when conversion fails
[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 \
137c8bde
WS
38 $(OBJS)\widgets_clrpicker.o \
39 $(OBJS)\widgets_fontpicker.o \
40 $(OBJS)\widgets_filepicker.o \
41 $(OBJS)\widgets_dirpicker.o \
25a73439
VS
42 $(OBJS)\widgets_radiobox.o \
43 $(OBJS)\widgets_slider.o \
44 $(OBJS)\widgets_spinbtn.o \
45 $(OBJS)\widgets_static.o \
46 $(OBJS)\widgets_textctrl.o \
32816f9a 47 $(OBJS)\widgets_toggle.o \
25a73439 48 $(OBJS)\widgets_widgets.o \
f2fdc4d5 49 $(OBJS)\widgets_sample_rc.o
3b20263d
VS
50
51### Conditionally set variables: ###
52
250700e4
RD
53ifeq ($(GCC_VERSION),2.95)
54GCCFLAGS = -fvtable-thunks
55endif
3b20263d
VS
56ifeq ($(USE_GUI),0)
57PORTNAME = base
58endif
59ifeq ($(USE_GUI),1)
60PORTNAME = msw
61endif
62ifeq ($(BUILD),debug)
25a73439
VS
63ifeq ($(DEBUG_FLAG),default)
64WXDEBUGFLAG = d
65endif
66endif
67ifeq ($(DEBUG_FLAG),1)
3b20263d
VS
68WXDEBUGFLAG = d
69endif
3b20263d
VS
70ifeq ($(UNICODE),1)
71WXUNICODEFLAG = u
72endif
73ifeq ($(WXUNIV),1)
74WXUNIVNAME = univ
75endif
b17c1746
DE
76ifeq ($(SHARED),1)
77WXDLLFLAG = dll
25a73439 78endif
b14abf14
JS
79ifeq ($(SHARED),0)
80LIBTYPE_SUFFIX = lib
81endif
82ifeq ($(SHARED),1)
83LIBTYPE_SUFFIX = dll
84endif
dd65d8c8
RN
85ifeq ($(MONOLITHIC),0)
86EXTRALIBS_FOR_BASE =
87endif
88ifeq ($(MONOLITHIC),1)
89EXTRALIBS_FOR_BASE =
90endif
b17c1746
DE
91ifeq ($(BUILD),debug)
92__OPTIMIZEFLAG_2 = -O0
250700e4
RD
93endif
94ifeq ($(BUILD),release)
b17c1746 95__OPTIMIZEFLAG_2 = -O2
25a73439 96endif
8c9f8f91
JS
97ifeq ($(USE_RTTI),0)
98__RTTIFLAG_5 = -fno-rtti
25a73439 99endif
8c9f8f91
JS
100ifeq ($(USE_RTTI),1)
101__RTTIFLAG_5 =
25a73439 102endif
b17c1746 103ifeq ($(USE_EXCEPTIONS),0)
8c9f8f91 104__EXCEPTIONSFLAG_6 = -fno-exceptions
b17c1746
DE
105endif
106ifeq ($(USE_EXCEPTIONS),1)
8c9f8f91 107__EXCEPTIONSFLAG_6 =
b17c1746
DE
108endif
109ifeq ($(WXUNIV),1)
110__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
111endif
112ifeq ($(WXUNIV),1)
113__WXUNIV_DEFINE_p_1 = --define __WXUNIVERSAL__
250700e4
RD
114endif
115ifeq ($(BUILD),debug)
25a73439
VS
116ifeq ($(DEBUG_FLAG),default)
117__DEBUG_DEFINE_p = -D__WXDEBUG__
118endif
119endif
120ifeq ($(DEBUG_FLAG),1)
3b20263d
VS
121__DEBUG_DEFINE_p = -D__WXDEBUG__
122endif
123ifeq ($(BUILD),debug)
25a73439
VS
124ifeq ($(DEBUG_FLAG),default)
125__DEBUG_DEFINE_p_1 = --define __WXDEBUG__
126endif
127endif
128ifeq ($(DEBUG_FLAG),1)
3b20263d
VS
129__DEBUG_DEFINE_p_1 = --define __WXDEBUG__
130endif
8c9f8f91
JS
131ifeq ($(USE_EXCEPTIONS),0)
132__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
133endif
134ifeq ($(USE_EXCEPTIONS),0)
135__EXCEPTIONS_DEFINE_p_1 = --define wxNO_EXCEPTIONS
136endif
137ifeq ($(USE_RTTI),0)
138__RTTI_DEFINE_p = -DwxNO_RTTI
139endif
140ifeq ($(USE_RTTI),0)
141__RTTI_DEFINE_p_1 = --define wxNO_RTTI
142endif
143ifeq ($(USE_THREADS),0)
144__THREAD_DEFINE_p = -DwxNO_THREADS
145endif
146ifeq ($(USE_THREADS),0)
147__THREAD_DEFINE_p_1 = --define wxNO_THREADS
148endif
b17c1746
DE
149ifeq ($(UNICODE),1)
150__UNICODE_DEFINE_p = -D_UNICODE
151endif
152ifeq ($(UNICODE),1)
153__UNICODE_DEFINE_p_1 = --define _UNICODE
154endif
2113bc77
MW
155ifeq ($(MSLU),1)
156__MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1
157endif
158ifeq ($(MSLU),1)
159__MSLU_DEFINE_p_1 = --define wxUSE_UNICODE_MSLU=1
160endif
3b20263d
VS
161ifeq ($(SHARED),1)
162__DLLFLAG_p = -DWXUSINGDLL
163endif
164ifeq ($(SHARED),1)
165__DLLFLAG_p_1 = --define WXUSINGDLL
166endif
b17c1746 167ifeq ($(MONOLITHIC),0)
137c8bde
WS
168__WXLIB_XML_p = \
169 -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml
170endif
171ifeq ($(MONOLITHIC),0)
f2fdc4d5
WS
172__WXLIB_ADV_p = \
173 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv
174endif
175ifeq ($(MONOLITHIC),0)
176__WXLIB_HTML_p = \
177 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html
178endif
179ifeq ($(MONOLITHIC),0)
b17c1746 180__WXLIB_CORE_p = \
c33fae85 181 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
b71531ad 182endif
b17c1746 183ifeq ($(MONOLITHIC),0)
c33fae85
RN
184__WXLIB_BASE_p = \
185 -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
b71531ad 186endif
b17c1746
DE
187ifeq ($(MONOLITHIC),1)
188__WXLIB_MONO_p = \
c33fae85 189 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
b71531ad 190endif
b17c1746 191ifeq ($(USE_GUI),1)
9c2d002b 192__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
b71531ad 193endif
25a73439 194ifeq ($(USE_GUI),1)
9c2d002b 195__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
25a73439
VS
196endif
197ifeq ($(USE_GUI),1)
9c2d002b 198__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
25a73439 199endif
b17c1746
DE
200ifeq ($(MSLU),1)
201__UNICOWS_LIB_p = -lunicows
250700e4 202endif
b17c1746
DE
203ifeq ($(BUILD),debug)
204ifeq ($(DEBUG_INFO),default)
205__DEBUGINFO = -g
4e209a20 206endif
3b20263d 207endif
b17c1746
DE
208ifeq ($(BUILD),release)
209ifeq ($(DEBUG_INFO),default)
210__DEBUGINFO =
3b20263d 211endif
3b20263d 212endif
b17c1746
DE
213ifeq ($(DEBUG_INFO),0)
214__DEBUGINFO =
3b20263d 215endif
b17c1746
DE
216ifeq ($(DEBUG_INFO),1)
217__DEBUGINFO = -g
3b20263d 218endif
8c9f8f91
JS
219ifeq ($(USE_THREADS),0)
220__THREADSFLAG =
221endif
222ifeq ($(USE_THREADS),1)
223__THREADSFLAG = -mthreads
224endif
3b20263d
VS
225
226
227all: $(OBJS)
228$(OBJS):
229 -if not exist $(OBJS) mkdir $(OBJS)
230
231### Targets: ###
232
233all: $(OBJS)\widgets.exe
234
b17c1746
DE
235clean:
236 -if exist $(OBJS)\*.o del $(OBJS)\*.o
0d90d6ea 237 -if exist $(OBJS)\*.d del $(OBJS)\*.d
b17c1746
DE
238 -if exist $(OBJS)\widgets.exe del $(OBJS)\widgets.exe
239
f2fdc4d5 240$(OBJS)\widgets.exe: $(WIDGETS_OBJECTS) $(OBJS)\widgets_sample_rc.o
137c8bde 241 $(CXX) -o $@ $(WIDGETS_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_XML_p) $(__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 242
1c3a6972 243$(OBJS)\widgets_button.o: ./button.cpp
0d90d6ea 244 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 245
8941fa88 246$(OBJS)\widgets_checkbox.o: ./checkbox.cpp
0d90d6ea 247 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
8941fa88 248
1c3a6972 249$(OBJS)\widgets_combobox.o: ./combobox.cpp
0d90d6ea 250 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 251
f2fdc4d5
WS
252$(OBJS)\widgets_datepick.o: ./datepick.cpp
253 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
254
1c3a6972 255$(OBJS)\widgets_gauge.o: ./gauge.cpp
0d90d6ea 256 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 257
f9300d42
WS
258$(OBJS)\widgets_hyperlnk.o: ./hyperlnk.cpp
259 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
260
1c3a6972 261$(OBJS)\widgets_listbox.o: ./listbox.cpp
0d90d6ea 262 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 263
1c3a6972 264$(OBJS)\widgets_notebook.o: ./notebook.cpp
0d90d6ea 265 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 266
137c8bde
WS
267$(OBJS)\widgets_clrpicker.o: ./clrpicker.cpp
268 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
269
270$(OBJS)\widgets_fontpicker.o: ./fontpicker.cpp
271 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
272
273$(OBJS)\widgets_filepicker.o: ./filepicker.cpp
274 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
275
276$(OBJS)\widgets_dirpicker.o: ./dirpicker.cpp
ec376c8f
VZ
277 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
278
1c3a6972 279$(OBJS)\widgets_radiobox.o: ./radiobox.cpp
0d90d6ea 280 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 281
1c3a6972 282$(OBJS)\widgets_slider.o: ./slider.cpp
0d90d6ea 283 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 284
1c3a6972 285$(OBJS)\widgets_spinbtn.o: ./spinbtn.cpp
0d90d6ea 286 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 287
1c3a6972 288$(OBJS)\widgets_static.o: ./static.cpp
0d90d6ea 289 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 290
1c3a6972 291$(OBJS)\widgets_textctrl.o: ./textctrl.cpp
0d90d6ea 292 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 293
32816f9a
WS
294$(OBJS)\widgets_toggle.o: ./toggle.cpp
295 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
296
1c3a6972 297$(OBJS)\widgets_widgets.o: ./widgets.cpp
0d90d6ea 298 $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
3b20263d 299
f2fdc4d5 300$(OBJS)\widgets_sample_rc.o: ./../sample.rc
77a7dfc1 301 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 302
250700e4 303.PHONY: all clean
b14abf14 304
8c9f8f91 305
0d90d6ea
JS
306# Dependencies tracking:
307-include $(OBJS)/*.d