]>
Commit | Line | Data |
---|---|---|
75515c52 | 1 | # |
2bda0e17 KB |
2 | # makeg95.env |
3 | # Common makefile settings for wxWindows programs | |
014e19de | 4 | # This file is included by all the other makefiles, thus changes |
2bda0e17 | 5 | # made here take effect everywhere (except where overriden). |
f3ef286f | 6 | # The settings are for GnuWin32-derived compilers, i.e. Cygwin and Mingw32. |
2bda0e17 | 7 | # |
102f951d GRG |
8 | # Customize this file to match your own settings. |
9 | # | |
75515c52 GRG |
10 | # CVS_ID: $Id$ |
11 | # | |
f3ef286f | 12 | |
78e376b5 MB |
13 | # The MINGW32 and MINGW32VERSION variables are preconfigured for |
14 | # MinGW gcc version 3.x and must both be changed for any version | |
15 | # earlier than 3.0 or for cygwin. Editing this file is one way to | |
16 | # change them. An easier way, at least with GNU make, is to override | |
17 | # them on the command line, e.g. | |
18 | # make MINGW32=0 MINGW32VERSION=2.8 -f makefile.g95 | |
19 | ||
20 | # If using Mingw32 (any version), set this to 1. | |
21 | # If using Cygwin (any version), set this to 0. | |
22 | # | |
23 | # This agrees with the instructions given in docs/msw/install.txt . | |
24 | # Earlier versions of this makefile suggested setting MINGW32=1 for | |
25 | # recent versions of cygwin, but that would give the wrong dll entry | |
26 | # point in src/msw/makefile.g95 . | |
27 | # | |
28 | # With cygwin, there are still some problems compiling wxWindows | |
29 | # this way; './configure && make' may work better. | |
30 | # | |
741f371c | 31 | MINGW32=1 |
1a7f3062 | 32 | |
b994671d MB |
33 | # set MIN_SUFFIX to nothing if you use only MinGW compiler, set it to |
34 | # something MinGW-specific if you want to build wxWindows with more than one | |
35 | # compiler | |
36 | ifeq ($(MINGW32),1) | |
37 | MIN_SUFFIX=_min | |
38 | else | |
39 | MIN_SUFFIX=_cyg | |
40 | endif | |
41 | ||
78e376b5 MB |
42 | # Set to your gcc version. Generally 'gcc --version' tells you |
43 | # which version you have. But it cannot distinguish between | |
44 | # 2.95.2-1 and earlier suffix versions of 2.95 . In that case, | |
45 | # inspect the dates of bin/gcc.exe and bin/ld.exe ; if they | |
46 | # are at least | |
47 | # 2000-01-21 for gcc.exe and | |
48 | # 2000-02-04 for ld.exe | |
49 | # then use '2.95-late'. | |
50 | # | |
51 | # gcc 2.8.x and earlier require struct-return workaround | |
52 | #MINGW32VERSION=2.8 | |
53 | # | |
54 | # gcc 2.95.2 and earlier requires special thunk option | |
55 | #MINGW32VERSION=2.9-early | |
56 | # | |
57 | # mingw gcc-2.95.2-1 supports '-shared' | |
58 | # windres provided with gcc-2.95.2-1 supports temp file option | |
59 | #MINGW32VERSION=2.95-late | |
60 | # | |
61 | # gcc 3.x provides a win32api.h header | |
fe5de1ea | 62 | MINGW32VERSION=3.0 |
2bda0e17 | 63 | |
5283098e JS |
64 | # If you want to compile on Wine, simply uncomment this variable |
65 | # If you don't want to edit the file, you can simply define it | |
66 | # on the command line like so: make WINE=1 -f makefile.g95 | |
67 | #WINE=1 | |
68 | ||
78e376b5 MB |
69 | # If we're using MSYS, or other utilities that use forward slashes, |
70 | # you need to set this when invoking the makefile from DOS, or the | |
71 | # wrong separators will be assumed. However, if you're using MSYS, | |
72 | # you really ought to invoke the makefile from MSYS--or, even better, | |
73 | # use the './configure && make' technique that MSYS is designed for. | |
5283098e | 74 | ifndef WINE |
8a653baa | 75 | #OSTYPE=msys |
5283098e JS |
76 | else |
77 | OSTYPE=msys | |
78 | endif | |
2b5f62a0 | 79 | |
75515c52 | 80 | # If building DLL, the version |
35af98e4 | 81 | include $(WXDIR)/src/version.mak |
34b6a45a | 82 | WXVERSION=$(wxMAJOR_VERSION)$(wxMINOR_VERSION)$(wxRELEASE_NUMBER_IFUNSTABLE) |
b3bd664a MB |
83 | |
84 | ifndef UNICODE | |
c448540d MB |
85 | UNICODE=0 |
86 | endif | |
87 | ||
88 | ifndef FINAL | |
8a653baa | 89 | FINAL=0 |
c448540d MB |
90 | endif |
91 | ||
92 | ifndef wxUSE_GUI | |
93 | wxUSE_GUI=1 | |
b3bd664a | 94 | endif |
75515c52 | 95 | |
102f951d GRG |
96 | # Set to the appropriate remove command (must support forward slashes) |
97 | # You can get a suitable rm.exe from ports/mingw32/extra.zip on the ftp site. | |
014e19de | 98 | RM=rm -f |
6474416b | 99 | |
102f951d | 100 | # Set to the appropriate copy command (must support forward slashes) |
a20a10fe JS |
101 | # You can get a suitable cp.exe from ports/mingw32/extra.zip on the ftp site. |
102 | COPY=cp | |
01dba85a | 103 | |
2bda0e17 KB |
104 | ########################## Compiler ################################## |
105 | ||
78e376b5 MB |
106 | ifneq (,$(findstring $(MINGW32VERSION),2.8)) |
107 | # According to Guillermo Rodriguez Garcia <guille@iies.es>, the | |
108 | # -fno-pcc-struct-return option is needed to make the standard div() | |
109 | # function work - otherwise it returns absolutely incorrect results | |
110 | # which breaks the wxImage class. This was fixed on 1998-08-14 for | |
111 | # mingw and cygwin. It is preferable not to use this option where it | |
112 | # is not required, because it is documented to cause binary API | |
113 | # incompatibility. | |
114 | _STRUCT_RETURN_WORKAROUND=-fno-pcc-struct-return | |
115 | # Really old versions of cygwin are thought to require extra headers. | |
116 | ifneq ($(MINGW32),1) | |
117 | GNUWIN32EXTRA=-I$(WXDIR)/include/wx/msw/gnuwin32 | |
118 | endif | |
119 | endif | |
f3ef286f | 120 | |
78e376b5 MB |
121 | ifneq (,$(findstring $(MINGW32VERSION),2.8 2.9-early)) |
122 | # Earlier versions of this makefile defined the following macros | |
123 | # explicitly; mingw versions since at least '2.95-late' define | |
124 | # them already. | |
125 | OBSOLETE_DEFINES = -D_X86_=1 -DWIN32 -D_WIN32 -D__WIN32__ | |
5991550a | 126 | endif |
78e376b5 MB |
127 | # But cygwin doesn't define them, at least through its version |
128 | # 2.95.3-4 of gcc. | |
129 | ifneq ($(MINGW32),1) | |
130 | OBSOLETE_DEFINES = -D_X86_=1 -DWIN32 -D_WIN32 -D__WIN32__ | |
5991550a | 131 | endif |
46c0c2dc | 132 | |
78e376b5 MB |
133 | ifneq (,$(findstring $(MINGW32VERSION),2.8 2.9-early 2.95-late)) |
134 | # Versions prior to 3.0 require -fvtable-thunks for OLE support. | |
135 | # All code must be built with this option, even C++ libraries you | |
136 | # only link to, including system libraries. This option can cause | |
137 | # subtle problems with multiple inheritance. | |
138 | _THUNK_WORKAROUND=-fvtable-thunks | |
f3ef286f | 139 | endif |
2bda0e17 | 140 | |
78e376b5 MB |
141 | ifeq (,$(findstring $(MINGW32VERSION),2.8 2.9-early)) |
142 | # Versions since 2.95.2-1 support '-shared', which makes linking | |
143 | # a dll *much* faster; and the accompanying windres supports | |
144 | # '--use-temp-file', which is more robust. | |
145 | LD_SUPPORTS_SHARED=yes | |
146 | _USE_TEMP_FILE_IF_SUPPORTED=--use-temp-file | |
147 | # Use the WIN32 wxDirDialog only if we have a recent mingw version | |
148 | RECENT_MINGW=yes | |
149 | endif | |
150 | ||
151 | ifeq (,$(findstring $(MINGW32VERSION),2.8 2.9-early 2.95-late)) | |
152 | # Versions since 3.0 provide win32api.h . An old comment said to | |
153 | # define this 'if you have w32api >= 0.5', but mingw 2.95.2-1 | |
154 | # has no such header. | |
5283098e | 155 | ifndef WINE |
78e376b5 | 156 | _USE_W32API_HEADER_IF_SUPPORTED = -DHAVE_W32API_H |
5283098e | 157 | endif |
78e376b5 MB |
158 | # |
159 | # Revision 1.70.2.6 of this file suggested '--pipe' for mingw but | |
160 | # not for cygwin, and only for version 3.0 or later. Since then, | |
161 | # the advice given here | |
162 | # http://mail.gnu.org/pipermail/autoconf/2000-July/005479.html | |
163 | # is followed, and '--pipe' is not used unless you specify it on | |
164 | # the make command line, e.g. | |
165 | # make CXXFLAGS=--pipe CFLAGS=--pipe -f makefile.g95 | |
166 | # | |
167 | endif | |
168 | ||
5283098e JS |
169 | # Define the C++ and C compiler respectively |
170 | ifndef WINE | |
78e376b5 | 171 | CXX = g++ |
78e376b5 | 172 | CC = gcc |
5283098e JS |
173 | else |
174 | CXX = wineg++ | |
175 | CC = winegcc | |
176 | endif | |
2bda0e17 KB |
177 | |
178 | # Compiler used for LEX generated C | |
78e376b5 MB |
179 | # For now at least, it can be the same as the regular C compiler |
180 | CCLEX = $(CC) | |
2bda0e17 | 181 | |
102f951d GRG |
182 | # This shouldn't be needed as make is supposed to define this |
183 | # variable itself. Uncomment it if your make complains. | |
184 | #MAKE=make | |
2bda0e17 | 185 | |
102f951d | 186 | # LEX (currently unused) |
78e376b5 | 187 | # LEX=flex # -t -L |
2bda0e17 | 188 | |
102f951d | 189 | # YACC (currently unused) |
78e376b5 MB |
190 | # YACC=byacc |
191 | # YACC=bison | |
2bda0e17 | 192 | |
57c208c5 | 193 | # Settings for Cyginw/Mingw32 |
102f951d GRG |
194 | # Some versions of windres cannot cope with the --preprocessor |
195 | # option. Uncomment the RCPREPROCESSOR line below if yours can. | |
5283098e | 196 | ifndef WINE |
78e376b5 | 197 | RESCOMP=windres $(_USE_TEMP_FILE_IF_SUPPORTED) |
5283098e JS |
198 | else |
199 | RESCOMP=wrc | |
200 | endif | |
57c208c5 JS |
201 | RCINPUTSWITCH=-i |
202 | RCOUTPUTSWITCH=-o | |
203 | RCINCSWITCH=--include-dir | |
204 | RCDEFSWITCH=--define | |
9f334bea JS |
205 | # Note that this can cause windres to fail (Win95/98 problem?) |
206 | # but commenting out RCPREPROCESSOR then does the trick. | |
78e376b5 | 207 | #RCPREPROCESSOR=--preprocessor "$(CXX) -c -E -xc-header -DRC_INVOKED" |
2bda0e17 | 208 | |
f4bfe7e0 JS |
209 | # Don't make this too long (e.g. by adding contrib/include/wx) because it will |
210 | # truncate the command line | |
53fdeb16 | 211 | RESFLAGS=$(RCPREPROCESSOR) $(RCINCSWITCH) $(WXDIR)/include $(RCEXTRAINC) $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) __WIN95__ $(RCDEFSWITCH) __GNUWIN32__ |
2bda0e17 | 212 | |
75515c52 | 213 | # Needed to build a DLL if your linker does not support --shared option. |
8a653baa JS |
214 | AS = as |
215 | DLLTOOL = dlltool | |
75515c52 | 216 | |
2bda0e17 KB |
217 | ########################## Compiler flags ############################# |
218 | ||
e13f1288 MB |
219 | # Unicode defines |
220 | ifeq ($(UNICODE),1) | |
221 | UNICODE_OPT = -D_UNICODE -DUNICODE -DwxUSE_UNICODE=1 | |
222 | else | |
223 | UNICODE_OPT = | |
224 | endif | |
225 | ||
2bda0e17 | 226 | # Miscellaneous compiler options |
78e376b5 | 227 | OPTIONS = -DSTRICT $(_USE_W32API_HEADER_IF_SUPPORTED) |
2bda0e17 | 228 | |
a0b9e27f | 229 | # Add "-mthreads" if you want to have threads under mingw32 |
2e38557f | 230 | # Add "-mno-cygwin" if you want to link with msvcrt.dll in Cywin and Wine |
d66dcb60 MB |
231 | # Otherwise, you link against the native runtime (cygwin.dll |
232 | # or libc). Having the flag in mingw32 does not hurt as you | |
233 | # always link against msvcrt.dll By default it should be on, | |
234 | # to minimize dependencies on Cygwin, and have more correct | |
235 | # filename behaviour in Wine. | |
2e38557f | 236 | COMMON_FLAGS = -mno-cygwin # -mthreads |
a0b9e27f | 237 | |
2bda0e17 | 238 | # Debugging information |
c448540d MB |
239 | ifeq ($(FINAL),0) |
240 | DEBUGFLAGS = -g -D__WXDEBUG__ | |
241 | endif | |
2bda0e17 | 242 | |
2bda0e17 KB |
243 | WIN95=1 |
244 | ||
245 | ifeq ($(WIN95),0) | |
246 | # With 3.50, Win95 will use your existing icons to show smaller ones. | |
247 | # With 4.0, you'll have to follow Win95 procedures for icons or you'll get the | |
248 | # default Windows icon. | |
249 | APPVER=3.50 | |
78e376b5 | 250 | WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ # Generic WIN32 |
2bda0e17 | 251 | else |
102f951d | 252 | APPVER=4.0 # 3.50 |
78e376b5 | 253 | # This means 'enable Windows 95 features' (in wxWindows and in the compiler). |
d66dcb60 | 254 | WINVERSION=-DWINVER=0x0400 -D__GNUWIN32__ |
2bda0e17 KB |
255 | endif |
256 | ||
78e376b5 MB |
257 | # This is never used and should be expunged. |
258 | # CPU=i386 | |
2bda0e17 KB |
259 | |
260 | # Suffixes | |
261 | OBJSUFF=o | |
262 | SRCSUFF=cpp | |
263 | LIBPREFIX=lib | |
264 | LIBSUFF=a | |
265 | EXESUFF=.exe | |
266 | RESSUFF=res | |
267 | RSCSUFF=rsc | |
268 | ||
269 | # Warnings | |
2bda0e17 KB |
270 | WARN = -Wall |
271 | ||
c448540d MB |
272 | # build wxbase/wxMSW |
273 | ifeq ($(wxUSE_GUI),1) | |
274 | TOOLKIT=msw | |
d66dcb60 | 275 | GUI = |
c448540d MB |
276 | else |
277 | TOOLKIT=base | |
d66dcb60 | 278 | GUI = -DwxUSE_GUI=0 |
c448540d MB |
279 | endif |
280 | ||
c448540d | 281 | ifeq ($(FINAL),1) |
78e376b5 | 282 | OPT = -O2 -fno-rtti -fno-exceptions |
c448540d | 283 | else |
78e376b5 | 284 | OPT = -fno-rtti -fno-exceptions |
c448540d | 285 | endif |
2bda0e17 KB |
286 | |
287 | # Options for ar archiver | |
2bda0e17 | 288 | AROPTIONS = ruv |
78e376b5 | 289 | AR = ar |
8a653baa | 290 | RANLIB = ranlib |
2bda0e17 | 291 | |
b4fe5125 JS |
292 | # Extra compiler libraries |
293 | COMPLIBS= | |
2bda0e17 KB |
294 | |
295 | # Compiler or system-specific include paths | |
48d1144b | 296 | COMPPATHS= |
2bda0e17 | 297 | |
2bda0e17 KB |
298 | ########################## Directories ############################### |
299 | ||
ae090fdb | 300 | OLELIBS=-lole32 -loleaut32 -luuid |
c448540d MB |
301 | BASELIBS=-lstdc++ -lgcc -lodbc32 -lwsock32 |
302 | ifeq ($(wxUSE_GUI),1) | |
303 | WINLIBS= $(BASELIBS) \ | |
d66dcb60 MB |
304 | -lwinspool -lwinmm -lshell32 \ |
305 | -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 \ | |
306 | -lodbc32 -lwsock32 -lopengl32 -lglu32 $(OLELIBS) # -loldnames | |
c448540d MB |
307 | else |
308 | WINLIBS=$(BASELIBS) | |
309 | endif | |
b4fe5125 JS |
310 | |
311 | #WINLIBS=-lstdc++ -lgcc \ | |
d66dcb60 | 312 | # -lwinspool -lwinmm -lshell32 \ |
b4fe5125 | 313 | # -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 # -loldnames |
2bda0e17 KB |
314 | |
315 | # Shouldn't need to change these... | |
6a570331 RR |
316 | WXSRC=$(WXDIR)/src/msw |
317 | WXINC=$(WXDIR)/include | |
318 | WXBASESRC=$(WXDIR)/src/common | |
f3ef286f | 319 | |
f6a35171 | 320 | #ifeq ($(MINGW32),1) |
9d8c2f41 | 321 | #INC = -I$(WXINC) -I$(WXDIR)/contrib/include -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib -I$(WXDIR)/src/tiff $(EXTRAINC) $(COMPPATHS) |
f6a35171 | 322 | #else |
78e376b5 | 323 | INC = -I$(WXDIR)/lib/$(TOOLKIT)$(INCEXT) -I$(WXINC) -I$(WXDIR)/contrib/include -I$(WXDIR)/src/regex -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib -I$(WXDIR)/src/tiff $(EXTRAINC) $(COMPPATHS) $(GNUWIN32EXTRA) |
f6a35171 | 324 | #endif |
f3ef286f | 325 | |
78e376b5 | 326 | RCLFLAGS=-cpp "cpp -lang-c++ $(OBSOLETE_DEFINES) -DRCL_INVOKED -I$(WXWIN)/include" |
2bda0e17 | 327 | |
75515c52 GRG |
328 | ifdef WXUSINGDLL |
329 | # png, jpeg, etc are exported from wx dll, so skip and save on link time. | |
711df835 | 330 | LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(COMPLIBS) |
75515c52 | 331 | else |
b994671d | 332 | LIBS = $(EXTRALIBS) $(WXLIB) -lregex$(MIN_SUFFIX) -lpng$(MIN_SUFFIX) -ljpeg$(MIN_SUFFIX) -lzlib$(MIN_SUFFIX) -ltiff$(MIN_SUFFIX) $(WINLIBS) $(COMPLIBS) |
75515c52 | 333 | endif |
2bda0e17 | 334 | |
78e376b5 | 335 | WINFLAGS = $(OBSOLETE_DEFINES) $(WINVERSION) |
2bda0e17 KB |
336 | |
337 | #for windows 95 | |
338 | XINCLUDE=$(WINFLAGS) | |
339 | XLIB=$(LIBS) | |
340 | LDLIBS = $(LIBS) | |
341 | ||
342 | # Directory for object files (don't change) | |
dbda9e86 | 343 | # OBJDIR = objects$(GUISUFFIX) |
881eba2c | 344 | OBJDIR = . |
2bda0e17 | 345 | |
c448540d MB |
346 | ifeq ($(FINAL),1) |
347 | DEBEXT= | |
348 | else | |
349 | DEBEXT=d | |
350 | endif | |
351 | ||
b3bd664a MB |
352 | ifeq ($(UNICODE),1) |
353 | UNIEXT=u | |
354 | else | |
355 | UNIEXT= | |
356 | endif | |
357 | ||
358 | ifeq ($(WXMAKINGDLL)$(WXUSINGDLL),) | |
c448540d | 359 | INCEXT=$(UNIEXT)$(DEBEXT) |
b3bd664a | 360 | else |
c448540d | 361 | INCEXT=dll$(UNIEXT)$(DEBEXT) |
b3bd664a MB |
362 | endif |
363 | ||
c448540d MB |
364 | WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx$(TOOLKIT)$(UNIEXT)$(DEBEXT).$(LIBSUFF) |
365 | ||
75515c52 GRG |
366 | ifdef WXMAKINGDLL |
367 | EXTRADLLFLAGS = -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1 | |
b994671d | 368 | WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx$(TOOLKIT)$(WXVERSION)$(UNIEXT)$(DEBEXT)$(MIN_SUFFIX).$(LIBSUFF) |
75515c52 GRG |
369 | endif |
370 | ||
371 | ifdef WXUSINGDLL | |
372 | EXTRADLLFLAGS = -DWXUSINGDLL=1 | |
b994671d | 373 | WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx$(TOOLKIT)$(WXVERSION)$(UNIEXT)$(DEBEXT)$(MIN_SUFFIX).$(LIBSUFF) |
75515c52 GRG |
374 | endif |
375 | ||
376 | ||
c448540d | 377 | ifeq ($(wxUSE_GUI),1) |
78e376b5 MB |
378 | WINDOWSLDFLAGS=-Wl,--subsystem,windows |
379 | WINDOWSLDLIBS=-mwindows | |
c448540d | 380 | endif |
2bda0e17 | 381 | |
78e376b5 MB |
382 | # Note: WIN32_LEAN_AND_MEAN is defined only for C and not for C++ compiles. |
383 | # Defining this macro means that a great deal of less commonly used stuff | |
384 | # is ignored in the windows headers, resulting in faster compiles. It can't | |
385 | # be used with some C++ source files. It just so happens that it can be | |
386 | # used with all C source files. | |
387 | ||
388 | CFLAGS = -DWIN32_LEAN_AND_MEAN | |
389 | ||
390 | WXLIBDIRS = -L$(WXDIR)/lib -L$(WXDIR)/contrib/lib | |
391 | ||
392 | # You shouldn't need to change these flags, which are merely composed of | |
393 | # the options selected above. You can add more flags by specifying them on | |
394 | # the make command line, e.g. | |
395 | # make CXXFLAGS='-O3 -march=i686' -f makefile.g95 | |
396 | # The gnu make manual says | |
397 | # 'Users expect to be able to specify CFLAGS freely themselves' | |
398 | # That was unsafe with older versions of this makefile, but now it works. | |
399 | # | |
400 | # C preprocessor flags | |
401 | # Some makefiles pass extra flags in $(EXTRACPPFLAGS); although earlier | |
402 | # versions of this file used CPPFLAGS as C++ compiler flags (instead of | |
403 | # as C preprocessor flags), it is OK to add them to the preprocessor | |
404 | # flags, which are always used for C++ compiles. Because other makefiles | |
405 | # use this method to override these flags, they are added after $(CPPFLAGS), | |
406 | # which would normally come last. | |
407 | ALL_CPPFLAGS = $(XINCLUDE) $(INC) $(CPPFLAGS) $(EXTRACPPFLAGS) | |
408 | # C and C++ compiler flags for compatibility with old gcc versions | |
409 | REQUIRED_GCC_FLAGS = $(_STRUCT_RETURN_WORKAROUND) $(_THUNK_WORKAROUND) | |
410 | # C++ compiler flags | |
2e38557f | 411 | ALL_CXXFLAGS = $(COMMON_FLAGS) $(REQUIRED_GCC_FLAGS) $(UNICODE_OPT) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRADLLFLAGS) $(CXXFLAGS) |
78e376b5 | 412 | # C compiler flags |
2e38557f | 413 | ALL_CFLAGS = $(COMMON_FLAGS) $(REQUIRED_GCC_FLAGS) $(UNICODE_OPT) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRADLLFLAGS) $(CFLAGS) |
78e376b5 | 414 | # Linker flags |
2e38557f | 415 | ALL_LDFLAGS = $(COMMON_FLAGS) $(WINDOWSLDFLAGS) $(WINDOWSLDLIBS) $(WXLIBDIRS) $(EXTRALDFLAGS) $(LDFLAGS) |
78e376b5 | 416 | # under Cygwin, Dlls must not be linked with subsystem=windows |
2e38557f | 417 | ALL_LDFLAGS_DLL = $(COMMON_FLAGS) $(WINDOWSLDLIBS) $(WXLIBDIRS) $(EXTRALDFLAGS) $(LDFLAGS) |
78e376b5 | 418 | |
2b5f62a0 | 419 | .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .cxx .cc .c |
2bda0e17 KB |
420 | |
421 | .c.o: | |
78e376b5 | 422 | $(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -o $@ $*.c |
2bda0e17 | 423 | |
2b5f62a0 | 424 | .cc.o: |
78e376b5 | 425 | $(CXX) -c $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -o $@ $*.cc |
2b5f62a0 | 426 | |
e828e4f7 | 427 | .cxx.o: |
78e376b5 | 428 | $(CXX) -c $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -o $@ $*.cxx |
e828e4f7 | 429 | |
78e376b5 MB |
430 | # This '.cpp.o' rule is apparently written this way because |
431 | # the 'tmake' file g95.t expects it. | |
9b97ee33 | 432 | .$(SRCSUFF).$(OBJSUFF): |
78e376b5 | 433 | $(CXX) -c $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -o $@ $*.$(SRCSUFF) |