]>
Commit | Line | Data |
---|---|---|
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). | |
5 | # | |
6 | # An alternative to editing this file is to create a shell script | |
7 | # to export specific variables, and call make with the -e switch | |
8 | # to override makefile variables. See wx/install/install.txt. | |
9 | # And you can override specific variables on the make command line, e.g. | |
10 | # | |
b2aef89b | 11 | # make -f makefile.unix WXDEBUG='' |
2bda0e17 KB |
12 | # |
13 | # You may prefer to use the GNU configure script than raw makefiles - | |
14 | # see contrib/wxshlib. | |
15 | # | |
16 | ||
17 | ########################## Compiler ################################## | |
18 | ||
19 | # C++ compiler | |
20 | # For AIX/CSet++: use CC = xlC | |
21 | # For IRIX: use CC = CC | |
22 | # CC = gcc-2.6.2 | |
23 | CC = gcc | |
24 | ||
25 | # C compiler for pure C programs | |
26 | # Typical: CC=g++ , CCC=gcc | |
27 | # CC=cl386 /Tp, CCC=cl386 | |
28 | # | |
29 | # (Used only for XView, file sb_scrol.c) | |
30 | # | |
31 | CCC = $(CC) | |
32 | ||
33 | # Compiler used for LEX generated C | |
8704bf74 | 34 | CCLEX=gcc |
2bda0e17 KB |
35 | |
36 | MAKE=make | |
37 | ||
38 | # LEX | |
8870c26e | 39 | LEX=flex # -t -L |
2bda0e17 | 40 | |
57c208c5 | 41 | # YACC. yacc or bison |
2662e49e RR |
42 | YACC=byacc |
43 | #YACC=bison | |
2bda0e17 | 44 | |
57c208c5 | 45 | # Settings for Cyginw/Mingw32 |
2bda0e17 | 46 | RESCOMP=windres.exe |
57c208c5 JS |
47 | RCINPUTSWITCH=-i |
48 | RCOUTPUTSWITCH=-o | |
49 | RCINCSWITCH=--include-dir | |
50 | RCDEFSWITCH=--define | |
2bda0e17 | 51 | |
6a570331 | 52 | RESFLAGS=$(RCINCSWITCH) $(WXDIR)/include $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) __WIN95__ $(RCDEFSWITCH) __GNUWIN32__ |
2bda0e17 KB |
53 | |
54 | ########################## Compiler flags ############################# | |
55 | ||
56 | # Miscellaneous compiler options | |
881eba2c GRG |
57 | # GRG: The __EGCS__ symbol is not needed anymore! |
58 | OPTIONS= -D__MINGW32__ -DSTRICT # -D__EGCS__ | |
59 | ||
2bda0e17 KB |
60 | |
61 | # Debugging information | |
62 | # AIX: comment out. | |
63 | # IRIX: -g3 | |
e4d18e7f | 64 | DEBUGFLAGS = -D__WXDEBUG__ |
2bda0e17 | 65 | |
2bda0e17 KB |
66 | WIN95=1 |
67 | ||
68 | ifeq ($(WIN95),0) | |
69 | # With 3.50, Win95 will use your existing icons to show smaller ones. | |
70 | # With 4.0, you'll have to follow Win95 procedures for icons or you'll get the | |
71 | # default Windows icon. | |
72 | APPVER=3.50 | |
73 | WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ -D__WIN32__ # Generic WIN32 | |
74 | else | |
75 | APPVER=3.50 # 4.0 | |
76 | # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0). | |
77 | WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ | |
78 | endif | |
79 | ||
80 | CPU=i386 | |
81 | ||
82 | # Suffixes | |
83 | OBJSUFF=o | |
84 | SRCSUFF=cpp | |
85 | LIBPREFIX=lib | |
86 | LIBSUFF=a | |
87 | EXESUFF=.exe | |
88 | RESSUFF=res | |
89 | RSCSUFF=rsc | |
90 | ||
91 | # Warnings | |
2bda0e17 KB |
92 | WARN = -Wall |
93 | ||
2bda0e17 | 94 | # Which GUI, -Dwx_xview or -Dwx_motif (don't change this) |
34138703 | 95 | GUI = -D__WXMSW__ -D__WINDOWS__ |
2bda0e17 | 96 | |
881eba2c GRG |
97 | # according to Guillermo Rodriguez Garcia <guille@iies.es> this flag is |
98 | # needed to make the standard div() function work - otherwise it returns | |
99 | # absolutely incorrect results and completely breaks the wxImage class | |
100 | # (where it's used extensively) | |
101 | # GRG: at least it is needed in mingw32-gcc2.8.1 | |
e4d18e7f | 102 | OPT = -fno-pcc-struct-return -O2 -fno-rtti -fno-exceptions |
2bda0e17 KB |
103 | |
104 | # Options for ar archiver | |
105 | # AROPTIONS = crs # For IRIX and Solaris (both SYSVR4). | |
106 | AROPTIONS = ruv | |
107 | RANLIB = ranlib | |
2bda0e17 KB |
108 | |
109 | # Compiler libraries: defaults to GCC libraries | |
2bda0e17 KB |
110 | #COMPLIBS=-lg++ |
111 | #for win95 | |
112 | #COMPLIBS=-lgcc | |
113 | ||
114 | # Compiler or system-specific include paths | |
48d1144b | 115 | COMPPATHS= |
2bda0e17 | 116 | |
2bda0e17 KB |
117 | ########################## Directories ############################### |
118 | ||
119 | ||
120 | WINLIBS=-lstdc++ -lgcc \ | |
8870c26e | 121 | -lwinspool -lwinmm -lshell32 \ |
881eba2c | 122 | -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 # -loldnames |
2bda0e17 KB |
123 | |
124 | # Shouldn't need to change these... | |
6a570331 RR |
125 | WXSRC=$(WXDIR)/src/msw |
126 | WXINC=$(WXDIR)/include | |
127 | WXBASESRC=$(WXDIR)/src/common | |
128 | WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF) | |
129 | INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/include/wx/msw/gnuwin32 -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS) | |
130 | RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)/include" | |
2bda0e17 KB |
131 | |
132 | #LIBS = -lctl3d32 $(WXLIB) $(WINLIBS) $(COMPLIBS) | |
dbda9e86 | 133 | LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) $(EXTRALIBS) |
2bda0e17 KB |
134 | |
135 | WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION) | |
136 | ||
137 | #for windows 95 | |
138 | XINCLUDE=$(WINFLAGS) | |
139 | XLIB=$(LIBS) | |
140 | LDLIBS = $(LIBS) | |
141 | ||
142 | # Directory for object files (don't change) | |
dbda9e86 | 143 | # OBJDIR = objects$(GUISUFFIX) |
881eba2c | 144 | OBJDIR = . |
2bda0e17 KB |
145 | |
146 | # You shouldn't need to change these... | |
dbda9e86 JS |
147 | CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACPPFLAGS) |
148 | CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACFLAGS) | |
57c208c5 | 149 | WINDOWSLDFLAGS=-Wl,--subsystem,windows -mwindows |
dbda9e86 | 150 | LDFLAGS = $(WINDOWSLDFLAGS) -L$(WXDIR)/lib $(EXTRALDFLAGS) |
2bda0e17 | 151 | |
2bda0e17 KB |
152 | .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c |
153 | ||
154 | # Set these in a batch file instead e.g. install/cygnus.bat | |
155 | # RCINCLUDE="$(WXDIR)/include/msw;$(WXDIR)/contrib/fafa;$(WXDIR)/contrib/itsybits"; \ | |
156 | # CPLUS_INCLUDE_PATH=/usr/H-i386-cygwin32/i386-cygwin32/include:/usr/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/cygnus-2.7.2-961023/include:$(WXDIR)/include/common:$(WXDIR)/include/msw:$(WXDIR)/contrib/fafa:$(WXDIR)/contrib/itsybits; \ | |
157 | # export CPLUS_INCLUDE_PATH RCINCLUDE; \ | |
158 | ||
dbda9e86 JS |
159 | #.rc.$(RESSUFF): $< $(WXDIR)/include/msw/wx.rc |
160 | # $(RC) $(RESFLAGS1) $< $(RESFLAGS2) $*.$(RESSUFF) $(RCLFLAGS) | |
2bda0e17 | 161 | |
dbda9e86 JS |
162 | #.$(RESSUFF).$(RSCSUFF): $< |
163 | # $(CVTRES) $< $*.$(RSCSUFF) | |
2bda0e17 KB |
164 | |
165 | .$(SRCSUFF).$(OBJSUFF): | |
166 | $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF) | |
167 | ||
168 | .c.o: | |
169 | $(CC) -c $(CPPFLAGS) -o $@ $*.c | |
170 | ||
171 |