]>
Commit | Line | Data |
---|---|---|
3266f831 JS |
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 -t -L | |
40 | ||
41 | # YACC. yacc or bison | |
42 | YACC=yacc | |
43 | ||
44 | # Settings for TWIN32 | |
45 | RESCOMP=rc | |
46 | RCINPUTSWITCH= | |
47 | RCOUTPUTSWITCH=-o | |
48 | RCINCSWITCH=-I | |
49 | RCDEFSWITCH=-D | |
50 | ||
51 | RESFLAGS=$(RCINCSWITCH) $(WXDIR)/include $(RCDEFSWITCH) __WIN32__ $(RCDEFSWITCH) __WIN95__ $(RCDEFSWITCH) __GNUWIN32__ | |
52 | ||
53 | ########################## Compiler flags ############################# | |
54 | ||
55 | # Miscellaneous compiler options | |
56 | OPTIONS= # -D__MINGW32__ # -D__EGCS__ | |
57 | ||
58 | # Debugging information | |
59 | # AIX: comment out. | |
60 | # IRIX: -g3 | |
61 | DEBUGFLAGS = -ggdb -D__WXDEBUG__ | |
62 | ||
63 | WIN95=1 | |
64 | ||
65 | ifeq ($(WIN95),0) | |
66 | # With 3.50, Win95 will use your existing icons to show smaller ones. | |
67 | # With 4.0, you'll have to follow Win95 procedures for icons or you'll get the | |
68 | # default Windows icon. | |
69 | APPVER=3.50 | |
70 | WINVERSION=-DWINVER=0x0350 -D__GNUWIN32__ -D__WIN32__ # Generic WIN32 | |
71 | else | |
72 | APPVER=3.50 # 4.0 | |
73 | # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0). | |
74 | WINVERSION=-DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ | |
75 | endif | |
76 | ||
77 | CPU=i386 | |
78 | ||
79 | # Suffixes | |
80 | OBJSUFF=o | |
81 | SRCSUFF=cpp | |
82 | LIBPREFIX=lib | |
83 | LIBSUFF=a | |
84 | EXESUFF=.exe | |
85 | RESSUFF=res | |
86 | RSCSUFF=rsc | |
87 | ||
88 | # Warnings | |
89 | WARN = -Wall | |
90 | ||
91 | # Which GUI, -Dwx_xview or -Dwx_motif (don't change this) | |
92 | GUI = -D__WXMSW__ -D__WINDOWS__ | |
93 | ||
94 | # Optimization | |
95 | # OPT = -O | |
96 | OPT = | |
97 | ||
98 | # Options for ar archiver | |
99 | # AROPTIONS = crs # For IRIX and Solaris (both SYSVR4). | |
100 | AROPTIONS = ruv | |
101 | RANLIB = ranlib | |
102 | ||
103 | # Compiler libraries: defaults to GCC libraries | |
104 | #COMPLIBS=-lg++ | |
105 | #for win95 | |
106 | #COMPLIBS=-lgcc | |
107 | ||
108 | # Compiler or system-specific include paths | |
109 | COMPPATHS=-I$(TWINDIR)/include | |
110 | ||
111 | ########################## Directories ############################### | |
112 | ||
113 | ||
114 | WINLIBS=-lstdc++ -lgcc -lm -ldl -ltwin32 -lcomctl32 -lcommdlg -lddeml -lmmsystem -lshell -lXpm -lX11 -lm | |
115 | ||
116 | # -lwinspool -lwinmm -lshell32 -loldnames \ | |
117 | # -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 | |
118 | ||
119 | # Shouldn't need to change these... | |
120 | WXSRC=$(WXDIR)/src/msw | |
121 | WXINC=$(WXDIR)/include | |
122 | WXBASESRC=$(WXDIR)/src/common | |
123 | WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF) | |
124 | INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/include/wx/msw/gnuwin32 -I$(WXDIR)/src/zlib $(EXTRAINC)$(COMPPATHS) | |
125 | RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)\include" | |
126 | ||
127 | #LIBS = -lctl3d32 $(WXLIB) $(WINLIBS) $(COMPLIBS) | |
128 | LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) | |
129 | ||
130 | WINFLAGS=-DX386 -DWIN32 -D_WIN32 $(WINVERSION) -DTWIN32 -D__TWIN32__ | |
131 | ||
132 | #for windows 95 | |
133 | XINCLUDE=$(WINFLAGS) | |
134 | XLIB=$(LIBS) | |
135 | LDLIBS = $(LIBS) | |
136 | ||
137 | # Directory for object files (don't change) | |
138 | OBJDIR = objects$(GUISUFFIX) | |
139 | ||
140 | # You shouldn't need to change these... | |
141 | CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) | |
142 | CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) | |
143 | WINDOWSLDFLAGS= | |
144 | LDFLAGS = $(WINDOWSLDFLAGS) -L$(WXDIR)/lib -L/usr/X11R6/lib -L$(TWINDIR)/win | |
145 | ||
146 | .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c | |
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 |