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