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