]> git.saurik.com Git - wxWidgets.git/blob - samples/dll/makefile.wat
2a3369f2729c9cc7c291ab011d4ba74c5cbde6eb
[wxWidgets.git] / samples / dll / makefile.wat
1 # =========================================================================
2 # This makefile was generated by
3 # Bakefile 0.2.8 (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 PORTNAME =
35 !ifeq USE_GUI 0
36 PORTNAME = base
37 !endif
38 !ifeq USE_GUI 1
39 PORTNAME = msw
40 !endif
41 WXDEBUGFLAG =
42 !ifeq BUILD debug
43 WXDEBUGFLAG = d
44 !endif
45 WXUNICODEFLAG =
46 !ifeq UNICODE 1
47 WXUNICODEFLAG = u
48 !endif
49 WXUNIVNAME =
50 !ifeq WXUNIV 1
51 WXUNIVNAME = univ
52 !endif
53 WXDLLFLAG =
54 !ifeq SHARED 1
55 WXDLLFLAG = dll
56 !endif
57 LIBTYPE_SUFFIX =
58 !ifeq SHARED 0
59 LIBTYPE_SUFFIX = lib
60 !endif
61 !ifeq SHARED 1
62 LIBTYPE_SUFFIX = dll
63 !endif
64 EXTRALIBS_FOR_BASE =
65 !ifeq MONOLITHIC 0
66 EXTRALIBS_FOR_BASE =
67 !endif
68 !ifeq MONOLITHIC 1
69 EXTRALIBS_FOR_BASE =
70 !endif
71 __wx_exe___depname =
72 !ifeq SHARED 0
73 __wx_exe___depname = $(OBJS)\wx_exe.exe
74 !endif
75 __DEBUGINFO_1 =
76 !ifeq BUILD debug
77 !ifeq DEBUG_INFO default
78 __DEBUGINFO_1 = -d2
79 !endif
80 !endif
81 !ifeq BUILD release
82 !ifeq DEBUG_INFO default
83 __DEBUGINFO_1 = -d0
84 !endif
85 !endif
86 !ifeq DEBUG_INFO 0
87 __DEBUGINFO_1 = -d0
88 !endif
89 !ifeq DEBUG_INFO 1
90 __DEBUGINFO_1 = -d2
91 !endif
92 __DEBUGINFO =
93 !ifeq BUILD debug
94 !ifeq DEBUG_INFO default
95 __DEBUGINFO = debug all
96 !endif
97 !endif
98 !ifeq BUILD release
99 !ifeq DEBUG_INFO default
100 __DEBUGINFO =
101 !endif
102 !endif
103 !ifeq DEBUG_INFO 0
104 __DEBUGINFO =
105 !endif
106 !ifeq DEBUG_INFO 1
107 __DEBUGINFO = debug all
108 !endif
109 __OPTIMIZEFLAG =
110 !ifeq BUILD debug
111 __OPTIMIZEFLAG = -od
112 !endif
113 !ifeq BUILD release
114 __OPTIMIZEFLAG = -ot -ox
115 !endif
116 __THREADSFLAG =
117 !ifeq USE_THREADS 0
118 __THREADSFLAG =
119 !endif
120 !ifeq USE_THREADS 1
121 __THREADSFLAG = -bm
122 !endif
123 __RUNTIME_LIBS =
124 !ifeq RUNTIME_LIBS dynamic
125 __RUNTIME_LIBS = -br
126 !endif
127 !ifeq RUNTIME_LIBS static
128 __RUNTIME_LIBS =
129 !endif
130 __RTTIFLAG =
131 !ifeq USE_RTTI 0
132 __RTTIFLAG =
133 !endif
134 !ifeq USE_RTTI 1
135 __RTTIFLAG = -xr
136 !endif
137 __EXCEPTIONSFLAG =
138 !ifeq USE_EXCEPTIONS 0
139 __EXCEPTIONSFLAG =
140 !endif
141 !ifeq USE_EXCEPTIONS 1
142 __EXCEPTIONSFLAG = -xs
143 !endif
144 __WXLIB_CORE_p =
145 !ifeq MONOLITHIC 0
146 __WXLIB_CORE_p = &
147 wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
148 !endif
149 __WXLIB_BASE_p =
150 !ifeq MONOLITHIC 0
151 __WXLIB_BASE_p = &
152 wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
153 !endif
154 __WXLIB_MONO_p =
155 !ifeq MONOLITHIC 1
156 __WXLIB_MONO_p = &
157 wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
158 !endif
159 __LIB_TIFF_p =
160 !ifeq USE_GUI 1
161 __LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
162 !endif
163 __LIB_JPEG_p =
164 !ifeq USE_GUI 1
165 __LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
166 !endif
167 __LIB_PNG_p =
168 !ifeq USE_GUI 1
169 __LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
170 !endif
171 __GDIPLUS_LIB_p =
172 !ifeq USE_GDIPLUS 1
173 __GDIPLUS_LIB_p = gdiplus.lib
174 !endif
175 __CAIRO_LIB_p =
176 !ifeq USE_CAIRO 1
177 __CAIRO_LIB_p = cairo.lib
178 !endif
179 ____CAIRO_LIBDIR_FILENAMES =
180 !ifeq USE_CAIRO 1
181 ____CAIRO_LIBDIR_FILENAMES = libpath $(CAIRO_ROOT)\lib
182 !endif
183 __WXUNIV_DEFINE_p =
184 !ifeq WXUNIV 1
185 __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__
186 !endif
187 __DEBUG_DEFINE_p =
188 !ifeq DEBUG_FLAG 0
189 __DEBUG_DEFINE_p = -dwxDEBUG_LEVEL=0
190 !endif
191 __EXCEPTIONS_DEFINE_p =
192 !ifeq USE_EXCEPTIONS 0
193 __EXCEPTIONS_DEFINE_p = -dwxNO_EXCEPTIONS
194 !endif
195 __RTTI_DEFINE_p =
196 !ifeq USE_RTTI 0
197 __RTTI_DEFINE_p = -dwxNO_RTTI
198 !endif
199 __THREAD_DEFINE_p =
200 !ifeq USE_THREADS 0
201 __THREAD_DEFINE_p = -dwxNO_THREADS
202 !endif
203 __UNICODE_DEFINE_p =
204 !ifeq UNICODE 0
205 __UNICODE_DEFINE_p = -dwxUSE_UNICODE=0
206 !endif
207 !ifeq UNICODE 1
208 __UNICODE_DEFINE_p = -d_UNICODE
209 !endif
210 __GFXCTX_DEFINE_p =
211 !ifeq USE_GDIPLUS 1
212 __GFXCTX_DEFINE_p = -dwxUSE_GRAPHICS_CONTEXT=1
213 !endif
214 ____CAIRO_INCLUDEDIR_FILENAMES =
215 !ifeq USE_CAIRO 1
216 ____CAIRO_INCLUDEDIR_FILENAMES = -i=$(CAIRO_ROOT)\include\cairo
217 !endif
218 __DLLFLAG_p =
219 !ifeq SHARED 1
220 __DLLFLAG_p = -dWXUSINGDLL
221 !endif
222
223 ### Variables: ###
224
225 WX_RELEASE_NODOT = 29
226 COMPILER_PREFIX = wat
227 OBJS = &
228 $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
229 LIBDIRNAME = .\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG)
230 SETUPHDIR = &
231 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
232 MY_DLL_CXXFLAGS = -bd $(__DEBUGINFO_1) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
233 $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
234 $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) &
235 $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) &
236 -i=.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 &
237 -wcd=657 -wcd=667 $(__DLLFLAG_p) -i=. $(__RTTIFLAG) $(__EXCEPTIONSFLAG) &
238 $(CPPFLAGS) $(CXXFLAGS)
239 MY_DLL_OBJECTS = &
240 $(OBJS)\my_dll_my_dll.obj
241 WX_EXE_CXXFLAGS = $(__DEBUGINFO_1) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
242 $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
243 $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) &
244 $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) &
245 -i=.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 &
246 -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) -i=.\..\..\samples -dNOPCH $(__RTTIFLAG) &
247 $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
248 WX_EXE_OBJECTS = &
249 $(OBJS)\wx_exe_dll_user_wx.obj
250
251
252 all : $(OBJS)
253 $(OBJS) :
254 -if not exist $(OBJS) mkdir $(OBJS)
255
256 ### Targets: ###
257
258 all : .SYMBOLIC $(OBJS)\my_dll.dll $(__wx_exe___depname)
259
260 clean : .SYMBOLIC
261 -if exist $(OBJS)\*.obj del $(OBJS)\*.obj
262 -if exist $(OBJS)\*.res del $(OBJS)\*.res
263 -if exist $(OBJS)\*.lbc del $(OBJS)\*.lbc
264 -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk
265 -if exist $(OBJS)\*.pch del $(OBJS)\*.pch
266 -if exist $(OBJS)\my_dll.dll del $(OBJS)\my_dll.dll
267 -if exist $(OBJS)\my_dll.lib del $(OBJS)\my_dll.lib
268 -if exist $(OBJS)\wx_exe.exe del $(OBJS)\wx_exe.exe
269
270 $(OBJS)\my_dll.dll : $(MY_DLL_OBJECTS)
271 @%create $(OBJS)\my_dll.lbc
272 @%append $(OBJS)\my_dll.lbc option quiet
273 @%append $(OBJS)\my_dll.lbc name $^@
274 @%append $(OBJS)\my_dll.lbc option caseexact
275 @%append $(OBJS)\my_dll.lbc $(__DEBUGINFO) libpath $(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS)
276 @for %i in ($(MY_DLL_OBJECTS)) do @%append $(OBJS)\my_dll.lbc file %i
277 @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) $(__GDIPLUS_LIB_p) $(__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
278 @%append $(OBJS)\my_dll.lbc
279 @%append $(OBJS)\my_dll.lbc system nt_dll
280 wlink @$(OBJS)\my_dll.lbc
281 wlib -q -n -b $(OBJS)\my_dll.lib +$^@
282
283 !ifeq SHARED 0
284 $(OBJS)\wx_exe.exe : $(WX_EXE_OBJECTS) $(OBJS)\wx_exe_sample.res $(OBJS)\my_dll.dll
285 @%create $(OBJS)\wx_exe.lbc
286 @%append $(OBJS)\wx_exe.lbc option quiet
287 @%append $(OBJS)\wx_exe.lbc name $^@
288 @%append $(OBJS)\wx_exe.lbc option caseexact
289 @%append $(OBJS)\wx_exe.lbc $(__DEBUGINFO) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS)
290 @for %i in ($(WX_EXE_OBJECTS)) do @%append $(OBJS)\wx_exe.lbc file %i
291 @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) $(__GDIPLUS_LIB_p) $(__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
292 @%append $(OBJS)\wx_exe.lbc option resource=$(OBJS)\wx_exe_sample.res
293 @for %i in () do @%append $(OBJS)\wx_exe.lbc option stack=%i
294 wlink @$(OBJS)\wx_exe.lbc
295 !endif
296
297 $(OBJS)\my_dll_my_dll.obj : .AUTODEPEND .\my_dll.cpp
298 $(CXX) -bt=nt -zq -fo=$^@ $(MY_DLL_CXXFLAGS) $<
299
300 $(OBJS)\wx_exe_sample.res : .AUTODEPEND .\..\..\samples\sample.rc
301 wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) -i=.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -i=. $(__DLLFLAG_p) -i=.\..\..\samples -dNOPCH $<
302
303 $(OBJS)\wx_exe_dll_user_wx.obj : .AUTODEPEND .\dll_user_wx.cpp
304 $(CXX) -bt=nt -zq -fo=$^@ $(WX_EXE_CXXFLAGS) $<
305