]> git.saurik.com Git - wxWidgets.git/blob - samples/dll/makefile.gcc
Avoid id clashes
[wxWidgets.git] / samples / dll / makefile.gcc
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.gcc
8
9 # -------------------------------------------------------------------------
10 # Do not modify the rest of this file!
11 # -------------------------------------------------------------------------
12
13 ### Variables: ###
14
15 CPPDEPS = -MT$@ -MF$@.d -MD -MP
16 WX_RELEASE_NODOT = 29
17 COMPILER_PREFIX = gcc
18 OBJS = \
19 $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
20 LIBDIRNAME = .\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG)
21 SETUPHDIR = \
22 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
23 MY_DLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \
24 -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
25 $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
26 $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
27 -I$(SETUPHDIR) -I.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \
28 $(__DLLFLAG_p) -DMY_DLL_BUILDING -I. $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \
29 -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
30 MY_DLL_OBJECTS = \
31 $(OBJS)\my_dll_my_dll.o
32 WX_EXE_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \
33 -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
34 $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
35 $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
36 -I$(SETUPHDIR) -I.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall \
37 -I. $(__DLLFLAG_p) -I.\..\..\samples -DNOPCH $(__RTTIFLAG) \
38 $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
39 WX_EXE_OBJECTS = \
40 $(OBJS)\wx_exe_sample_rc.o \
41 $(OBJS)\wx_exe_wx_exe.o
42 SDK_EXE_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \
43 $(GCCFLAGS) -DHAVE_W32API_H $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) \
44 $(CXXFLAGS)
45 SDK_EXE_OBJECTS = \
46 $(OBJS)\sdk_exe_sdk_exe.o
47
48 ### Conditionally set variables: ###
49
50 ifeq ($(GCC_VERSION),2.95)
51 GCCFLAGS = -fvtable-thunks
52 endif
53 ifeq ($(USE_GUI),0)
54 PORTNAME = base
55 endif
56 ifeq ($(USE_GUI),1)
57 PORTNAME = msw
58 endif
59 ifeq ($(BUILD),debug)
60 WXDEBUGFLAG = d
61 endif
62 ifeq ($(UNICODE),1)
63 WXUNICODEFLAG = u
64 endif
65 ifeq ($(WXUNIV),1)
66 WXUNIVNAME = univ
67 endif
68 ifeq ($(SHARED),1)
69 WXDLLFLAG = dll
70 endif
71 ifeq ($(SHARED),0)
72 LIBTYPE_SUFFIX = lib
73 endif
74 ifeq ($(SHARED),1)
75 LIBTYPE_SUFFIX = dll
76 endif
77 ifeq ($(MONOLITHIC),0)
78 EXTRALIBS_FOR_BASE =
79 endif
80 ifeq ($(MONOLITHIC),1)
81 EXTRALIBS_FOR_BASE =
82 endif
83 ifeq ($(SHARED),0)
84 __wx_exe___depname = $(OBJS)\wx_exe.exe
85 endif
86 ifeq ($(WXUNIV),1)
87 __WXUNIV_DEFINE_p_3 = --define __WXUNIVERSAL__
88 endif
89 ifeq ($(DEBUG_FLAG),0)
90 __DEBUG_DEFINE_p_3 = --define wxDEBUG_LEVEL=0
91 endif
92 ifeq ($(BUILD),release)
93 __NDEBUG_DEFINE_p_3 = --define NDEBUG
94 endif
95 ifeq ($(USE_EXCEPTIONS),0)
96 __EXCEPTIONS_DEFINE_p_3 = --define wxNO_EXCEPTIONS
97 endif
98 ifeq ($(USE_RTTI),0)
99 __RTTI_DEFINE_p_3 = --define wxNO_RTTI
100 endif
101 ifeq ($(USE_THREADS),0)
102 __THREAD_DEFINE_p_3 = --define wxNO_THREADS
103 endif
104 ifeq ($(UNICODE),0)
105 __UNICODE_DEFINE_p_3 = --define wxUSE_UNICODE=0
106 endif
107 ifeq ($(UNICODE),1)
108 __UNICODE_DEFINE_p_3 = --define _UNICODE
109 endif
110 ifeq ($(MSLU),1)
111 __MSLU_DEFINE_p_3 = --define wxUSE_UNICODE_MSLU=1
112 endif
113 ifeq ($(USE_CAIRO),1)
114 __CAIRO_INCLUDEDIR_p_1 = --include-dir $(CAIRO_ROOT)/include/cairo
115 endif
116 ifeq ($(SHARED),1)
117 __DLLFLAG_p_3 = --define WXUSINGDLL
118 endif
119 ifeq ($(WXUNIV),1)
120 __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
121 endif
122 ifeq ($(DEBUG_FLAG),0)
123 __DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
124 endif
125 ifeq ($(BUILD),release)
126 __NDEBUG_DEFINE_p = -DNDEBUG
127 endif
128 ifeq ($(USE_EXCEPTIONS),0)
129 __EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
130 endif
131 ifeq ($(USE_RTTI),0)
132 __RTTI_DEFINE_p = -DwxNO_RTTI
133 endif
134 ifeq ($(USE_THREADS),0)
135 __THREAD_DEFINE_p = -DwxNO_THREADS
136 endif
137 ifeq ($(UNICODE),0)
138 __UNICODE_DEFINE_p = -DwxUSE_UNICODE=0
139 endif
140 ifeq ($(UNICODE),1)
141 __UNICODE_DEFINE_p = -D_UNICODE
142 endif
143 ifeq ($(MSLU),1)
144 __MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1
145 endif
146 ifeq ($(USE_CAIRO),1)
147 ____CAIRO_INCLUDEDIR_FILENAMES = -I$(CAIRO_ROOT)\include\cairo
148 endif
149 ifeq ($(SHARED),1)
150 __DLLFLAG_p = -DWXUSINGDLL
151 endif
152 ifeq ($(MONOLITHIC),0)
153 __WXLIB_CORE_p = \
154 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
155 endif
156 ifeq ($(MONOLITHIC),0)
157 __WXLIB_BASE_p = \
158 -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
159 endif
160 ifeq ($(MONOLITHIC),1)
161 __WXLIB_MONO_p = \
162 -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
163 endif
164 ifeq ($(USE_GUI),1)
165 __LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
166 endif
167 ifeq ($(USE_GUI),1)
168 __LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
169 endif
170 ifeq ($(USE_GUI),1)
171 __LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
172 endif
173 ifeq ($(MSLU),1)
174 __UNICOWS_LIB_p = -lunicows
175 endif
176 ifeq ($(USE_CAIRO),1)
177 __CAIRO_LIB_p = -lcairo
178 endif
179 ifeq ($(USE_CAIRO),1)
180 ____CAIRO_LIBDIR_FILENAMES = -L$(CAIRO_ROOT)\lib
181 endif
182 ifeq ($(BUILD),debug)
183 __OPTIMIZEFLAG = -O0
184 endif
185 ifeq ($(BUILD),release)
186 __OPTIMIZEFLAG = -O2
187 endif
188 ifeq ($(USE_RTTI),0)
189 __RTTIFLAG = -fno-rtti
190 endif
191 ifeq ($(USE_RTTI),1)
192 __RTTIFLAG =
193 endif
194 ifeq ($(USE_EXCEPTIONS),0)
195 __EXCEPTIONSFLAG = -fno-exceptions
196 endif
197 ifeq ($(USE_EXCEPTIONS),1)
198 __EXCEPTIONSFLAG =
199 endif
200 ifeq ($(BUILD),debug)
201 ifeq ($(DEBUG_INFO),default)
202 __DEBUGINFO = -g
203 endif
204 endif
205 ifeq ($(BUILD),release)
206 ifeq ($(DEBUG_INFO),default)
207 __DEBUGINFO =
208 endif
209 endif
210 ifeq ($(DEBUG_INFO),0)
211 __DEBUGINFO =
212 endif
213 ifeq ($(DEBUG_INFO),1)
214 __DEBUGINFO = -g
215 endif
216 ifeq ($(USE_THREADS),0)
217 __THREADSFLAG =
218 endif
219 ifeq ($(USE_THREADS),1)
220 __THREADSFLAG = -mthreads
221 endif
222
223
224 all: $(OBJS)
225 $(OBJS):
226 -if not exist $(OBJS) mkdir $(OBJS)
227
228 ### Targets: ###
229
230 all: $(OBJS)\my_dll.dll $(__wx_exe___depname) $(OBJS)\sdk_exe.exe
231
232 clean:
233 -if exist $(OBJS)\*.o del $(OBJS)\*.o
234 -if exist $(OBJS)\*.d del $(OBJS)\*.d
235 -if exist $(OBJS)\my_dll.dll del $(OBJS)\my_dll.dll
236 -if exist $(OBJS)\libmy_dll.a del $(OBJS)\libmy_dll.a
237 -if exist $(OBJS)\wx_exe.exe del $(OBJS)\wx_exe.exe
238 -if exist $(OBJS)\sdk_exe.exe del $(OBJS)\sdk_exe.exe
239
240 $(OBJS)\my_dll.dll: $(MY_DLL_OBJECTS)
241 $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(MY_DLL_OBJECTS) -Wl,--out-implib=$(OBJS)\libmy_dll.a $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__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) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet
242
243 ifeq ($(SHARED),0)
244 $(OBJS)\wx_exe.exe: $(WX_EXE_OBJECTS) $(OBJS)\wx_exe_sample_rc.o $(OBJS)\my_dll.dll
245 $(CXX) -o $@ $(WX_EXE_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(OBJS)\libmy_dll.a $(__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) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet
246 endif
247
248 $(OBJS)\sdk_exe.exe: $(SDK_EXE_OBJECTS) $(OBJS)\my_dll.dll
249 $(CXX) -o $@ $(SDK_EXE_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -Wl,--subsystem,windows -mwindows $(LDFLAGS) $(OBJS)\libmy_dll.a -luser32
250
251 $(OBJS)\my_dll_my_dll.o: ./my_dll.cpp
252 $(CXX) -c -o $@ $(MY_DLL_CXXFLAGS) $(CPPDEPS) $<
253
254 $(OBJS)\wx_exe_sample_rc.o: ./../../samples/sample.rc
255 windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__NDEBUG_DEFINE_p_3) $(__EXCEPTIONS_DEFINE_p_3) $(__RTTI_DEFINE_p_3) $(__THREAD_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) $(__MSLU_DEFINE_p_3) --include-dir $(SETUPHDIR) --include-dir ./../../include $(__CAIRO_INCLUDEDIR_p_1) --include-dir . $(__DLLFLAG_p_3) --include-dir ./../../samples --define NOPCH
256
257 $(OBJS)\wx_exe_wx_exe.o: ./wx_exe.cpp
258 $(CXX) -c -o $@ $(WX_EXE_CXXFLAGS) $(CPPDEPS) $<
259
260 $(OBJS)\sdk_exe_sdk_exe.o: ./sdk_exe.cpp
261 $(CXX) -c -o $@ $(SDK_EXE_CXXFLAGS) $(CPPDEPS) $<
262
263 .PHONY: all clean
264
265
266 SHELL := $(COMSPEC)
267
268 # Dependencies tracking:
269 -include $(OBJS)/*.d