]> git.saurik.com Git - wxWidgets.git/blob - src/makeg95.env
Various documentation changes, makefile fixes
[wxWidgets.git] / src / makeg95.env
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 #
11 # make -f makefile.unix DEBUG=''
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
62 OPTIONS= # -D__MINGW32__ # -D__EGCS__
63
64 # Debugging information
65 # AIX: comment out.
66 # IRIX: -g3
67 DEBUGFLAGS = -ggdb -D__DEBUG__
68
69 # Debug/trace mode. 1 or more for debugging.
70 DEBUG=0
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
104 # -pedantic -Wpointer-arith -Wtraditional -Wcast-align \
105 # -Wenum-clash -Wnested-externs -Woverloaded-virtual \
106 # -Winline -Wconversion
107
108 # not good with too few 'const' decls in wxWindows
109 # -Wcast-qual -Wwrite-strings
110
111 # too hard (problems with system header files)
112 # -Wstrict-prototypes -Wmissing-prototypes
113 # -Wredudant-decs
114
115 # Which GUI, -Dwx_xview or -Dwx_motif (don't change this)
116 GUI = -D__WINDOWS__
117
118 # Optimization
119 # OPT = -O
120 # FreeBSD 2.0 with i486: OPT = -O2 -m486
121 # IRIX: -O2 #-O0 : no, -O1: quick, -O2: global -O3: full(register)
122 # Linux: -m486 # -O2 for optimization
123 OPT =
124
125 # Options for ar archiver
126 # AROPTIONS = crs # For IRIX and Solaris (both SYSVR4).
127 AROPTIONS = ruv
128 RANLIB = ranlib
129 # RANLIB = echo # Uncomment this line for IRIX and Solaris
130
131 # Compiler libraries: defaults to GCC libraries
132 # Solaris: -lgen -ldl -lsocket -lnsl
133 # and/or possibly -lucb, whatever that is... (-lucb CAUSES MOTIF FILE SELECTION PROBLEMS)
134 # or possibly -lgen -lsocket -L/usr/ccs/lib linbnsl.a
135 # GCC > 2.7.1 on Solaris: -lstdc++ -lc -lgen -ldl -lsocket -lnsl -lucb
136 # SGI: -lPW
137 # FreeBSD 2.0: -lg++ -lcompat
138 # FreeBSD 1.x: -lcompat doesn`t need, only -lg++ needed
139 # AIX: -lCns -lbsd
140 # G++ 2.7.0 requires -liostream too.
141 # IRIX: -lPW
142 #COMPLIBS=-lg++
143 #for win95
144 #COMPLIBS=-lgcc
145
146 # Compiler or system-specific include paths
147 # E.g. some SPARCStations need
148 # -I/usr/ucbinclude/sys
149 #added for win95
150 COMPPATHS=
151
152 # HP-specific compiler library: an AIAI convenience
153 HPCOMPLIBS=
154
155 # LDLIBS for specific GUIs
156
157 # The following for LINUX and Motif 2.0:
158 #MOTIFLDLIBS = -lwx_motif $(COMPLIBS) -lXm -lXmu -lXpm -lXt -lXext -lX11 -lm
159
160 #BASICMOTIFLDLIBS = -lwx_motif /aiai/packages/motif1.2.1/motif/sun4/lib/libXm.a /aiai/packages/motif1.2.1/motif/sun4/lib/libXmu.a /aiai/packages/motif1.2.1/motif/sun4/lib/libXt.a /aiai/packages/motif1.2.1/motif/sun4/lib/libX11.a -lm
161 # Apparently libg++ (in COMPLIBS) should go before libXm because of a clash of
162 # function name: re_create.
163 #BASICMOTIFLDLIBS = -lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm
164
165 #MOTIFLDLIBS = $(BASICMOTIFLDLIBS) $(COMPLIBS)
166
167 #XVIEWLDLIBS = -lwx_ol -lxview -lolgx -lX11 -lm $(COMPLIBS)
168 #HPLDLIBS=-lwx_hp -lXm -lXmu -lXt -lX11 -lm
169 #CYGNUSLDLIBS=
170 # Default LDLIBS for XView (don't change this)
171 #LDLIBS = $(CYGNUSLDLIBS)
172
173 # _ol or _motif (don't need to change, the makefiles will take
174 # care of it if you use motif/hp/xview targets)
175 #GUISUFFIX=_ol
176
177 ########################## Directories ###############################
178
179
180 WINLIBS=-lstdc++ -lgcc \
181 -lwinspool -lwinmm -lshell32 -loldnames \
182 -lcomctl32 -lctl3d32 -lodbc32
183
184 # Shouldn't need to change these...
185 WXSRC=$(WXDIR)/src/msw
186 WXINC=$(WXDIR)/include
187 WXBASESRC=$(WXDIR)/src/common
188 WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF)
189 INC = -I$(WXINC) $(COMPPATHS)
190 RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)\include"
191
192 #LIBS = -lctl3d32 $(WXLIB) $(WINLIBS) $(COMPLIBS)
193 LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS)
194
195 WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION)
196
197 #for windows 95
198 XINCLUDE=$(WINFLAGS)
199 XLIB=$(LIBS)
200 LDLIBS = $(LIBS)
201
202 # Directory for object files (don't change)
203 OBJDIR = objects$(GUISUFFIX)
204
205 # You shouldn't need to change these...
206 CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT)
207 CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT)
208 LDFLAGS = -Wl,--subsystem,windows -mwindows -L$(WXDIR)/lib
209
210 # Extra patch link for XView
211 #XVIEW_LINK = $(WXDIR)/src/x/objects_ol/sb_scrol.o # $(WXDIR)/src/x/objects_ol/xvwinlp.o
212
213 .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c
214
215 # Set these in a batch file instead e.g. install/cygnus.bat
216 # RCINCLUDE="$(WXDIR)/include/msw;$(WXDIR)/contrib/fafa;$(WXDIR)/contrib/itsybits"; \
217 # 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; \
218 # export CPLUS_INCLUDE_PATH RCINCLUDE; \
219
220 .rc.$(RESSUFF): $< $(WXDIR)/include/msw/wx.rc
221 $(RC) $(RESFLAGS1) $< $(RESFLAGS2) $*.$(RESSUFF) $(RCLFLAGS)
222
223 .$(RESSUFF).$(RSCSUFF): $<
224 $(CVTRES) $< $*.$(RSCSUFF)
225
226 .$(SRCSUFF).$(OBJSUFF):
227 $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF)
228
229 .c.o:
230 $(CC) -c $(CPPFLAGS) -o $@ $*.c
231
232