]> git.saurik.com Git - wxWidgets.git/blob - samples/dll/makefile.wat
fixes potential crash under gatekeeper
[wxWidgets.git] / samples / dll / makefile.wat
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.wat
8
9 # -------------------------------------------------------------------------
10 # Do not modify the rest of this file!
11 # -------------------------------------------------------------------------
12
13 # Speed up compilation a bit:
14 !ifdef __LOADDLL__
15 ! loaddll wcc wccd
16 ! loaddll wccaxp wccdaxp
17 ! loaddll wcc386 wccd386
18 ! loaddll wpp wppdi86
19 ! loaddll wppaxp wppdaxp
20 ! loaddll wpp386 wppd386
21 ! if $(__VERSION__) >= 1280
22 ! loaddll wlink wlinkd
23 ! else
24 ! loaddll wlink wlink
25 ! endif
26 ! loaddll wlib wlibd
27 !endif
28
29 # We need these variables in some bakefile-made rules:
30 WATCOM_CWD = $+ $(%cdrive):$(%cwd) $-
31
32 ### Conditionally set variables: ###
33
34 WIN32_TOOLKIT_LOWERCASE =
35 !ifeq TOOLKIT GTK
36 WIN32_TOOLKIT_LOWERCASE = gtk
37 !endif
38 !ifeq TOOLKIT MSW
39 WIN32_TOOLKIT_LOWERCASE = msw
40 !endif
41 PORTNAME =
42 !ifeq USE_GUI 0
43 PORTNAME = base
44 !endif
45 !ifeq USE_GUI 1
46 PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
47 !endif
48 WXBASEPORT =
49 !ifeq TOOLKIT MAC
50 WXBASEPORT = _carbon
51 !endif
52 COMPILER_VERSION =
53 !ifeq OFFICIAL_BUILD 1
54 COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
55 !endif
56 WXDEBUGFLAG =
57 !ifeq BUILD debug
58 WXDEBUGFLAG = d
59 !endif
60 WXUNICODEFLAG =
61 !ifeq UNICODE 1
62 WXUNICODEFLAG = u
63 !endif
64 WXUNIVNAME =
65 !ifeq WXUNIV 1
66 WXUNIVNAME = univ
67 !endif
68 WXDLLFLAG =
69 !ifeq SHARED 1
70 WXDLLFLAG = dll
71 !endif
72 LIBTYPE_SUFFIX =
73 !ifeq SHARED 0
74 LIBTYPE_SUFFIX = lib
75 !endif
76 !ifeq SHARED 1
77 LIBTYPE_SUFFIX = dll
78 !endif
79 EXTRALIBS_FOR_BASE =
80 !ifeq MONOLITHIC 0
81 EXTRALIBS_FOR_BASE =
82 !endif
83 !ifeq MONOLITHIC 1
84 EXTRALIBS_FOR_BASE =
85 !endif
86 LIB_GTK =
87 !ifeq TOOLKIT GTK
88 !ifeq TOOLKIT_VERSION 2
89 LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib &
90 gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib &
91 glib-2.0.lib
92 !endif
93 !endif
94 __wx_exe___depname =
95 !ifeq SHARED 0
96 __wx_exe___depname = $(OBJS)\wx_exe.exe
97 !endif
98 __WXLIB_CORE_p =
99 !ifeq MONOLITHIC 0
100 __WXLIB_CORE_p = &
101 wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
102 !endif
103 __WXLIB_BASE_p =
104 !ifeq MONOLITHIC 0
105 __WXLIB_BASE_p = &
106 wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
107 !endif
108 __WXLIB_MONO_p =
109 !ifeq MONOLITHIC 1
110 __WXLIB_MONO_p = &
111 wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
112 !endif
113 __LIB_TIFF_p =
114 !ifeq USE_GUI 1
115 __LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
116 !endif
117 __LIB_JPEG_p =
118 !ifeq USE_GUI 1
119 __LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
120 !endif
121 __LIB_PNG_p =
122 !ifeq USE_GUI 1
123 __LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
124 !endif
125 __CAIRO_LIB_p =
126 !ifeq USE_CAIRO 1
127 __CAIRO_LIB_p = cairo.lib
128 !endif
129 ____CAIRO_LIBDIR_FILENAMES =
130 !ifeq USE_CAIRO 1
131 ____CAIRO_LIBDIR_FILENAMES = libpath $(CAIRO_ROOT)\lib
132 !endif
133 __DEBUGINFO_0 =
134 !ifeq BUILD debug
135 !ifeq DEBUG_INFO default
136 __DEBUGINFO_0 = -d2
137 !endif
138 !endif
139 !ifeq BUILD release
140 !ifeq DEBUG_INFO default
141 __DEBUGINFO_0 = -d0
142 !endif
143 !endif
144 !ifeq DEBUG_INFO 0
145 __DEBUGINFO_0 = -d0
146 !endif
147 !ifeq DEBUG_INFO 1
148 __DEBUGINFO_0 = -d2
149 !endif
150 __DEBUGINFO =
151 !ifeq BUILD debug
152 !ifeq DEBUG_INFO default
153 __DEBUGINFO = debug all
154 !endif
155 !endif
156 !ifeq BUILD release
157 !ifeq DEBUG_INFO default
158 __DEBUGINFO =
159 !endif
160 !endif
161 !ifeq DEBUG_INFO 0
162 __DEBUGINFO =
163 !endif
164 !ifeq DEBUG_INFO 1
165 __DEBUGINFO = debug all
166 !endif
167 __OPTIMIZEFLAG =
168 !ifeq BUILD debug
169 __OPTIMIZEFLAG = -od
170 !endif
171 !ifeq BUILD release
172 __OPTIMIZEFLAG = -ot -ox
173 !endif
174 __THREADSFLAG =
175 !ifeq USE_THREADS 0
176 __THREADSFLAG =
177 !endif
178 !ifeq USE_THREADS 1
179 __THREADSFLAG = -bm
180 !endif
181 __RUNTIME_LIBS =
182 !ifeq RUNTIME_LIBS dynamic
183 __RUNTIME_LIBS = -br
184 !endif
185 !ifeq RUNTIME_LIBS static
186 __RUNTIME_LIBS =
187 !endif
188 __RTTIFLAG =
189 !ifeq USE_RTTI 0
190 __RTTIFLAG =
191 !endif
192 !ifeq USE_RTTI 1
193 __RTTIFLAG = -xr
194 !endif
195 __EXCEPTIONSFLAG =
196 !ifeq USE_EXCEPTIONS 0
197 __EXCEPTIONSFLAG =
198 !endif
199 !ifeq USE_EXCEPTIONS 1
200 __EXCEPTIONSFLAG = -xs
201 !endif
202 __WXUNIV_DEFINE_p =
203 !ifeq WXUNIV 1
204 __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__
205 !endif
206 __DEBUG_DEFINE_p =
207 !ifeq DEBUG_FLAG 0
208 __DEBUG_DEFINE_p = -dwxDEBUG_LEVEL=0
209 !endif
210 __NDEBUG_DEFINE_p =
211 !ifeq BUILD release
212 __NDEBUG_DEFINE_p = -dNDEBUG
213 !endif
214 __EXCEPTIONS_DEFINE_p =
215 !ifeq USE_EXCEPTIONS 0
216 __EXCEPTIONS_DEFINE_p = -dwxNO_EXCEPTIONS
217 !endif
218 __RTTI_DEFINE_p =
219 !ifeq USE_RTTI 0
220 __RTTI_DEFINE_p = -dwxNO_RTTI
221 !endif
222 __THREAD_DEFINE_p =
223 !ifeq USE_THREADS 0
224 __THREAD_DEFINE_p = -dwxNO_THREADS
225 !endif
226 __UNICODE_DEFINE_p =
227 !ifeq UNICODE 0
228 __UNICODE_DEFINE_p = -dwxUSE_UNICODE=0
229 !endif
230 !ifeq UNICODE 1
231 __UNICODE_DEFINE_p = -d_UNICODE
232 !endif
233 ____CAIRO_INCLUDEDIR_FILENAMES =
234 !ifeq USE_CAIRO 1
235 ____CAIRO_INCLUDEDIR_FILENAMES = -i=$(CAIRO_ROOT)\include\cairo
236 !endif
237 __DLLFLAG_p =
238 !ifeq SHARED 1
239 __DLLFLAG_p = -dWXUSINGDLL
240 !endif
241
242 ### Variables: ###
243
244 WX_RELEASE_NODOT = 29
245 COMPILER_PREFIX = wat
246 OBJS = &
247 $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
248 LIBDIRNAME = &
249 .\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
250 SETUPHDIR = &
251 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
252 MY_DLL_CXXFLAGS = -bd $(__DEBUGINFO_0) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
253 $(__RUNTIME_LIBS) -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) &
254 $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) &
255 $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) &
256 -i=$(SETUPHDIR) -i=.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -wx &
257 -wcd=549 -wcd=656 -wcd=657 -wcd=667 $(__DLLFLAG_p) -dMY_DLL_BUILDING -i=. &
258 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
259 MY_DLL_OBJECTS = &
260 $(OBJS)\my_dll_my_dll.obj
261 WX_EXE_CXXFLAGS = $(__DEBUGINFO_0) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
262 $(__RUNTIME_LIBS) -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) &
263 $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) &
264 $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) &
265 -i=$(SETUPHDIR) -i=.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -wx &
266 -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) -i=.\..\..\samples &
267 -dNOPCH $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
268 WX_EXE_OBJECTS = &
269 $(OBJS)\wx_exe_wx_exe.obj
270 SDK_EXE_CXXFLAGS = $(__DEBUGINFO_0) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
271 $(__RUNTIME_LIBS) $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
272 SDK_EXE_OBJECTS = &
273 $(OBJS)\sdk_exe_sdk_exe.obj
274
275
276 all : $(OBJS)
277 $(OBJS) :
278 -if not exist $(OBJS) mkdir $(OBJS)
279
280 ### Targets: ###
281
282 all : .SYMBOLIC $(OBJS)\my_dll.dll $(__wx_exe___depname) $(OBJS)\sdk_exe.exe
283
284 clean : .SYMBOLIC
285 -if exist $(OBJS)\*.obj del $(OBJS)\*.obj
286 -if exist $(OBJS)\*.res del $(OBJS)\*.res
287 -if exist $(OBJS)\*.lbc del $(OBJS)\*.lbc
288 -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk
289 -if exist $(OBJS)\*.pch del $(OBJS)\*.pch
290 -if exist $(OBJS)\my_dll.dll del $(OBJS)\my_dll.dll
291 -if exist $(OBJS)\my_dll.lib del $(OBJS)\my_dll.lib
292 -if exist $(OBJS)\wx_exe.exe del $(OBJS)\wx_exe.exe
293 -if exist $(OBJS)\sdk_exe.exe del $(OBJS)\sdk_exe.exe
294
295 $(OBJS)\my_dll.dll : $(MY_DLL_OBJECTS)
296 @%create $(OBJS)\my_dll.lbc
297 @%append $(OBJS)\my_dll.lbc option quiet
298 @%append $(OBJS)\my_dll.lbc name $^@
299 @%append $(OBJS)\my_dll.lbc option caseexact
300 @%append $(OBJS)\my_dll.lbc $(__DEBUGINFO) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS)
301 @for %i in ($(MY_DLL_OBJECTS)) do @%append $(OBJS)\my_dll.lbc file %i
302 @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib) do @%append $(OBJS)\my_dll.lbc library %i
303 @%append $(OBJS)\my_dll.lbc
304 @%append $(OBJS)\my_dll.lbc system nt_dll
305 wlink @$(OBJS)\my_dll.lbc
306 wlib -q -n -b $(OBJS)\my_dll.lib +$^@
307
308 !ifeq SHARED 0
309 $(OBJS)\wx_exe.exe : $(WX_EXE_OBJECTS) $(OBJS)\wx_exe_sample.res $(OBJS)\my_dll.dll
310 @%create $(OBJS)\wx_exe.lbc
311 @%append $(OBJS)\wx_exe.lbc option quiet
312 @%append $(OBJS)\wx_exe.lbc name $^@
313 @%append $(OBJS)\wx_exe.lbc option caseexact
314 @%append $(OBJS)\wx_exe.lbc $(__DEBUGINFO) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS)
315 @for %i in ($(WX_EXE_OBJECTS)) do @%append $(OBJS)\wx_exe.lbc file %i
316 @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(OBJS)\my_dll.lib $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib) do @%append $(OBJS)\wx_exe.lbc library %i
317 @%append $(OBJS)\wx_exe.lbc option resource=$(OBJS)\wx_exe_sample.res
318 @for %i in () do @%append $(OBJS)\wx_exe.lbc option stack=%i
319 wlink @$(OBJS)\wx_exe.lbc
320 !endif
321
322 $(OBJS)\sdk_exe.exe : $(SDK_EXE_OBJECTS) $(OBJS)\my_dll.dll
323 @%create $(OBJS)\sdk_exe.lbc
324 @%append $(OBJS)\sdk_exe.lbc option quiet
325 @%append $(OBJS)\sdk_exe.lbc name $^@
326 @%append $(OBJS)\sdk_exe.lbc option caseexact
327 @%append $(OBJS)\sdk_exe.lbc $(__DEBUGINFO) system nt_win ref '_WinMain@16' $(LDFLAGS)
328 @for %i in ($(SDK_EXE_OBJECTS)) do @%append $(OBJS)\sdk_exe.lbc file %i
329 @for %i in ( $(OBJS)\my_dll.lib user32.lib) do @%append $(OBJS)\sdk_exe.lbc library %i
330 @%append $(OBJS)\sdk_exe.lbc
331 @for %i in () do @%append $(OBJS)\sdk_exe.lbc option stack=%i
332 wlink @$(OBJS)\sdk_exe.lbc
333
334 $(OBJS)\my_dll_my_dll.obj : .AUTODEPEND .\my_dll.cpp
335 $(CXX) -bt=nt -zq -fo=$^@ $(MY_DLL_CXXFLAGS) $<
336
337 $(OBJS)\wx_exe_sample.res : .AUTODEPEND .\..\..\samples\sample.rc
338 wrc -q -ad -bt=nt -r -fo=$^@ -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -i=. $(__DLLFLAG_p) -i=.\..\..\samples -dNOPCH $<
339
340 $(OBJS)\wx_exe_wx_exe.obj : .AUTODEPEND .\wx_exe.cpp
341 $(CXX) -bt=nt -zq -fo=$^@ $(WX_EXE_CXXFLAGS) $<
342
343 $(OBJS)\sdk_exe_sdk_exe.obj : .AUTODEPEND .\sdk_exe.cpp
344 $(CXX) -bt=nt -zq -fo=$^@ $(SDK_EXE_CXXFLAGS) $<
345