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