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