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