6 # Copyright: (c) 1993, AIAI, University of Edinburgh
8 # "@(#)makefile.unx 1.2 5/9/94"
10 # Makefile for libwx.a
12 # Replace this with your own path if necessary
15 # All common UNIX compiler flags and options are now in
16 # this central makefile.
17 include $(WXDIR)/src/makeg95.env
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.
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
32 # wxstring: string class
33 # USE_GNU_WXSTRING should be 1
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)
44 # Subordinate library possibilities
54 GENERICOBJDIR=../generic/$(OBJDIR)
55 COMMOBJDIR=../common/$(OBJDIR)
56 OLEOBJDIR=ole/$(OBJDIR)
59 DOCDIR = $(WXDIR)\docs
62 $(GENDIR)/choicdgg.$(OBJSUFF) \
63 $(GENDIR)/dirdlgg.$(OBJSUFF) \
64 $(GENDIR)/gridg.$(OBJSUFF) \
65 $(GENDIR)/laywin.$(OBJSUFF) \
66 $(GENDIR)/panelg.$(OBJSUFF) \
67 $(GENDIR)/prop.$(OBJSUFF) \
68 $(GENDIR)/propform.$(OBJSUFF) \
69 $(GENDIR)/proplist.$(OBJSUFF) \
70 $(GENDIR)/sashwin.$(OBJSUFF) \
71 $(GENDIR)/scrolwin.$(OBJSUFF) \
72 $(GENDIR)/splitter.$(OBJSUFF) \
73 $(GENDIR)/statusbr.$(OBJSUFF) \
74 $(GENDIR)/tabg.$(OBJSUFF) \
75 $(GENDIR)/textdlgg.$(OBJSUFF)
77 # $(GENDIR)/colrdlgg.$(OBJSUFF) \
78 # $(GENDIR)/fontdlgg.$(OBJSUFF) \
79 # $(GENDIR)/prntdlgg.$(OBJSUFF) \
80 # $(GENDIR)/printps.$(OBJSUFF) \
81 # $(GENDIR)/msgdlgg.$(OBJSUFF) \
84 $(COMMDIR)/config.$(OBJSUFF) \
85 $(COMMDIR)/cmndata.$(OBJSUFF) \
86 $(COMMDIR)/docview.$(OBJSUFF) \
87 $(COMMDIR)/docmdi.$(OBJSUFF) \
88 $(COMMDIR)/dynarray.$(OBJSUFF) \
89 $(COMMDIR)/event.$(OBJSUFF) \
90 $(COMMDIR)/file.$(OBJSUFF) \
91 $(COMMDIR)/fileconf.$(OBJSUFF) \
92 $(COMMDIR)/filefn.$(OBJSUFF) \
93 $(COMMDIR)/framecmn.$(OBJSUFF) \
94 $(COMMDIR)/gdicmn.$(OBJSUFF) \
95 $(COMMDIR)/helpbase.$(OBJSUFF) \
96 $(COMMDIR)/image.$(OBJSUFF) \
97 $(COMMDIR)/intl.$(OBJSUFF) \
98 $(COMMDIR)/layout.$(OBJSUFF) \
99 $(COMMDIR)/log.$(OBJSUFF) \
100 $(COMMDIR)/memory.$(OBJSUFF) \
101 $(COMMDIR)/module.$(OBJSUFF) \
102 $(COMMDIR)/mimetype.$(OBJSUFF) \
103 $(COMMDIR)/object.$(OBJSUFF) \
104 $(COMMDIR)/odbc.$(OBJSUFF) \
105 $(COMMDIR)/process.$(OBJSUFF) \
106 $(COMMDIR)/prntbase.$(OBJSUFF) \
107 $(COMMDIR)/resource.$(OBJSUFF) \
108 $(COMMDIR)/tbarbase.$(OBJSUFF) \
109 $(COMMDIR)/tbarsmpl.$(OBJSUFF) \
110 $(COMMDIR)/textfile.$(OBJSUFF) \
111 $(COMMDIR)/timercmn.$(OBJSUFF) \
112 $(COMMDIR)/utilscmn.$(OBJSUFF) \
113 $(COMMDIR)/validate.$(OBJSUFF) \
114 $(COMMDIR)/valgen.$(OBJSUFF) \
115 $(COMMDIR)/valtext.$(OBJSUFF) \
116 $(COMMDIR)/date.$(OBJSUFF) \
117 $(COMMDIR)/wxexpr.$(OBJSUFF) \
118 $(COMMDIR)/hash.$(OBJSUFF) \
119 $(COMMDIR)/list.$(OBJSUFF) \
120 $(COMMDIR)/variant.$(OBJSUFF) \
121 $(COMMDIR)/string.$(OBJSUFF) \
122 $(COMMDIR)/time.$(OBJSUFF) \
123 $(COMMDIR)/tokenzr.$(OBJSUFF) \
124 $(COMMDIR)/y_tab.$(OBJSUFF) \
125 $(COMMDIR)/stream.$(OBJSUFF) \
126 $(COMMDIR)/wfstream.$(OBJSUFF) \
127 $(COMMDIR)/mstream.$(OBJSUFF) \
128 $(COMMDIR)/zstream.$(OBJSUFF) \
129 $(COMMDIR)/datstrm.$(OBJSUFF) \
130 $(COMMDIR)/objstrm.$(OBJSUFF) \
131 $(COMMDIR)/extended.$(OBJSUFF) \
132 $(COMMDIR)/wincmn.$(OBJSUFF)
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) \
151 bmpbuttn.$(OBJSUFF) \
154 checkbox.$(OBJSUFF) \
155 checklst.$(OBJSUFF) \
158 colordlg.$(OBJSUFF) \
160 combobox.$(OBJSUFF) \
166 dcmemory.$(OBJSUFF) \
167 dcclient.$(OBJSUFF) \
169 dcscreen.$(OBJSUFF) \
177 gaugemsw.$(OBJSUFF) \
182 imaglist.$(OBJSUFF) \
183 joystick.$(OBJSUFF) \
185 listctrl.$(OBJSUFF) \
189 menuitem.$(OBJSUFF) \
190 metafile.$(OBJSUFF) \
191 minifram.$(OBJSUFF) \
193 nativdlg.$(OBJSUFF) \
194 notebook.$(OBJSUFF) \
195 ownerdrw.$(OBJSUFF) \
199 printdlg.$(OBJSUFF) \
200 printwin.$(OBJSUFF) \
201 radiobox.$(OBJSUFF) \
202 radiobut.$(OBJSUFF) \
204 registry.$(OBJSUFF) \
206 scrolbar.$(OBJSUFF) \
207 settings.$(OBJSUFF) \
208 slidrmsw.$(OBJSUFF) \
209 slider95.$(OBJSUFF) \
210 spinbutt.$(OBJSUFF) \
213 statbr95.$(OBJSUFF) \
214 stattext.$(OBJSUFF) \
219 textctrl.$(OBJSUFF) \
223 treectrl.$(OBJSUFF) \
225 utilsexc.$(OBJSUFF) \
230 # Native wxDirDlg can't be compiled due to GnuWin32/OLE limitations
231 # dirdlg.$(OBJSUFF) \
233 # OLE not supported yet by GnuWin32
234 # $(OLEDIR)/droptgt.$(OBJSUFF) \
235 # $(OLEDIR)/dropsrc.$(OBJSUFF) \
236 # $(OLEDIR)/dataobj.$(OBJSUFF) \
237 # $(OLEDIR)/oleutils.$(OBJSUFF) \
238 # $(OLEDIR)/uuid.$(OBJSUFF) \
239 # $(OLEDIR)/automtn.$(OBJSUFF)
241 XPMOBJECTS = $(XPMDIR)/crbuffri.o\
242 $(XPMDIR)/crdatfri.o\
243 $(XPMDIR)/create.o $(XPMDIR)/crifrbuf.o\
244 $(XPMDIR)/crifrdat.o\
246 $(XPMDIR)/hashtab.o $(XPMDIR)/misc.o\
247 $(XPMDIR)/parse.o $(XPMDIR)/rdftodat.o\
249 $(XPMDIR)/rgb.o $(XPMDIR)/scan.o\
250 $(XPMDIR)/simx.o $(XPMDIR)/wrffrdat.o\
251 $(XPMDIR)/wrffrp.o $(XPMDIR)/wrffri.o
253 OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) # $(XPMOBJECTS)
255 all: $(OBJECTS) $(WXLIB)
258 cd $(WXDIR)/src/common; $(MAKE) -f makefile.g95 GUI=$(GUI) GUISUFFIX=$(GUISUFFIX) CC=$(CC)\
259 OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' DEBUGFLAGS='$(DEBUGFLAGS)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)'
262 $(WXLIB): $(OBJECTS) $(EXTRAOBJS)
263 ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS)
270 # mkdir $(COMMDIR)/$(OBJDIR)
273 # mkdir $(GENDIR)/$(OBJDIR)
275 $(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(WXINC)/wx/setup.h
277 $(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c
278 $(CCLEX) -c $(CPPFLAGS) -o $@ $(COMMDIR)/y_tab.c
280 # Replace lex with flex if you run into compilation
281 # problems with lex_yy.c. See also note about LEX_SCANNER
283 $(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l
284 $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
286 # Try one of these if the above line doesn't work.
287 # Alternative syntax (1)
288 # $(LEX) -t -L $(COMMDIR)/lexer.l > $(COMMDIR)/lex_yy.c
289 # Alternative syntax (2)
290 # $(LEX) -L -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
292 # sed -e "s/BUFSIZ/5000/g" < lex.yy.c | \
293 # sed -e "s/yyoutput(c)/void yyoutput(c)/g" | \
294 # sed -e "s/YYLMAX 200/YYLMAX 5000/g" > lex_yy.c
297 # Replace yacc with bison if you run into compilation
298 # problems with y_tab.c.
300 $(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
301 $(YACC) -o $(COMMDIR)/y_tab.c $(COMMDIR)/parser.y
303 # If you use e.g. gcc on Unix, uncomment these lines
304 # and comment out the above.
306 #$(COMMDIR)/y_tab.c: $(COMMDIR)/parser.y
307 # $(YACC) $(COMMDIR)/parser.y
308 # mv y.tab.c $(COMMDIR)/y_tab.c
312 cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95
316 cd $(WXDIR)/utils/rcparser/src; $(MAKE) -f makefile.g95 clean
320 rm -f $(OBJECTS) $(EXTRAOBJS) ../common/y_tab.c ../common/lex_yy.c $(WXDIR)/lib/libwx$(GUISUFFIX).a core