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