]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
1 | # makeg95.env |
2 | # Common makefile settings for wxWindows programs | |
3 | # This file is included by all the other makefiles, thus changes | |
4 | # made here take effect everywhere (except where overriden). | |
f3ef286f | 5 | # The settings are for GnuWin32-derived compilers, i.e. Cygwin and Mingw32. |
2bda0e17 | 6 | # |
f3ef286f JS |
7 | |
8 | # If using Cygwin, set this to 0. | |
9 | # If using Mingw32, set this to 1. | |
1a7f3062 JS |
10 | MINGW32=1 |
11 | ||
12 | # Set to the version you have | |
13 | MINGW32VERSION=2.95 | |
2bda0e17 | 14 | |
6474416b JS |
15 | # Set to the appropriate remove command |
16 | RM=rm -f | |
17 | ||
2bda0e17 KB |
18 | ########################## Compiler ################################## |
19 | ||
20 | # C++ compiler | |
f3ef286f JS |
21 | # Put a comment before --pipe for Cygwin, remove comment for Mingw32 2.95 |
22 | ||
23 | ifeq ($(MINGW32),1) | |
1a7f3062 JS |
24 | ifeq ($(MINGW32VERSION),2.95) |
25 | CC = gcc --pipe -fvtable-thunks | |
26 | else | |
27 | CC = gcc | |
28 | endif | |
f3ef286f | 29 | else |
1a7f3062 | 30 | CC = gcc |
f3ef286f | 31 | endif |
2bda0e17 KB |
32 | |
33 | # C compiler for pure C programs | |
2bda0e17 KB |
34 | CCC = $(CC) |
35 | ||
36 | # Compiler used for LEX generated C | |
8704bf74 | 37 | CCLEX=gcc |
2bda0e17 KB |
38 | |
39 | MAKE=make | |
40 | ||
41 | # LEX | |
8870c26e | 42 | LEX=flex # -t -L |
2bda0e17 | 43 | |
57c208c5 | 44 | # YACC. yacc or bison |
2662e49e RR |
45 | YACC=byacc |
46 | #YACC=bison | |
2bda0e17 | 47 | |
57c208c5 | 48 | # Settings for Cyginw/Mingw32 |
2bda0e17 | 49 | RESCOMP=windres.exe |
57c208c5 JS |
50 | RCINPUTSWITCH=-i |
51 | RCOUTPUTSWITCH=-o | |
52 | RCINCSWITCH=--include-dir | |
53 | RCDEFSWITCH=--define | |
2bda0e17 | 54 | |
6a570331 | 55 | RESFLAGS=$(RCINCSWITCH) $(WXDIR)/include $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) __WIN95__ $(RCDEFSWITCH) __GNUWIN32__ |
2bda0e17 KB |
56 | |
57 | ########################## Compiler flags ############################# | |
58 | ||
59 | # Miscellaneous compiler options | |
f3ef286f | 60 | OPTIONS= -DSTRICT # -D__MINGW32__ |
2bda0e17 KB |
61 | |
62 | # Debugging information | |
e4d18e7f | 63 | DEBUGFLAGS = -D__WXDEBUG__ |
2bda0e17 | 64 | |
2bda0e17 KB |
65 | WIN95=1 |
66 | ||
67 | ifeq ($(WIN95),0) | |
68 | # With 3.50, Win95 will use your existing icons to show smaller ones. | |
69 | # With 4.0, you'll have to follow Win95 procedures for icons or you'll get the | |
70 | # default Windows icon. | |
71 | APPVER=3.50 | |
72 | WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ -D__WIN32__ # Generic WIN32 | |
73 | else | |
74 | APPVER=3.50 # 4.0 | |
75 | # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0). | |
76 | WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ | |
77 | endif | |
78 | ||
79 | CPU=i386 | |
80 | ||
81 | # Suffixes | |
82 | OBJSUFF=o | |
83 | SRCSUFF=cpp | |
84 | LIBPREFIX=lib | |
85 | LIBSUFF=a | |
86 | EXESUFF=.exe | |
87 | RESSUFF=res | |
88 | RSCSUFF=rsc | |
89 | ||
90 | # Warnings | |
2bda0e17 KB |
91 | WARN = -Wall |
92 | ||
2bda0e17 | 93 | # Which GUI, -Dwx_xview or -Dwx_motif (don't change this) |
34138703 | 94 | GUI = -D__WXMSW__ -D__WINDOWS__ |
2bda0e17 | 95 | |
881eba2c GRG |
96 | # according to Guillermo Rodriguez Garcia <guille@iies.es> this flag is |
97 | # needed to make the standard div() function work - otherwise it returns | |
98 | # absolutely incorrect results and completely breaks the wxImage class | |
99 | # (where it's used extensively) | |
100 | # GRG: at least it is needed in mingw32-gcc2.8.1 | |
e4d18e7f | 101 | OPT = -fno-pcc-struct-return -O2 -fno-rtti -fno-exceptions |
2bda0e17 KB |
102 | |
103 | # Options for ar archiver | |
104 | # AROPTIONS = crs # For IRIX and Solaris (both SYSVR4). | |
105 | AROPTIONS = ruv | |
106 | RANLIB = ranlib | |
2bda0e17 | 107 | |
b4fe5125 JS |
108 | # Extra compiler libraries |
109 | COMPLIBS= | |
2bda0e17 KB |
110 | |
111 | # Compiler or system-specific include paths | |
48d1144b | 112 | COMPPATHS= |
2bda0e17 | 113 | |
2bda0e17 KB |
114 | ########################## Directories ############################### |
115 | ||
2bda0e17 | 116 | WINLIBS=-lstdc++ -lgcc \ |
8870c26e | 117 | -lwinspool -lwinmm -lshell32 \ |
b4fe5125 JS |
118 | -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 \ |
119 | -lole32 -loleaut32 -luuid \ | |
120 | -lodbc32 -lwsock32# -loldnames | |
121 | ||
122 | #WINLIBS=-lstdc++ -lgcc \ | |
123 | # -lwinspool -lwinmm -lshell32 \ | |
124 | # -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 # -loldnames | |
2bda0e17 KB |
125 | |
126 | # Shouldn't need to change these... | |
6a570331 RR |
127 | WXSRC=$(WXDIR)/src/msw |
128 | WXINC=$(WXDIR)/include | |
129 | WXBASESRC=$(WXDIR)/src/common | |
130 | WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF) | |
f3ef286f | 131 | |
1a7f3062 JS |
132 | GNUWIN32EXTRA=-I$(WXDIR)/include/wx/msw/gnuwin32 |
133 | ||
134 | ifeq ($(MINGW32),1) | |
135 | ifeq ($(MINGW32),2.95) | |
136 | GNUWIN32EXTRA= | |
137 | endif | |
138 | endif | |
139 | ||
f3ef286f JS |
140 | ifeq ($(MINGW32),1) |
141 | INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS) | |
142 | else | |
143 | INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS) -I$(WXDIR)/include/wx/msw/gnuwin32 | |
144 | endif | |
145 | ||
6a570331 | 146 | RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)/include" |
2bda0e17 | 147 | |
dbda9e86 | 148 | LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) $(EXTRALIBS) |
2bda0e17 KB |
149 | |
150 | WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION) | |
151 | ||
152 | #for windows 95 | |
153 | XINCLUDE=$(WINFLAGS) | |
154 | XLIB=$(LIBS) | |
155 | LDLIBS = $(LIBS) | |
156 | ||
157 | # Directory for object files (don't change) | |
dbda9e86 | 158 | # OBJDIR = objects$(GUISUFFIX) |
881eba2c | 159 | OBJDIR = . |
2bda0e17 KB |
160 | |
161 | # You shouldn't need to change these... | |
dbda9e86 JS |
162 | CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACPPFLAGS) |
163 | CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACFLAGS) | |
57c208c5 | 164 | WINDOWSLDFLAGS=-Wl,--subsystem,windows -mwindows |
dbda9e86 | 165 | LDFLAGS = $(WINDOWSLDFLAGS) -L$(WXDIR)/lib $(EXTRALDFLAGS) |
2bda0e17 | 166 | |
2bda0e17 KB |
167 | .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c |
168 | ||
2bda0e17 KB |
169 | .$(SRCSUFF).$(OBJSUFF): |
170 | $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF) | |
171 | ||
172 | .c.o: | |
173 | $(CC) -c $(CPPFLAGS) -o $@ $*.c | |
174 | ||
175 |