]>
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). | |
5 | # | |
6 | # An alternative to editing this file is to create a shell script | |
7 | # to export specific variables, and call make with the -e switch | |
8 | # to override makefile variables. See wx/install/install.txt. | |
9 | # And you can override specific variables on the make command line, e.g. | |
10 | # | |
b2aef89b | 11 | # make -f makefile.unix WXDEBUG='' |
2bda0e17 KB |
12 | # |
13 | # You may prefer to use the GNU configure script than raw makefiles - | |
14 | # see contrib/wxshlib. | |
15 | # | |
16 | ||
17 | ########################## Compiler ################################## | |
18 | ||
19 | # C++ compiler | |
20 | # For AIX/CSet++: use CC = xlC | |
21 | # For IRIX: use CC = CC | |
22 | # CC = gcc-2.6.2 | |
23 | CC = gcc | |
24 | ||
25 | # C compiler for pure C programs | |
26 | # Typical: CC=g++ , CCC=gcc | |
27 | # CC=cl386 /Tp, CCC=cl386 | |
28 | # | |
29 | # (Used only for XView, file sb_scrol.c) | |
30 | # | |
31 | CCC = $(CC) | |
32 | ||
33 | # Compiler used for LEX generated C | |
34 | # AIX: use $(CCC) | |
35 | CCLEX=$(CC) | |
36 | ||
37 | MAKE=make | |
38 | ||
39 | # LEX | |
40 | LEX=flex.exe -t -L | |
41 | ||
42 | # YACC. byacc or bison | |
43 | # YACC=byacc.exe | |
44 | YACC=bison.exe | |
45 | ||
46 | # Resource compiler | |
47 | RESCOMP=windres.exe | |
48 | ||
49 | RESFLAGS=--include-dir $(WXDIR)/include --define __WIN32__ --define __WIN95__ --define __GNUWIN32__ | |
50 | ||
51 | ########################## Compiler flags ############################# | |
52 | ||
53 | # Miscellaneous compiler options | |
54 | # Solaris/GCC: -DSVR4 | |
55 | # Solaris/GCC, dynamic library: -DSVR4 -fPIC | |
56 | # FreeBDS 2.0: does not need -D_BSD - always defined | |
57 | # AIX/CSet++: -+ -qsrcmsg -DSYSV | |
58 | # AIX/GCC: -DSYSV -DAIX | |
59 | # Data General: -DDG | |
60 | # HP: -D_HPUX_SOURCE +a1 -Aa +d -z | |
61 | # IRIX: -mips2 | |
cfe780fb | 62 | OPTIONS= # -D__MINGW32__ # -D__EGCS__ |
2bda0e17 KB |
63 | |
64 | # Debugging information | |
65 | # AIX: comment out. | |
66 | # IRIX: -g3 | |
b2aef89b | 67 | DEBUGFLAGS = -ggdb -D__WXDEBUG__ |
2bda0e17 KB |
68 | |
69 | # Debug/trace mode. 1 or more for debugging. | |
b2aef89b | 70 | WXDEBUG=0 |
2bda0e17 KB |
71 | |
72 | WIN95=1 | |
73 | ||
74 | ifeq ($(WIN95),0) | |
75 | # With 3.50, Win95 will use your existing icons to show smaller ones. | |
76 | # With 4.0, you'll have to follow Win95 procedures for icons or you'll get the | |
77 | # default Windows icon. | |
78 | APPVER=3.50 | |
79 | WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ -D__WIN32__ # Generic WIN32 | |
80 | else | |
81 | APPVER=3.50 # 4.0 | |
82 | # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0). | |
83 | WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ | |
84 | endif | |
85 | ||
86 | CPU=i386 | |
87 | ||
88 | # Suffixes | |
89 | OBJSUFF=o | |
90 | SRCSUFF=cpp | |
91 | LIBPREFIX=lib | |
92 | LIBSUFF=a | |
93 | EXESUFF=.exe | |
94 | RESSUFF=res | |
95 | RSCSUFF=rsc | |
96 | ||
97 | # Warnings | |
98 | # AIX: comment out | |
99 | # IRIX: -w -wlint,-fpiv | |
100 | # These are for the GNU compiler. We now get the compiler to check for as | |
101 | # many things as we can, to catch portability problems sooner. | |
102 | WARN = -Wall | |
103 | ||
2bda0e17 | 104 | # Which GUI, -Dwx_xview or -Dwx_motif (don't change this) |
34138703 | 105 | GUI = -D__WXMSW__ -D__WINDOWS__ |
2bda0e17 KB |
106 | |
107 | # Optimization | |
108 | # OPT = -O | |
109 | # FreeBSD 2.0 with i486: OPT = -O2 -m486 | |
110 | # IRIX: -O2 #-O0 : no, -O1: quick, -O2: global -O3: full(register) | |
111 | # Linux: -m486 # -O2 for optimization | |
112 | OPT = | |
113 | ||
114 | # Options for ar archiver | |
115 | # AROPTIONS = crs # For IRIX and Solaris (both SYSVR4). | |
116 | AROPTIONS = ruv | |
117 | RANLIB = ranlib | |
2bda0e17 KB |
118 | |
119 | # Compiler libraries: defaults to GCC libraries | |
120 | # Solaris: -lgen -ldl -lsocket -lnsl | |
121 | # and/or possibly -lucb, whatever that is... (-lucb CAUSES MOTIF FILE SELECTION PROBLEMS) | |
122 | # or possibly -lgen -lsocket -L/usr/ccs/lib linbnsl.a | |
123 | # GCC > 2.7.1 on Solaris: -lstdc++ -lc -lgen -ldl -lsocket -lnsl -lucb | |
124 | # SGI: -lPW | |
125 | # FreeBSD 2.0: -lg++ -lcompat | |
126 | # FreeBSD 1.x: -lcompat doesn`t need, only -lg++ needed | |
127 | # AIX: -lCns -lbsd | |
128 | # G++ 2.7.0 requires -liostream too. | |
129 | # IRIX: -lPW | |
130 | #COMPLIBS=-lg++ | |
131 | #for win95 | |
132 | #COMPLIBS=-lgcc | |
133 | ||
134 | # Compiler or system-specific include paths | |
135 | # E.g. some SPARCStations need | |
136 | # -I/usr/ucbinclude/sys | |
137 | #added for win95 | |
138 | COMPPATHS= | |
139 | ||
2bda0e17 KB |
140 | ########################## Directories ############################### |
141 | ||
142 | ||
143 | WINLIBS=-lstdc++ -lgcc \ | |
144 | -lwinspool -lwinmm -lshell32 -loldnames \ | |
145 | -lcomctl32 -lctl3d32 -lodbc32 | |
146 | ||
147 | # Shouldn't need to change these... | |
148 | WXSRC=$(WXDIR)/src/msw | |
149 | WXINC=$(WXDIR)/include | |
150 | WXBASESRC=$(WXDIR)/src/common | |
151 | WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF) | |
34138703 | 152 | INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/include/wx/msw/gnuwin32 -I$(WXDIR)/src/zlib $(EXTRAINC)$(COMPPATHS) |
2bda0e17 KB |
153 | RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)\include" |
154 | ||
155 | #LIBS = -lctl3d32 $(WXLIB) $(WINLIBS) $(COMPLIBS) | |
156 | LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) | |
157 | ||
158 | WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION) | |
159 | ||
160 | #for windows 95 | |
161 | XINCLUDE=$(WINFLAGS) | |
162 | XLIB=$(LIBS) | |
163 | LDLIBS = $(LIBS) | |
164 | ||
165 | # Directory for object files (don't change) | |
166 | OBJDIR = objects$(GUISUFFIX) | |
167 | ||
168 | # You shouldn't need to change these... | |
b2aef89b KB |
169 | CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DWXDEBUG='$(WXDEBUG)' $(WARN) $(OPT) |
170 | CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DWXDEBUG='$(WXDEBUG)' $(WARN) $(OPT) | |
2bda0e17 KB |
171 | LDFLAGS = -Wl,--subsystem,windows -mwindows -L$(WXDIR)/lib |
172 | ||
2bda0e17 KB |
173 | .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c |
174 | ||
175 | # Set these in a batch file instead e.g. install/cygnus.bat | |
176 | # RCINCLUDE="$(WXDIR)/include/msw;$(WXDIR)/contrib/fafa;$(WXDIR)/contrib/itsybits"; \ | |
177 | # CPLUS_INCLUDE_PATH=/usr/H-i386-cygwin32/i386-cygwin32/include:/usr/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/cygnus-2.7.2-961023/include:$(WXDIR)/include/common:$(WXDIR)/include/msw:$(WXDIR)/contrib/fafa:$(WXDIR)/contrib/itsybits; \ | |
178 | # export CPLUS_INCLUDE_PATH RCINCLUDE; \ | |
179 | ||
180 | .rc.$(RESSUFF): $< $(WXDIR)/include/msw/wx.rc | |
181 | $(RC) $(RESFLAGS1) $< $(RESFLAGS2) $*.$(RESSUFF) $(RCLFLAGS) | |
182 | ||
183 | .$(RESSUFF).$(RSCSUFF): $< | |
184 | $(CVTRES) $< $*.$(RSCSUFF) | |
185 | ||
186 | .$(SRCSUFF).$(OBJSUFF): | |
187 | $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF) | |
188 | ||
189 | .c.o: | |
190 | $(CC) -c $(CPPFLAGS) -o $@ $*.c | |
191 | ||
192 |