]> git.saurik.com Git - wxWidgets.git/blame - src/makeg95.env
Version 0.4 of wxPython for MSW.
[wxWidgets.git] / src / makeg95.env
CommitLineData
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
23CC = 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#
31CCC = $(CC)
32
33# Compiler used for LEX generated C
34# AIX: use $(CCC)
35CCLEX=$(CC)
36
37MAKE=make
38
39# LEX
40LEX=flex.exe -t -L
41
42# YACC. byacc or bison
43# YACC=byacc.exe
44YACC=bison.exe
45
46# Resource compiler
47RESCOMP=windres.exe
48
49RESFLAGS=--include-dir $(WXDIR)/include --define __WIN32__ --define __WIN95__ --define __GNUWIN32__
50
51########################## Compiler flags #############################
52
53# Miscellaneous compiler options
cfe780fb 54OPTIONS= # -D__MINGW32__ # -D__EGCS__
2bda0e17
KB
55
56# Debugging information
57# AIX: comment out.
58# IRIX: -g3
b2aef89b 59DEBUGFLAGS = -ggdb -D__WXDEBUG__
2bda0e17 60
341287bf
JS
61# Debug/trace mode. 1 or more for memory debugging.
62# Unfortunately this doesn't seem to work with GnuWin32 - get warning:
63# ../../include/wx/memory.h:58: warning: declaration of `operator delete(void *)'
64# throws different exceptions
65# <internal>:58: warning: previous declaration here
66# So setting to 0 for now.
67
b2aef89b 68WXDEBUG=0
2bda0e17
KB
69
70WIN95=1
71
72ifeq ($(WIN95),0)
73# With 3.50, Win95 will use your existing icons to show smaller ones.
74# With 4.0, you'll have to follow Win95 procedures for icons or you'll get the
75# default Windows icon.
76APPVER=3.50
77WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ -D__WIN32__ # Generic WIN32
78else
79APPVER=3.50 # 4.0
80# This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0).
81WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__
82endif
83
84CPU=i386
85
86# Suffixes
87OBJSUFF=o
88SRCSUFF=cpp
89LIBPREFIX=lib
90LIBSUFF=a
91EXESUFF=.exe
92RESSUFF=res
93RSCSUFF=rsc
94
95# Warnings
2bda0e17
KB
96WARN = -Wall
97
2bda0e17 98# Which GUI, -Dwx_xview or -Dwx_motif (don't change this)
34138703 99GUI = -D__WXMSW__ -D__WINDOWS__
2bda0e17
KB
100
101# Optimization
102# OPT = -O
2bda0e17
KB
103OPT =
104
105# Options for ar archiver
106# AROPTIONS = crs # For IRIX and Solaris (both SYSVR4).
107AROPTIONS = ruv
108RANLIB = ranlib
2bda0e17
KB
109
110# Compiler libraries: defaults to GCC libraries
2bda0e17
KB
111#COMPLIBS=-lg++
112#for win95
113#COMPLIBS=-lgcc
114
115# Compiler or system-specific include paths
2bda0e17
KB
116COMPPATHS=
117
2bda0e17
KB
118########################## Directories ###############################
119
120
121WINLIBS=-lstdc++ -lgcc \
122 -lwinspool -lwinmm -lshell32 -loldnames \
27529614 123 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32
2bda0e17
KB
124
125# Shouldn't need to change these...
126WXSRC=$(WXDIR)/src/msw
127WXINC=$(WXDIR)/include
128WXBASESRC=$(WXDIR)/src/common
129WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF)
34138703 130INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/include/wx/msw/gnuwin32 -I$(WXDIR)/src/zlib $(EXTRAINC)$(COMPPATHS)
2bda0e17
KB
131RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)\include"
132
133#LIBS = -lctl3d32 $(WXLIB) $(WINLIBS) $(COMPLIBS)
134LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS)
135
136WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION)
137
138#for windows 95
139XINCLUDE=$(WINFLAGS)
140XLIB=$(LIBS)
141LDLIBS = $(LIBS)
142
143# Directory for object files (don't change)
144OBJDIR = objects$(GUISUFFIX)
145
146# You shouldn't need to change these...
b2aef89b
KB
147CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DWXDEBUG='$(WXDEBUG)' $(WARN) $(OPT)
148CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DWXDEBUG='$(WXDEBUG)' $(WARN) $(OPT)
2bda0e17
KB
149LDFLAGS = -Wl,--subsystem,windows -mwindows -L$(WXDIR)/lib
150
2bda0e17
KB
151.SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c
152
153# Set these in a batch file instead e.g. install/cygnus.bat
154# RCINCLUDE="$(WXDIR)/include/msw;$(WXDIR)/contrib/fafa;$(WXDIR)/contrib/itsybits"; \
155# 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; \
156# export CPLUS_INCLUDE_PATH RCINCLUDE; \
157
158.rc.$(RESSUFF): $< $(WXDIR)/include/msw/wx.rc
159 $(RC) $(RESFLAGS1) $< $(RESFLAGS2) $*.$(RESSUFF) $(RCLFLAGS)
160
161.$(RESSUFF).$(RSCSUFF): $<
162 $(CVTRES) $< $*.$(RSCSUFF)
163
164.$(SRCSUFF).$(OBJSUFF):
165 $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF)
166
167.c.o:
168 $(CC) -c $(CPPFLAGS) -o $@ $*.c
169
170