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