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