]>
Commit | Line | Data |
---|---|---|
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 | # | |
11 | # make -f makefile.unix WXDEBUG='' | |
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 | |
34 | CCLEX=gcc | |
35 | ||
36 | MAKE=make | |
37 | ||
38 | # LEX | |
39 | LEX=flex.exe -t -L | |
40 | ||
41 | # YACC. byacc or bison | |
42 | # YACC=byacc.exe | |
43 | YACC=bison.exe | |
44 | ||
45 | # Resource compiler | |
46 | RESCOMP=windres.exe | |
47 | ||
48 | RESFLAGS=--include-dir $(WXDIR)/include --define __WIN32__ --define __WIN95__ --define __GNUWIN32__ | |
49 | ||
50 | ########################## Compiler flags ############################# | |
51 | ||
52 | # Miscellaneous compiler options | |
53 | OPTIONS= # -D__MINGW32__ # -D__EGCS__ | |
54 | ||
55 | # Debugging information | |
56 | # AIX: comment out. | |
57 | # IRIX: -g3 | |
58 | DEBUGFLAGS = -ggdb -D__WXDEBUG__ | |
59 | ||
60 | WIN95=1 | |
61 | ||
62 | ifeq ($(WIN95),0) | |
63 | # With 3.50, Win95 will use your existing icons to show smaller ones. | |
64 | # With 4.0, you'll have to follow Win95 procedures for icons or you'll get the | |
65 | # default Windows icon. | |
66 | APPVER=3.50 | |
67 | WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ -D__WIN32__ # Generic WIN32 | |
68 | else | |
69 | APPVER=3.50 # 4.0 | |
70 | # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0). | |
71 | WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ | |
72 | endif | |
73 | ||
74 | CPU=i386 | |
75 | ||
76 | # Suffixes | |
77 | OBJSUFF=o | |
78 | SRCSUFF=cpp | |
79 | LIBPREFIX=lib | |
80 | LIBSUFF=a | |
81 | EXESUFF=.exe | |
82 | RESSUFF=res | |
83 | RSCSUFF=rsc | |
84 | ||
85 | # Warnings | |
86 | WARN = -Wall | |
87 | ||
88 | # Which GUI, -Dwx_xview or -Dwx_motif (don't change this) | |
89 | GUI = -D__WXMSW__ -D__WINDOWS__ | |
90 | ||
91 | # Optimization | |
92 | # OPT = -O | |
93 | OPT = | |
94 | ||
95 | # Options for ar archiver | |
96 | # AROPTIONS = crs # For IRIX and Solaris (both SYSVR4). | |
97 | AROPTIONS = ruv | |
98 | RANLIB = ranlib | |
99 | ||
100 | # Compiler libraries: defaults to GCC libraries | |
101 | #COMPLIBS=-lg++ | |
102 | #for win95 | |
103 | #COMPLIBS=-lgcc | |
104 | ||
105 | # Compiler or system-specific include paths | |
106 | COMPPATHS= | |
107 | ||
108 | ########################## Directories ############################### | |
109 | ||
110 | ||
111 | WINLIBS=-lstdc++ -lgcc \ | |
112 | -lwinspool -lwinmm -lshell32 -loldnames \ | |
113 | -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 | |
114 | ||
115 | # Shouldn't need to change these... | |
116 | WXSRC=$(WXDIR)/src/msw | |
117 | WXINC=$(WXDIR)/include | |
118 | WXBASESRC=$(WXDIR)/src/common | |
119 | WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF) | |
120 | INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/include/wx/msw/gnuwin32 -I$(WXDIR)/src/zlib $(EXTRAINC)$(COMPPATHS) | |
121 | RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)\include" | |
122 | ||
123 | #LIBS = -lctl3d32 $(WXLIB) $(WINLIBS) $(COMPLIBS) | |
124 | LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) | |
125 | ||
126 | WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION) | |
127 | ||
128 | #for windows 95 | |
129 | XINCLUDE=$(WINFLAGS) | |
130 | XLIB=$(LIBS) | |
131 | LDLIBS = $(LIBS) | |
132 | ||
133 | # Directory for object files (don't change) | |
134 | OBJDIR = objects$(GUISUFFIX) | |
135 | ||
136 | # You shouldn't need to change these... | |
137 | CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) | |
138 | CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) | |
139 | LDFLAGS = -Wl,--subsystem,windows -mwindows -L$(WXDIR)/lib | |
140 | ||
141 | .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c | |
142 | ||
143 | # Set these in a batch file instead e.g. install/cygnus.bat | |
144 | # RCINCLUDE="$(WXDIR)/include/msw;$(WXDIR)/contrib/fafa;$(WXDIR)/contrib/itsybits"; \ | |
145 | # 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; \ | |
146 | # export CPLUS_INCLUDE_PATH RCINCLUDE; \ | |
147 | ||
148 | .rc.$(RESSUFF): $< $(WXDIR)/include/msw/wx.rc | |
149 | $(RC) $(RESFLAGS1) $< $(RESFLAGS2) $*.$(RESSUFF) $(RCLFLAGS) | |
150 | ||
151 | .$(RESSUFF).$(RSCSUFF): $< | |
152 | $(CVTRES) $< $*.$(RSCSUFF) | |
153 | ||
154 | .$(SRCSUFF).$(OBJSUFF): | |
155 | $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF) | |
156 | ||
157 | .c.o: | |
158 | $(CC) -c $(CPPFLAGS) -o $@ $*.c | |
159 | ||
160 |