]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
1 | # |
2 | # File: makefile.unx | |
3 | # Author: Julian Smart | |
4 | # Created: 1993 | |
5 | # Updated: | |
6 | # Copyright: (c) 1993, AIAI, University of Edinburgh | |
7 | # | |
8 | # "@(#)makefile.unx 1.2 5/9/94" | |
9 | # | |
10 | # Makefile for libwx.a | |
11 | ||
12 | # Replace this with your own path if necessary | |
13 | WXDIR = ../.. | |
14 | ||
15 | # All common UNIX compiler flags and options are now in | |
16 | # this central makefile. | |
17 | include $(WXDIR)/src/makeg95.env | |
18 | ||
19 | # IMPORTANT: if you want to link in subsidiary libraries, | |
20 | # required for some optional parts of wxWindows, you must | |
21 | # set EXTRATARGETS and EXTRAOBJS to match the settings in wx_setup.h. | |
22 | # Having done this, you won't have to worry about linking them | |
23 | # into each application. | |
24 | # | |
25 | # Here's the full list. | |
26 | # prologio: Required if using the wxWindows resource facility | |
27 | # USE_WX_RESOURCES should be 1 | |
28 | # xmgauge: Gauge class (required for Motif only) | |
29 | # USE_GAUGE should be 1 | |
30 | # xpm: XPM pixmap support | |
31 | # USE_XPM_IN_X should be 1 | |
2bda0e17 KB |
32 | # wxstring: string class |
33 | # USE_GNU_WXSTRING should be 1 | |
34 | # | |
35 | # Unfortunately, 'ar' doesn't like combining objects and libraries, | |
36 | # so we must identify all the objects from the subordinate libraries. Yuck! | |
37 | XPMSRC=../../contrib/wxxpm/objects$(GUISUFFIX) | |
38 | XPMOBJS=$(XPMSRC)/crbuffri.$(OBJSUFF) $(XPMSRC)/crbuffrp.$(OBJSUFF) $(XPMSRC)/crdatfri.$(OBJSUFF) $(XPMSRC)/crdatfrp.$(OBJSUFF)\ | |
39 | $(XPMSRC)/create.$(OBJSUFF) $(XPMSRC)/crifrbuf.$(OBJSUFF) $(XPMSRC)/crifrdat.$(OBJSUFF) $(XPMSRC)/crpfrbuf.$(OBJSUFF) $(XPMSRC)/crpfrdat.$(OBJSUFF)\ | |
40 | $(XPMSRC)/data.$(OBJSUFF) $(XPMSRC)/hashtab.$(OBJSUFF) $(XPMSRC)/misc.$(OBJSUFF) $(XPMSRC)/parse.$(OBJSUFF) $(XPMSRC)/rdftodat.$(OBJSUFF)\ | |
41 | $(XPMSRC)/rdftoi.$(OBJSUFF) $(XPMSRC)/rdftop.$(OBJSUFF) $(XPMSRC)/rgb.$(OBJSUFF) $(XPMSRC)/scan.$(OBJSUFF) $(XPMSRC)/simx.$(OBJSUFF)\ | |
42 | $(XPMSRC)/wrffrdat.$(OBJSUFF) $(XPMSRC)/wrffri.$(OBJSUFF) $(XPMSRC)/wrffrp.$(OBJSUFF) | |
43 | ||
44 | # Subordinate library possibilities | |
45 | ||
46 | EXTRAOBJS= | |
47 | ||
48 | GENDIR=../generic | |
49 | COMMDIR=../common | |
4fabb575 | 50 | XPMDIR=../xpm |
2bda0e17 KB |
51 | OLEDIR=ole |
52 | MSWDIR=. | |
53 | ||
2bda0e17 KB |
54 | DOCDIR = $(WXDIR)\docs |
55 | ||
56 | GENERICOBJS= \ | |
57 | $(GENDIR)/choicdgg.$(OBJSUFF) \ | |
4bf78aae | 58 | $(GENDIR)/dirdlgg.$(OBJSUFF) \ |
2bda0e17 | 59 | $(GENDIR)/gridg.$(OBJSUFF) \ |
27529614 | 60 | $(GENDIR)/laywin.$(OBJSUFF) \ |
2bda0e17 | 61 | $(GENDIR)/panelg.$(OBJSUFF) \ |
e3a43801 JS |
62 | $(GENDIR)/prop.$(OBJSUFF) \ |
63 | $(GENDIR)/propform.$(OBJSUFF) \ | |
64 | $(GENDIR)/proplist.$(OBJSUFF) \ | |
27529614 | 65 | $(GENDIR)/sashwin.$(OBJSUFF) \ |
2bda0e17 KB |
66 | $(GENDIR)/scrolwin.$(OBJSUFF) \ |
67 | $(GENDIR)/splitter.$(OBJSUFF) \ | |
68 | $(GENDIR)/statusbr.$(OBJSUFF) \ | |
69 | $(GENDIR)/tabg.$(OBJSUFF) \ | |
70 | $(GENDIR)/textdlgg.$(OBJSUFF) | |
71 | ||
ad5c34f3 JS |
72 | # $(GENDIR)/colrdlgg.$(OBJSUFF) \ |
73 | # $(GENDIR)/fontdlgg.$(OBJSUFF) \ | |
8baa0e61 JS |
74 | # $(GENDIR)/prntdlgg.$(OBJSUFF) \ |
75 | # $(GENDIR)/printps.$(OBJSUFF) \ | |
ad5c34f3 | 76 | # $(GENDIR)/msgdlgg.$(OBJSUFF) \ |
8baa0e61 | 77 | |
2bda0e17 KB |
78 | COMMONOBJS = \ |
79 | $(COMMDIR)/config.$(OBJSUFF) \ | |
80 | $(COMMDIR)/cmndata.$(OBJSUFF) \ | |
81 | $(COMMDIR)/docview.$(OBJSUFF) \ | |
2108f33a | 82 | $(COMMDIR)/docmdi.$(OBJSUFF) \ |
2bda0e17 KB |
83 | $(COMMDIR)/dynarray.$(OBJSUFF) \ |
84 | $(COMMDIR)/event.$(OBJSUFF) \ | |
85 | $(COMMDIR)/file.$(OBJSUFF) \ | |
86 | $(COMMDIR)/fileconf.$(OBJSUFF) \ | |
87 | $(COMMDIR)/filefn.$(OBJSUFF) \ | |
3d8bd7d6 | 88 | $(COMMDIR)/framecmn.$(OBJSUFF) \ |
2bda0e17 KB |
89 | $(COMMDIR)/gdicmn.$(OBJSUFF) \ |
90 | $(COMMDIR)/helpbase.$(OBJSUFF) \ | |
e3554471 | 91 | $(COMMDIR)/image.$(OBJSUFF) \ |
e9c4b1a2 JS |
92 | $(COMMDIR)/imagpng.$(OBJSUFF) \ |
93 | $(COMMDIR)/imagjpeg.$(OBJSUFF) \ | |
2bda0e17 | 94 | $(COMMDIR)/intl.$(OBJSUFF) \ |
dbda9e86 | 95 | $(COMMDIR)/ipcbase.$(OBJSUFF) \ |
2bda0e17 KB |
96 | $(COMMDIR)/layout.$(OBJSUFF) \ |
97 | $(COMMDIR)/log.$(OBJSUFF) \ | |
98 | $(COMMDIR)/memory.$(OBJSUFF) \ | |
99 | $(COMMDIR)/module.$(OBJSUFF) \ | |
2432b92d | 100 | $(COMMDIR)/mimetype.$(OBJSUFF) \ |
2bda0e17 KB |
101 | $(COMMDIR)/object.$(OBJSUFF) \ |
102 | $(COMMDIR)/odbc.$(OBJSUFF) \ | |
6a6c0a8b | 103 | $(COMMDIR)/process.$(OBJSUFF) \ |
2bda0e17 KB |
104 | $(COMMDIR)/prntbase.$(OBJSUFF) \ |
105 | $(COMMDIR)/resource.$(OBJSUFF) \ | |
106 | $(COMMDIR)/tbarbase.$(OBJSUFF) \ | |
107 | $(COMMDIR)/tbarsmpl.$(OBJSUFF) \ | |
108 | $(COMMDIR)/textfile.$(OBJSUFF) \ | |
109 | $(COMMDIR)/timercmn.$(OBJSUFF) \ | |
110 | $(COMMDIR)/utilscmn.$(OBJSUFF) \ | |
111 | $(COMMDIR)/validate.$(OBJSUFF) \ | |
89c684ef | 112 | $(COMMDIR)/valgen.$(OBJSUFF) \ |
2bda0e17 KB |
113 | $(COMMDIR)/valtext.$(OBJSUFF) \ |
114 | $(COMMDIR)/date.$(OBJSUFF) \ | |
115 | $(COMMDIR)/wxexpr.$(OBJSUFF) \ | |
116 | $(COMMDIR)/hash.$(OBJSUFF) \ | |
117 | $(COMMDIR)/list.$(OBJSUFF) \ | |
341287bf | 118 | $(COMMDIR)/variant.$(OBJSUFF) \ |
7bcb11d3 | 119 | $(COMMDIR)/paper.$(OBJSUFF) \ |
2bda0e17 KB |
120 | $(COMMDIR)/string.$(OBJSUFF) \ |
121 | $(COMMDIR)/time.$(OBJSUFF) \ | |
27529614 | 122 | $(COMMDIR)/tokenzr.$(OBJSUFF) \ |
cf447356 | 123 | $(COMMDIR)/y_tab.$(OBJSUFF) \ |
3d4c6a21 | 124 | $(COMMDIR)/stream.$(OBJSUFF) \ |
25331334 | 125 | $(COMMDIR)/wfstream.$(OBJSUFF) \ |
3d4c6a21 | 126 | $(COMMDIR)/mstream.$(OBJSUFF) \ |
79c3e0e1 | 127 | $(COMMDIR)/zstream.$(OBJSUFF) \ |
cf447356 | 128 | $(COMMDIR)/datstrm.$(OBJSUFF) \ |
27529614 | 129 | $(COMMDIR)/objstrm.$(OBJSUFF) \ |
3d8bd7d6 | 130 | $(COMMDIR)/extended.$(OBJSUFF) \ |
c05cbb7f OK |
131 | $(COMMDIR)/wincmn.$(OBJSUFF) \ |
132 | $(COMMDIR)/wxchar.$(OBJSUFF) | |
2bda0e17 | 133 | |
4fabb575 JS |
134 | # NOTE: if the socket-related files fail with a syntax error in Sockets.h, |
135 | # remove the files (probably all GnuWin32 releases < b20). Cygwin b20 is OK, | |
136 | # Mingw32 may still have problems. | |
137 | # $(COMMDIR)/socket.$(OBJSUFF) \ | |
138 | # $(COMMDIR)/sckaddr.$(OBJSUFF) \ | |
139 | # $(COMMDIR)/sckfile.$(OBJSUFF) \ | |
140 | # $(COMMDIR)/sckipc.$(OBJSUFF) \ | |
141 | # $(COMMDIR)/sckstrm.$(OBJSUFF) \ | |
142 | # $(COMMDIR)/protocol.$(OBJSUFF) \ | |
143 | # $(COMMDIR)/http.$(OBJSUFF) \ | |
144 | # $(COMMDIR)/ftp.$(OBJSUFF) \ | |
145 | # $(COMMDIR)/url.$(OBJSUFF) \ | |
27529614 | 146 | |
2bda0e17 | 147 | MSWOBJS = \ |
57a7b7c1 | 148 | accel.$(OBJSUFF) \ |
2bda0e17 KB |
149 | app.$(OBJSUFF) \ |
150 | bitmap.$(OBJSUFF) \ | |
151 | bmpbuttn.$(OBJSUFF) \ | |
152 | brush.$(OBJSUFF) \ | |
153 | button.$(OBJSUFF) \ | |
154 | checkbox.$(OBJSUFF) \ | |
155 | checklst.$(OBJSUFF) \ | |
789295bf | 156 | caret.$(OBJSUFF) \ |
2bda0e17 KB |
157 | choice.$(OBJSUFF) \ |
158 | clipbrd.$(OBJSUFF) \ | |
159 | colordlg.$(OBJSUFF) \ | |
160 | colour.$(OBJSUFF) \ | |
161 | combobox.$(OBJSUFF) \ | |
162 | control.$(OBJSUFF) \ | |
163 | curico.$(OBJSUFF) \ | |
164 | cursor.$(OBJSUFF) \ | |
165 | data.$(OBJSUFF) \ | |
166 | dc.$(OBJSUFF) \ | |
167 | dcmemory.$(OBJSUFF) \ | |
168 | dcclient.$(OBJSUFF) \ | |
169 | dcprint.$(OBJSUFF) \ | |
170 | dcscreen.$(OBJSUFF) \ | |
171 | dde.$(OBJSUFF) \ | |
172 | dialog.$(OBJSUFF) \ | |
173 | dib.$(OBJSUFF) \ | |
2bda0e17 KB |
174 | filedlg.$(OBJSUFF) \ |
175 | font.$(OBJSUFF) \ | |
176 | fontdlg.$(OBJSUFF) \ | |
177 | frame.$(OBJSUFF) \ | |
da87a1ca JS |
178 | gaugemsw.$(OBJSUFF) \ |
179 | gauge95.$(OBJSUFF) \ | |
2bda0e17 KB |
180 | gdiobj.$(OBJSUFF) \ |
181 | helpwin.$(OBJSUFF) \ | |
182 | icon.$(OBJSUFF) \ | |
183 | imaglist.$(OBJSUFF) \ | |
184 | joystick.$(OBJSUFF) \ | |
185 | listbox.$(OBJSUFF) \ | |
186 | listctrl.$(OBJSUFF) \ | |
187 | main.$(OBJSUFF) \ | |
188 | mdi.$(OBJSUFF) \ | |
189 | menu.$(OBJSUFF) \ | |
190 | menuitem.$(OBJSUFF) \ | |
191 | metafile.$(OBJSUFF) \ | |
192 | minifram.$(OBJSUFF) \ | |
193 | msgdlg.$(OBJSUFF) \ | |
194 | nativdlg.$(OBJSUFF) \ | |
8b9518ee | 195 | notebook.$(OBJSUFF) \ |
2bda0e17 KB |
196 | ownerdrw.$(OBJSUFF) \ |
197 | palette.$(OBJSUFF) \ | |
198 | pen.$(OBJSUFF) \ | |
199 | penwin.$(OBJSUFF) \ | |
200 | printdlg.$(OBJSUFF) \ | |
201 | printwin.$(OBJSUFF) \ | |
202 | radiobox.$(OBJSUFF) \ | |
203 | radiobut.$(OBJSUFF) \ | |
204 | region.$(OBJSUFF) \ | |
205 | registry.$(OBJSUFF) \ | |
6a23cbce | 206 | regconf.$(OBJSUFF) \ |
2bda0e17 KB |
207 | scrolbar.$(OBJSUFF) \ |
208 | settings.$(OBJSUFF) \ | |
da87a1ca JS |
209 | slidrmsw.$(OBJSUFF) \ |
210 | slider95.$(OBJSUFF) \ | |
2bda0e17 KB |
211 | spinbutt.$(OBJSUFF) \ |
212 | statbmp.$(OBJSUFF) \ | |
213 | statbox.$(OBJSUFF) \ | |
214 | statbr95.$(OBJSUFF) \ | |
215 | stattext.$(OBJSUFF) \ | |
216 | tabctrl.$(OBJSUFF) \ | |
217 | taskbar.$(OBJSUFF) \ | |
218 | tbar95.$(OBJSUFF) \ | |
219 | tbarmsw.$(OBJSUFF) \ | |
220 | textctrl.$(OBJSUFF) \ | |
221 | thread.$(OBJSUFF) \ | |
222 | timer.$(OBJSUFF) \ | |
1f112209 | 223 | tooltip.$(OBJSUFF) \ |
2bda0e17 KB |
224 | treectrl.$(OBJSUFF) \ |
225 | utils.$(OBJSUFF) \ | |
cf447356 | 226 | utilsexc.$(OBJSUFF) \ |
2bda0e17 | 227 | wave.$(OBJSUFF) \ |
2fd284a4 JS |
228 | window.$(OBJSUFF) \ |
229 | xpmhand.$(OBJSUFF) | |
27529614 | 230 | |
9ca2fe7e JS |
231 | # Native wxDirDlg can't be compiled due to GnuWin32/OLE limitations |
232 | # dirdlg.$(OBJSUFF) \ | |
233 | ||
74e34480 | 234 | # OLE not supported yet by GnuWin32 |
27529614 JS |
235 | # $(OLEDIR)/droptgt.$(OBJSUFF) \ |
236 | # $(OLEDIR)/dropsrc.$(OBJSUFF) \ | |
237 | # $(OLEDIR)/dataobj.$(OBJSUFF) \ | |
238 | # $(OLEDIR)/oleutils.$(OBJSUFF) \ | |
aa0b7e1e JS |
239 | # $(OLEDIR)/uuid.$(OBJSUFF) \ |
240 | # $(OLEDIR)/automtn.$(OBJSUFF) | |
2bda0e17 | 241 | |
4fabb575 JS |
242 | XPMOBJECTS = $(XPMDIR)/crbuffri.o\ |
243 | $(XPMDIR)/crdatfri.o\ | |
244 | $(XPMDIR)/create.o $(XPMDIR)/crifrbuf.o\ | |
245 | $(XPMDIR)/crifrdat.o\ | |
246 | $(XPMDIR)/data.o\ | |
247 | $(XPMDIR)/hashtab.o $(XPMDIR)/misc.o\ | |
248 | $(XPMDIR)/parse.o $(XPMDIR)/rdftodat.o\ | |
249 | $(XPMDIR)/rdftoi.o\ | |
250 | $(XPMDIR)/rgb.o $(XPMDIR)/scan.o\ | |
251 | $(XPMDIR)/simx.o $(XPMDIR)/wrffrdat.o\ | |
252 | $(XPMDIR)/wrffrp.o $(XPMDIR)/wrffri.o | |
74e34480 | 253 | |
4fabb575 | 254 | OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) # $(XPMOBJECTS) |
2bda0e17 KB |
255 | |
256 | all: $(OBJECTS) $(WXLIB) | |
257 | ||
258 | base: | |
259 | cd $(WXDIR)/src/common; $(MAKE) -f makefile.g95 GUI=$(GUI) GUISUFFIX=$(GUISUFFIX) CC=$(CC)\ | |
260 | OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' DEBUGFLAGS='$(DEBUGFLAGS)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' | |
261 | ||
262 | ||
263 | $(WXLIB): $(OBJECTS) $(EXTRAOBJS) | |
264 | ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS) | |
265 | $(RANLIB) $@ | |
266 | ||
2bda0e17 KB |
267 | $(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(WXINC)/wx/setup.h |
268 | ||
269 | $(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c | |
270 | $(CCLEX) -c $(CPPFLAGS) -o $@ $(COMMDIR)/y_tab.c | |
271 | ||
272 | # Replace lex with flex if you run into compilation | |
273 | # problems with lex_yy.c. See also note about LEX_SCANNER | |
274 | # above. | |
275 | $(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l | |
8870c26e | 276 | $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l |
06e38c8e | 277 | |
8870c26e JS |
278 | # Try one of these if the above line doesn't work. |
279 | # Alternative syntax (1) | |
280 | # $(LEX) -t -L $(COMMDIR)/lexer.l > $(COMMDIR)/lex_yy.c | |
281 | # Alternative syntax (2) | |
282 | # $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l | |
2bda0e17 KB |
283 | |
284 | # sed -e "s/BUFSIZ/5000/g" < lex.yy.c | \ | |
285 | # sed -e "s/yyoutput(c)/void yyoutput(c)/g" | \ | |
286 | # sed -e "s/YYLMAX 200/YYLMAX 5000/g" > lex_yy.c | |
287 | # rm -f lex.yy.c | |
288 | ||
289 | # Replace yacc with bison if you run into compilation | |
290 | # problems with y_tab.c. | |
57c208c5 | 291 | |
2bda0e17 KB |
292 | $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y |
293 | $(YACC) -o $(COMMDIR)/y_tab.c $(COMMDIR)/parser.y | |
294 | ||
57c208c5 JS |
295 | # If you use e.g. gcc on Unix, uncomment these lines |
296 | # and comment out the above. | |
2bda0e17 | 297 | |
57c208c5 JS |
298 | #$(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y |
299 | # $(YACC) $(COMMDIR)/parser.y | |
300 | # mv y.tab.c $(COMMDIR)/y_tab.c | |
2bda0e17 KB |
301 | |
302 | # Extra targets | |
2bda0e17 KB |
303 | rcparser: |
304 | cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95 | |
305 | cd $(WXDIR)/src/msw | |
306 | ||
307 | clean_rcp: | |
308 | cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95 clean | |
309 | cd $(WXDIR)/src/msw | |
310 | ||
2bda0e17 KB |
311 | clean: |
312 | rm -f $(OBJECTS) $(EXTRAOBJS) ../common/y_tab.c ../common/lex_yy.c $(WXDIR)/lib/libwx$(GUISUFFIX).a core | |
313 | ||
314 | cleanall: clean | |
315 |