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