]>
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) \ |
e90babdf | 62 | $(GENDIR)/progdlgg.$(OBJSUFF) \ |
e3a43801 JS |
63 | $(GENDIR)/prop.$(OBJSUFF) \ |
64 | $(GENDIR)/propform.$(OBJSUFF) \ | |
65 | $(GENDIR)/proplist.$(OBJSUFF) \ | |
27529614 | 66 | $(GENDIR)/sashwin.$(OBJSUFF) \ |
2bda0e17 KB |
67 | $(GENDIR)/scrolwin.$(OBJSUFF) \ |
68 | $(GENDIR)/splitter.$(OBJSUFF) \ | |
69 | $(GENDIR)/statusbr.$(OBJSUFF) \ | |
70 | $(GENDIR)/tabg.$(OBJSUFF) \ | |
71 | $(GENDIR)/textdlgg.$(OBJSUFF) | |
c50f1fb9 | 72 | $(GENDIR)/tipdlg.$(OBJSUFF) |
2bda0e17 | 73 | |
ad5c34f3 JS |
74 | # $(GENDIR)/colrdlgg.$(OBJSUFF) \ |
75 | # $(GENDIR)/fontdlgg.$(OBJSUFF) \ | |
8baa0e61 JS |
76 | # $(GENDIR)/prntdlgg.$(OBJSUFF) \ |
77 | # $(GENDIR)/printps.$(OBJSUFF) \ | |
ad5c34f3 | 78 | # $(GENDIR)/msgdlgg.$(OBJSUFF) \ |
8baa0e61 | 79 | |
2bda0e17 KB |
80 | COMMONOBJS = \ |
81 | $(COMMDIR)/config.$(OBJSUFF) \ | |
82 | $(COMMDIR)/cmndata.$(OBJSUFF) \ | |
eebc8b5e | 83 | $(COMMDIR)/dcbase.$(OBJSUFF) \ |
2bda0e17 | 84 | $(COMMDIR)/docview.$(OBJSUFF) \ |
2108f33a | 85 | $(COMMDIR)/docmdi.$(OBJSUFF) \ |
2bda0e17 KB |
86 | $(COMMDIR)/dynarray.$(OBJSUFF) \ |
87 | $(COMMDIR)/event.$(OBJSUFF) \ | |
88 | $(COMMDIR)/file.$(OBJSUFF) \ | |
89 | $(COMMDIR)/fileconf.$(OBJSUFF) \ | |
90 | $(COMMDIR)/filefn.$(OBJSUFF) \ | |
3d8bd7d6 | 91 | $(COMMDIR)/framecmn.$(OBJSUFF) \ |
2bda0e17 KB |
92 | $(COMMDIR)/gdicmn.$(OBJSUFF) \ |
93 | $(COMMDIR)/helpbase.$(OBJSUFF) \ | |
e3554471 | 94 | $(COMMDIR)/image.$(OBJSUFF) \ |
ce4169a4 | 95 | $(COMMDIR)/imagebmp.$(OBJSUFF) \ |
e9c4b1a2 JS |
96 | $(COMMDIR)/imagpng.$(OBJSUFF) \ |
97 | $(COMMDIR)/imagjpeg.$(OBJSUFF) \ | |
2bda0e17 | 98 | $(COMMDIR)/intl.$(OBJSUFF) \ |
dbda9e86 | 99 | $(COMMDIR)/ipcbase.$(OBJSUFF) \ |
2bda0e17 KB |
100 | $(COMMDIR)/layout.$(OBJSUFF) \ |
101 | $(COMMDIR)/log.$(OBJSUFF) \ | |
102 | $(COMMDIR)/memory.$(OBJSUFF) \ | |
103 | $(COMMDIR)/module.$(OBJSUFF) \ | |
2432b92d | 104 | $(COMMDIR)/mimetype.$(OBJSUFF) \ |
2bda0e17 KB |
105 | $(COMMDIR)/object.$(OBJSUFF) \ |
106 | $(COMMDIR)/odbc.$(OBJSUFF) \ | |
6a6c0a8b | 107 | $(COMMDIR)/process.$(OBJSUFF) \ |
2bda0e17 KB |
108 | $(COMMDIR)/prntbase.$(OBJSUFF) \ |
109 | $(COMMDIR)/resource.$(OBJSUFF) \ | |
110 | $(COMMDIR)/tbarbase.$(OBJSUFF) \ | |
111 | $(COMMDIR)/tbarsmpl.$(OBJSUFF) \ | |
112 | $(COMMDIR)/textfile.$(OBJSUFF) \ | |
113 | $(COMMDIR)/timercmn.$(OBJSUFF) \ | |
114 | $(COMMDIR)/utilscmn.$(OBJSUFF) \ | |
115 | $(COMMDIR)/validate.$(OBJSUFF) \ | |
89c684ef | 116 | $(COMMDIR)/valgen.$(OBJSUFF) \ |
2bda0e17 KB |
117 | $(COMMDIR)/valtext.$(OBJSUFF) \ |
118 | $(COMMDIR)/date.$(OBJSUFF) \ | |
119 | $(COMMDIR)/wxexpr.$(OBJSUFF) \ | |
120 | $(COMMDIR)/hash.$(OBJSUFF) \ | |
121 | $(COMMDIR)/list.$(OBJSUFF) \ | |
341287bf | 122 | $(COMMDIR)/variant.$(OBJSUFF) \ |
7bcb11d3 | 123 | $(COMMDIR)/paper.$(OBJSUFF) \ |
2bda0e17 KB |
124 | $(COMMDIR)/string.$(OBJSUFF) \ |
125 | $(COMMDIR)/time.$(OBJSUFF) \ | |
27529614 | 126 | $(COMMDIR)/tokenzr.$(OBJSUFF) \ |
cf447356 | 127 | $(COMMDIR)/y_tab.$(OBJSUFF) \ |
3d4c6a21 | 128 | $(COMMDIR)/stream.$(OBJSUFF) \ |
25331334 | 129 | $(COMMDIR)/wfstream.$(OBJSUFF) \ |
3d4c6a21 | 130 | $(COMMDIR)/mstream.$(OBJSUFF) \ |
79c3e0e1 | 131 | $(COMMDIR)/zstream.$(OBJSUFF) \ |
cf447356 | 132 | $(COMMDIR)/datstrm.$(OBJSUFF) \ |
27529614 | 133 | $(COMMDIR)/objstrm.$(OBJSUFF) \ |
3d8bd7d6 | 134 | $(COMMDIR)/extended.$(OBJSUFF) \ |
c50f1fb9 | 135 | $(COMMDIR)/dlgcmn.$(OBJSUFF) \ |
c05cbb7f OK |
136 | $(COMMDIR)/wincmn.$(OBJSUFF) \ |
137 | $(COMMDIR)/wxchar.$(OBJSUFF) | |
2bda0e17 | 138 | |
4fabb575 JS |
139 | # NOTE: if the socket-related files fail with a syntax error in Sockets.h, |
140 | # remove the files (probably all GnuWin32 releases < b20). Cygwin b20 is OK, | |
141 | # Mingw32 may still have problems. | |
142 | # $(COMMDIR)/socket.$(OBJSUFF) \ | |
143 | # $(COMMDIR)/sckaddr.$(OBJSUFF) \ | |
144 | # $(COMMDIR)/sckfile.$(OBJSUFF) \ | |
145 | # $(COMMDIR)/sckipc.$(OBJSUFF) \ | |
146 | # $(COMMDIR)/sckstrm.$(OBJSUFF) \ | |
147 | # $(COMMDIR)/protocol.$(OBJSUFF) \ | |
148 | # $(COMMDIR)/http.$(OBJSUFF) \ | |
149 | # $(COMMDIR)/ftp.$(OBJSUFF) \ | |
150 | # $(COMMDIR)/url.$(OBJSUFF) \ | |
27529614 | 151 | |
2bda0e17 | 152 | MSWOBJS = \ |
57a7b7c1 | 153 | accel.$(OBJSUFF) \ |
2bda0e17 KB |
154 | app.$(OBJSUFF) \ |
155 | bitmap.$(OBJSUFF) \ | |
156 | bmpbuttn.$(OBJSUFF) \ | |
157 | brush.$(OBJSUFF) \ | |
158 | button.$(OBJSUFF) \ | |
159 | checkbox.$(OBJSUFF) \ | |
160 | checklst.$(OBJSUFF) \ | |
789295bf | 161 | caret.$(OBJSUFF) \ |
2bda0e17 KB |
162 | choice.$(OBJSUFF) \ |
163 | clipbrd.$(OBJSUFF) \ | |
164 | colordlg.$(OBJSUFF) \ | |
165 | colour.$(OBJSUFF) \ | |
166 | combobox.$(OBJSUFF) \ | |
167 | control.$(OBJSUFF) \ | |
168 | curico.$(OBJSUFF) \ | |
169 | cursor.$(OBJSUFF) \ | |
170 | data.$(OBJSUFF) \ | |
171 | dc.$(OBJSUFF) \ | |
172 | dcmemory.$(OBJSUFF) \ | |
173 | dcclient.$(OBJSUFF) \ | |
174 | dcprint.$(OBJSUFF) \ | |
175 | dcscreen.$(OBJSUFF) \ | |
176 | dde.$(OBJSUFF) \ | |
177 | dialog.$(OBJSUFF) \ | |
178 | dib.$(OBJSUFF) \ | |
2bda0e17 KB |
179 | filedlg.$(OBJSUFF) \ |
180 | font.$(OBJSUFF) \ | |
181 | fontdlg.$(OBJSUFF) \ | |
182 | frame.$(OBJSUFF) \ | |
da87a1ca JS |
183 | gaugemsw.$(OBJSUFF) \ |
184 | gauge95.$(OBJSUFF) \ | |
2bda0e17 KB |
185 | gdiobj.$(OBJSUFF) \ |
186 | helpwin.$(OBJSUFF) \ | |
187 | icon.$(OBJSUFF) \ | |
188 | imaglist.$(OBJSUFF) \ | |
189 | joystick.$(OBJSUFF) \ | |
190 | listbox.$(OBJSUFF) \ | |
191 | listctrl.$(OBJSUFF) \ | |
192 | main.$(OBJSUFF) \ | |
193 | mdi.$(OBJSUFF) \ | |
194 | menu.$(OBJSUFF) \ | |
195 | menuitem.$(OBJSUFF) \ | |
196 | metafile.$(OBJSUFF) \ | |
197 | minifram.$(OBJSUFF) \ | |
198 | msgdlg.$(OBJSUFF) \ | |
199 | nativdlg.$(OBJSUFF) \ | |
8b9518ee | 200 | notebook.$(OBJSUFF) \ |
2bda0e17 KB |
201 | ownerdrw.$(OBJSUFF) \ |
202 | palette.$(OBJSUFF) \ | |
203 | pen.$(OBJSUFF) \ | |
204 | penwin.$(OBJSUFF) \ | |
205 | printdlg.$(OBJSUFF) \ | |
206 | printwin.$(OBJSUFF) \ | |
207 | radiobox.$(OBJSUFF) \ | |
208 | radiobut.$(OBJSUFF) \ | |
209 | region.$(OBJSUFF) \ | |
210 | registry.$(OBJSUFF) \ | |
6a23cbce | 211 | regconf.$(OBJSUFF) \ |
2bda0e17 KB |
212 | scrolbar.$(OBJSUFF) \ |
213 | settings.$(OBJSUFF) \ | |
da87a1ca JS |
214 | slidrmsw.$(OBJSUFF) \ |
215 | slider95.$(OBJSUFF) \ | |
2bda0e17 KB |
216 | spinbutt.$(OBJSUFF) \ |
217 | statbmp.$(OBJSUFF) \ | |
218 | statbox.$(OBJSUFF) \ | |
c50f1fb9 | 219 | statline.$(OBJSUFF) \ |
2bda0e17 KB |
220 | statbr95.$(OBJSUFF) \ |
221 | stattext.$(OBJSUFF) \ | |
222 | tabctrl.$(OBJSUFF) \ | |
223 | taskbar.$(OBJSUFF) \ | |
224 | tbar95.$(OBJSUFF) \ | |
225 | tbarmsw.$(OBJSUFF) \ | |
226 | textctrl.$(OBJSUFF) \ | |
227 | thread.$(OBJSUFF) \ | |
228 | timer.$(OBJSUFF) \ | |
1f112209 | 229 | tooltip.$(OBJSUFF) \ |
2bda0e17 KB |
230 | treectrl.$(OBJSUFF) \ |
231 | utils.$(OBJSUFF) \ | |
cf447356 | 232 | utilsexc.$(OBJSUFF) \ |
2bda0e17 | 233 | wave.$(OBJSUFF) \ |
2fd284a4 JS |
234 | window.$(OBJSUFF) \ |
235 | xpmhand.$(OBJSUFF) | |
27529614 | 236 | |
9ca2fe7e JS |
237 | # Native wxDirDlg can't be compiled due to GnuWin32/OLE limitations |
238 | # dirdlg.$(OBJSUFF) \ | |
239 | ||
74e34480 | 240 | # OLE not supported yet by GnuWin32 |
27529614 JS |
241 | # $(OLEDIR)/droptgt.$(OBJSUFF) \ |
242 | # $(OLEDIR)/dropsrc.$(OBJSUFF) \ | |
243 | # $(OLEDIR)/dataobj.$(OBJSUFF) \ | |
244 | # $(OLEDIR)/oleutils.$(OBJSUFF) \ | |
aa0b7e1e JS |
245 | # $(OLEDIR)/uuid.$(OBJSUFF) \ |
246 | # $(OLEDIR)/automtn.$(OBJSUFF) | |
2bda0e17 | 247 | |
4fabb575 JS |
248 | XPMOBJECTS = $(XPMDIR)/crbuffri.o\ |
249 | $(XPMDIR)/crdatfri.o\ | |
250 | $(XPMDIR)/create.o $(XPMDIR)/crifrbuf.o\ | |
251 | $(XPMDIR)/crifrdat.o\ | |
252 | $(XPMDIR)/data.o\ | |
253 | $(XPMDIR)/hashtab.o $(XPMDIR)/misc.o\ | |
254 | $(XPMDIR)/parse.o $(XPMDIR)/rdftodat.o\ | |
255 | $(XPMDIR)/rdftoi.o\ | |
256 | $(XPMDIR)/rgb.o $(XPMDIR)/scan.o\ | |
257 | $(XPMDIR)/simx.o $(XPMDIR)/wrffrdat.o\ | |
258 | $(XPMDIR)/wrffrp.o $(XPMDIR)/wrffri.o | |
74e34480 | 259 | |
4fabb575 | 260 | OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) # $(XPMOBJECTS) |
2bda0e17 KB |
261 | |
262 | all: $(OBJECTS) $(WXLIB) | |
263 | ||
264 | base: | |
265 | cd $(WXDIR)/src/common; $(MAKE) -f makefile.g95 GUI=$(GUI) GUISUFFIX=$(GUISUFFIX) CC=$(CC)\ | |
266 | OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' DEBUGFLAGS='$(DEBUGFLAGS)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' | |
267 | ||
268 | ||
269 | $(WXLIB): $(OBJECTS) $(EXTRAOBJS) | |
270 | ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS) | |
271 | $(RANLIB) $@ | |
272 | ||
2bda0e17 KB |
273 | $(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(WXINC)/wx/setup.h |
274 | ||
275 | $(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c | |
276 | $(CCLEX) -c $(CPPFLAGS) -o $@ $(COMMDIR)/y_tab.c | |
277 | ||
278 | # Replace lex with flex if you run into compilation | |
279 | # problems with lex_yy.c. See also note about LEX_SCANNER | |
280 | # above. | |
281 | $(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l | |
8870c26e | 282 | $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l |
06e38c8e | 283 | |
8870c26e JS |
284 | # Try one of these if the above line doesn't work. |
285 | # Alternative syntax (1) | |
286 | # $(LEX) -t -L $(COMMDIR)/lexer.l > $(COMMDIR)/lex_yy.c | |
287 | # Alternative syntax (2) | |
288 | # $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l | |
2bda0e17 KB |
289 | |
290 | # sed -e "s/BUFSIZ/5000/g" < lex.yy.c | \ | |
291 | # sed -e "s/yyoutput(c)/void yyoutput(c)/g" | \ | |
292 | # sed -e "s/YYLMAX 200/YYLMAX 5000/g" > lex_yy.c | |
293 | # rm -f lex.yy.c | |
294 | ||
295 | # Replace yacc with bison if you run into compilation | |
296 | # problems with y_tab.c. | |
57c208c5 | 297 | |
2bda0e17 KB |
298 | $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y |
299 | $(YACC) -o $(COMMDIR)/y_tab.c $(COMMDIR)/parser.y | |
300 | ||
57c208c5 JS |
301 | # If you use e.g. gcc on Unix, uncomment these lines |
302 | # and comment out the above. | |
2bda0e17 | 303 | |
57c208c5 JS |
304 | #$(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y |
305 | # $(YACC) $(COMMDIR)/parser.y | |
306 | # mv y.tab.c $(COMMDIR)/y_tab.c | |
2bda0e17 KB |
307 | |
308 | # Extra targets | |
2bda0e17 KB |
309 | rcparser: |
310 | cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95 | |
311 | cd $(WXDIR)/src/msw | |
312 | ||
313 | clean_rcp: | |
314 | cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95 clean | |
315 | cd $(WXDIR)/src/msw | |
316 | ||
2bda0e17 KB |
317 | clean: |
318 | rm -f $(OBJECTS) $(EXTRAOBJS) ../common/y_tab.c ../common/lex_yy.c $(WXDIR)/lib/libwx$(GUISUFFIX).a core | |
319 | ||
320 | cleanall: clean | |
321 |