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