Applied patch [ 1355355 ] Replace GPLed code in penguin sample and add features
[wxWidgets.git] / samples / opengl / penguin / makefile.gcc
1 # =========================================================================
2 #     This makefile was generated by
3 #     Bakefile 0.1.9 (http://bakefile.sourceforge.net)
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
16 WX_RELEASE_NODOT = 27
17 OBJS = \
18         gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
19 LIBDIRNAME = .\..\..\..\lib\gcc_$(LIBTYPE_SUFFIX)$(CFG)
20 SETUPHDIR = \
21         $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
22 PENGUIN_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG) \
23         $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
24         $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
25         $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
26         -I.\..\..\..\include -I$(SETUPHDIR) -W -Wall -I. $(__DLLFLAG_p) \
27         -I.\..\..\..\samples -DNOPCH $(CPPFLAGS) $(CFLAGS)
28 PENGUIN_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG) \
29         $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
30         $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
31         $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
32         -I.\..\..\..\include -I$(SETUPHDIR) -W -Wall -I. $(__DLLFLAG_p) \
33         -I.\..\..\..\samples -DNOPCH $(__RTTIFLAG_5) $(__EXCEPTIONSFLAG_6) \
34         -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
35 PENGUIN_OBJECTS =  \
36         $(OBJS)\penguin_penguin.o \
37         $(OBJS)\penguin_dxfrenderer.o \
38         $(OBJS)\penguin_trackball.o \
39         $(OBJS)\penguin_penguin_rc.o
40
41 ### Conditionally set variables: ###
42
43 ifeq ($(GCC_VERSION),2.95)
44 GCCFLAGS = -fvtable-thunks
45 endif
46 ifeq ($(USE_GUI),0)
47 PORTNAME = base
48 endif
49 ifeq ($(USE_GUI),1)
50 PORTNAME = msw
51 endif
52 ifeq ($(BUILD),debug)
53 ifeq ($(DEBUG_FLAG),default)
54 WXDEBUGFLAG = d
55 endif
56 endif
57 ifeq ($(DEBUG_FLAG),1)
58 WXDEBUGFLAG = d
59 endif
60 ifeq ($(UNICODE),1)
61 WXUNICODEFLAG = u
62 endif
63 ifeq ($(WXUNIV),1)
64 WXUNIVNAME = univ
65 endif
66 ifeq ($(SHARED),1)
67 WXDLLFLAG = dll
68 endif
69 ifeq ($(SHARED),0)
70 LIBTYPE_SUFFIX = lib
71 endif
72 ifeq ($(SHARED),1)
73 LIBTYPE_SUFFIX = dll
74 endif
75 ifeq ($(MONOLITHIC),0)
76 EXTRALIBS_FOR_BASE = 
77 endif
78 ifeq ($(MONOLITHIC),1)
79 EXTRALIBS_FOR_BASE =  
80 endif
81 ifeq ($(USE_OPENGL),1)
82 __penguin___depname = $(OBJS)\penguin.exe
83 endif
84 ifeq ($(BUILD),debug)
85 __OPTIMIZEFLAG_2 = -O0
86 endif
87 ifeq ($(BUILD),release)
88 __OPTIMIZEFLAG_2 = -O2
89 endif
90 ifeq ($(USE_RTTI),0)
91 __RTTIFLAG_5 = -fno-rtti
92 endif
93 ifeq ($(USE_RTTI),1)
94 __RTTIFLAG_5 = 
95 endif
96 ifeq ($(USE_EXCEPTIONS),0)
97 __EXCEPTIONSFLAG_6 = -fno-exceptions
98 endif
99 ifeq ($(USE_EXCEPTIONS),1)
100 __EXCEPTIONSFLAG_6 = 
101 endif
102 ifeq ($(WXUNIV),1)
103 __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
104 endif
105 ifeq ($(WXUNIV),1)
106 __WXUNIV_DEFINE_p_1 = --define __WXUNIVERSAL__
107 endif
108 ifeq ($(BUILD),debug)
109 ifeq ($(DEBUG_FLAG),default)
110 __DEBUG_DEFINE_p = -D__WXDEBUG__
111 endif
112 endif
113 ifeq ($(DEBUG_FLAG),1)
114 __DEBUG_DEFINE_p = -D__WXDEBUG__
115 endif
116 ifeq ($(BUILD),debug)
117 ifeq ($(DEBUG_FLAG),default)
118 __DEBUG_DEFINE_p_1 = --define __WXDEBUG__
119 endif
120 endif
121 ifeq ($(DEBUG_FLAG),1)
122 __DEBUG_DEFINE_p_1 = --define __WXDEBUG__
123 endif
124 ifeq ($(USE_EXCEPTIONS),0)
125 __EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
126 endif
127 ifeq ($(USE_EXCEPTIONS),0)
128 __EXCEPTIONS_DEFINE_p_1 = --define wxNO_EXCEPTIONS
129 endif
130 ifeq ($(USE_RTTI),0)
131 __RTTI_DEFINE_p = -DwxNO_RTTI
132 endif
133 ifeq ($(USE_RTTI),0)
134 __RTTI_DEFINE_p_1 = --define wxNO_RTTI
135 endif
136 ifeq ($(USE_THREADS),0)
137 __THREAD_DEFINE_p = -DwxNO_THREADS
138 endif
139 ifeq ($(USE_THREADS),0)
140 __THREAD_DEFINE_p_1 = --define wxNO_THREADS
141 endif
142 ifeq ($(UNICODE),1)
143 __UNICODE_DEFINE_p = -D_UNICODE
144 endif
145 ifeq ($(UNICODE),1)
146 __UNICODE_DEFINE_p_1 = --define _UNICODE
147 endif
148 ifeq ($(MSLU),1)
149 __MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1
150 endif
151 ifeq ($(MSLU),1)
152 __MSLU_DEFINE_p_1 = --define wxUSE_UNICODE_MSLU=1
153 endif
154 ifeq ($(SHARED),1)
155 __DLLFLAG_p = -DWXUSINGDLL
156 endif
157 ifeq ($(SHARED),1)
158 __DLLFLAG_p_1 = --define WXUSINGDLL
159 endif
160 ifeq ($(MONOLITHIC),0)
161 __WXLIB_CORE_p = \
162         -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
163 endif
164 ifeq ($(MONOLITHIC),0)
165 __WXLIB_BASE_p = \
166         -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
167 endif
168 ifeq ($(MONOLITHIC),1)
169 __WXLIB_MONO_p = \
170         -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
171 endif
172 ifeq ($(USE_GUI),1)
173 __LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
174 endif
175 ifeq ($(USE_GUI),1)
176 __LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
177 endif
178 ifeq ($(USE_GUI),1)
179 __LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
180 endif
181 ifeq ($(MSLU),1)
182 __UNICOWS_LIB_p = -lunicows
183 endif
184 ifeq ($(BUILD),debug)
185 ifeq ($(DEBUG_INFO),default)
186 __DEBUGINFO = -g
187 endif
188 endif
189 ifeq ($(BUILD),release)
190 ifeq ($(DEBUG_INFO),default)
191 __DEBUGINFO = 
192 endif
193 endif
194 ifeq ($(DEBUG_INFO),0)
195 __DEBUGINFO = 
196 endif
197 ifeq ($(DEBUG_INFO),1)
198 __DEBUGINFO = -g
199 endif
200 ifeq ($(USE_THREADS),0)
201 __THREADSFLAG = 
202 endif
203 ifeq ($(USE_THREADS),1)
204 __THREADSFLAG = -mthreads
205 endif
206
207
208 all: $(OBJS)
209 $(OBJS):
210         -if not exist $(OBJS) mkdir $(OBJS)
211
212 ### Targets: ###
213
214 all: $(__penguin___depname) data
215
216 clean: 
217         -if exist $(OBJS)\*.o del $(OBJS)\*.o
218         -if exist $(OBJS)\*.d del $(OBJS)\*.d
219         -if exist $(OBJS)\penguin.exe del $(OBJS)\penguin.exe
220
221 ifeq ($(USE_OPENGL),1)
222 $(OBJS)\penguin.exe: $(PENGUIN_OBJECTS) $(OBJS)\penguin_penguin_rc.o
223         $(CXX) -o $@ $(PENGUIN_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows  -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 -lglu32 $(__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) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
224 endif
225
226 data: 
227         if not exist $(OBJS) mkdir $(OBJS)
228         for %%f in (penguin.dxf.gz) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS)
229
230 $(OBJS)\penguin_penguin.o: ./penguin.cpp
231         $(CXX) -c -o $@ $(PENGUIN_CXXFLAGS) $(CPPDEPS) $<
232
233 $(OBJS)\penguin_dxfrenderer.o: ./dxfrenderer.cpp
234         $(CXX) -c -o $@ $(PENGUIN_CXXFLAGS) $(CPPDEPS) $<
235
236 $(OBJS)\penguin_trackball.o: ./trackball.c
237         $(CC) -c -o $@ $(PENGUIN_CFLAGS) $(CPPDEPS) $<
238
239 $(OBJS)\penguin_penguin_rc.o: ./penguin.rc
240         windres --use-temp-file -i$< -o$@   --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) --include-dir ./../../../include --include-dir $(SETUPHDIR) --include-dir . $(__DLLFLAG_p_1) --include-dir ./../../../samples --define NOPCH
241
242 .PHONY: all clean data
243
244
245 # Dependencies tracking:
246 -include $(OBJS)/*.d