]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # wxWindows/Unix main source makefile | |
3 | # | |
4 | # Copyright 1998, Markus Holzhem and Robert Roebling | |
5 | # | |
6 | ||
7 | # wxWindows base directory | |
8 | WXBASEDIR=@WXBASEDIR@ | |
9 | ||
10 | # set the OS type for compilation | |
11 | OS=@OS@ | |
12 | ||
13 | # compile a library only | |
14 | RULE=gslib | |
15 | ||
16 | # define source file for odbc | |
17 | IODBC_C_SRC=\ | |
18 | iodbc/catalog.c \ | |
19 | iodbc/connect.c \ | |
20 | iodbc/dlf.c \ | |
21 | iodbc/dlproc.c \ | |
22 | iodbc/execute.c \ | |
23 | iodbc/fetch.c \ | |
24 | iodbc/hdbc.c \ | |
25 | iodbc/henv.c \ | |
26 | iodbc/herr.c \ | |
27 | iodbc/hstmt.c \ | |
28 | iodbc/info.c \ | |
29 | iodbc/itrace.c \ | |
30 | iodbc/misc.c \ | |
31 | iodbc/prepare.c \ | |
32 | iodbc/result.c | |
33 | ||
34 | # define source file for jpeg | |
35 | JPEG_C_SRC=\ | |
36 | jpeg/jcapimin.c \ | |
37 | jpeg/jcapistd.c \ | |
38 | jpeg/jccoefct.c \ | |
39 | jpeg/jccolor.c \ | |
40 | jpeg/jcdctmgr.c \ | |
41 | jpeg/jchuff.c \ | |
42 | jpeg/jcinit.c \ | |
43 | jpeg/jcmainct.c \ | |
44 | jpeg/jcmarker.c \ | |
45 | jpeg/jcmaster.c \ | |
46 | jpeg/jcomapi.c \ | |
47 | jpeg/jcparam.c \ | |
48 | jpeg/jcphuff.c \ | |
49 | jpeg/jcprepct.c \ | |
50 | jpeg/jcsample.c \ | |
51 | jpeg/jctrans.c \ | |
52 | jpeg/jdapimin.c \ | |
53 | jpeg/jdapistd.c \ | |
54 | jpeg/jdatadst.c \ | |
55 | jpeg/jdatasrc.c \ | |
56 | jpeg/jdcoefct.c \ | |
57 | jpeg/jdcolor.c \ | |
58 | jpeg/jddctmgr.c \ | |
59 | jpeg/jdhuff.c \ | |
60 | jpeg/jdinput.c \ | |
61 | jpeg/jdmainct.c \ | |
62 | jpeg/jdmarker.c \ | |
63 | jpeg/jdmaster.c \ | |
64 | jpeg/jdmerge.c \ | |
65 | jpeg/jdphuff.c \ | |
66 | jpeg/jdpostct.c \ | |
67 | jpeg/jdsample.c \ | |
68 | jpeg/jdtrans.c \ | |
69 | jpeg/jerror.c \ | |
70 | jpeg/jfdctflt.c \ | |
71 | jpeg/jfdctfst.c \ | |
72 | jpeg/jfdctint.c \ | |
73 | jpeg/jidctflt.c \ | |
74 | jpeg/jidctfst.c \ | |
75 | jpeg/jidctint.c \ | |
76 | jpeg/jidctred.c \ | |
77 | jpeg/jquant1.c \ | |
78 | jpeg/jquant2.c \ | |
79 | jpeg/jutils.c \ | |
80 | jpeg/jmemmgr.c \ | |
81 | jpeg/jmemnobs.c | |
82 | ||
83 | # define source file for png | |
84 | PNG_C_SRC=\ | |
85 | png/png.c \ | |
86 | png/pngset.c \ | |
87 | png/pngget.c \ | |
88 | png/pngrutil.c \ | |
89 | png/pngtrans.c \ | |
90 | png/pngwutil.c \ | |
91 | png/pngread.c \ | |
92 | png/pngrio.c \ | |
93 | png/pngwio.c \ | |
94 | png/pngwrite.c \ | |
95 | png/pngrtran.c \ | |
96 | png/pngwtran.c \ | |
97 | png/pngmem.c \ | |
98 | png/pngerror.c \ | |
99 | png/pngpread.c | |
100 | ||
101 | # define source file for zlib | |
102 | Z_C_SRC=\ | |
103 | zlib/adler32.c \ | |
104 | zlib/compress.c \ | |
105 | zlib/crc32.c \ | |
106 | zlib/gzio.c \ | |
107 | zlib/uncompr.c \ | |
108 | zlib/deflate.c \ | |
109 | zlib/trees.c \ | |
110 | zlib/zutil.c \ | |
111 | zlib/inflate.c \ | |
112 | zlib/infblock.c \ | |
113 | zlib/inftrees.c \ | |
114 | zlib/infcodes.c \ | |
115 | zlib/infutil.c \ | |
116 | zlib/inffast.c | |
117 | ||
118 | # include gtk.inc, qt.inc or motif.inc here | |
119 | include @MAKEINCLUDE@ | |
120 | ||
121 | # determine library names | |
122 | STATIC_LIBRARY=lib$(LIB_TARGET).a | |
123 | SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR) | |
124 | ||
125 | LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @UNIX_THREAD@ | |
126 | # @GTK_JOYSTICK@ | |
127 | ||
128 | LIB_C_ALL_SRC=$(LIB_C_SRC) @IODBC_C_SRC@ @PNG_C_SRC@ @Z_C_SRC@ @JPEG_C_SRC@ parser.c | |
129 | ||
130 | #define library objects | |
131 | LIB_OBJ=\ | |
132 | $(LIB_CPP_ALL_SRC:.cpp=.o) \ | |
133 | $(LIB_C_ALL_SRC:.c=.o) | |
134 | ||
135 | all:: | |
136 | @if test ! -d gtk; then mkdir gtk; fi | |
137 | @if test ! -d qt; then mkdir qt; fi | |
138 | @if test ! -d motif; then mkdir motif; fi | |
139 | @if test ! -d motif/xmcombo; then mkdir motif/xmcombo; fi | |
140 | @if test ! -d common; then mkdir common; fi | |
141 | @if test ! -d unix; then mkdir unix; fi | |
142 | @if test ! -d generic; then mkdir generic; fi | |
143 | @if test ! -d png; then mkdir png; fi | |
144 | @if test ! -d jpeg; then mkdir jpeg; fi | |
145 | @if test ! -d zlib; then mkdir zlib; fi | |
146 | @if test ! -d iodbc; then mkdir iodbc; fi | |
147 | ||
148 | install:: | |
149 | @echo " " | |
150 | @echo "Installing library files and headers.." | |
151 | @echo " " | |
152 | @echo " Creating directories.." | |
153 | @$(WXBASEDIR)/mkinstalldirs \ | |
154 | $(includedir)/wx \ | |
155 | $(includedir)/wx/gtk \ | |
156 | $(includedir)/wx/motif \ | |
157 | $(includedir)/wx/unix \ | |
158 | $(includedir)/wx/generic \ | |
159 | $(includedir)/wx/protocol \ | |
160 | $(libdir)/wx/include/wx/gtk \ | |
161 | $(libdir) \ | |
162 | $(bindir) | |
163 | @echo " Copying headers from /include/wx" | |
164 | @cd $(WXBASEDIR)/include/wx ; \ | |
165 | $(INSTALL) -d $(includedir)/wx ; \ | |
166 | for f in *.h ; do \ | |
167 | rm -f $(includedir)/wx/$$f ; \ | |
168 | $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \ | |
169 | done ; \ | |
170 | for f in *.cpp ; do \ | |
171 | rm -f $(includedir)/wx/$$f ; \ | |
172 | $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \ | |
173 | done | |
174 | @if test "@TOOLKIT@" = "GTK" ; then \ | |
175 | echo " Copying headers from /include/wx/gtk" ; \ | |
176 | cd $(WXBASEDIR)/include/wx/gtk ; \ | |
177 | $(INSTALL) -d $(includedir)/wx/gtk ; \ | |
178 | for f in *.h ; do \ | |
179 | rm -f $(includedir)/wx/gtk/$$f ; \ | |
180 | $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \ | |
181 | done ; \ | |
182 | fi | |
183 | @if test "@TOOLKIT@" = "MOTIF" ; then \ | |
184 | echo " Copying headers from /include/wx/motif" ; \ | |
185 | cd $(WXBASEDIR)/include/wx/motif ; \ | |
186 | $(INSTALL) -d $(includedir)/wx/motif ; \ | |
187 | for f in *.h ; do \ | |
188 | rm -f $(includedir)/wx/motif/$$f ; \ | |
189 | $(INSTALL_DATA) $$f $(includedir)/wx/motif/$$f ; \ | |
190 | done ; \ | |
191 | fi | |
192 | @echo " Copying headers from /include/wx/generic" | |
193 | @cd $(WXBASEDIR)/include/wx/generic ; \ | |
194 | $(INSTALL) -d $(includedir)/wx/generic ; \ | |
195 | for f in *.h ; do \ | |
196 | rm -f $(includedir)/wx/generic/$$f ; \ | |
197 | $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \ | |
198 | done | |
199 | @echo " Copying headers from /include/wx/protocol" | |
200 | @cd $(WXBASEDIR)/include/wx/protocol ; \ | |
201 | for f in *.h ; do \ | |
202 | rm -f $(includedir)/wx/protocol/$$f ; \ | |
203 | $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \ | |
204 | done | |
205 | @echo " Copying headers from /include/wx/unix" | |
206 | @cd $(WXBASEDIR)/include/wx/unix ; \ | |
207 | for f in *.h ; do \ | |
208 | rm -f $(includedir)/wx/unix/$$f ; \ | |
209 | $(INSTALL_DATA) $$f $(includedir)/wx/unix/$$f ; \ | |
210 | done | |
211 | @echo " Moving setup.h to library path" | |
212 | @if test "@TOOLKIT@" = "GTK" ; then \ | |
213 | cd $(WXBASEDIR)/src ; \ | |
214 | $(INSTALL) -d $(libdir)/wx/include/wx/gtk ; \ | |
215 | mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ; \ | |
216 | fi | |
217 | @if test "@TOOLKIT@" = "MOTIF" ; then \ | |
218 | cd $(WXBASEDIR)/src ; \ | |
219 | $(INSTALL) -d $(libdir)/wx/include/wx/motif ; \ | |
220 | mv $(includedir)/wx/motif/setup.h $(libdir)/wx/include/wx/motif/setup.h ; \ | |
221 | fi | |
222 | @echo " Copying wx-config" | |
223 | @cd $(WXBASEDIR)/src ; \ | |
224 | $(INSTALL) -d $(bindir) ; \ | |
225 | rm -f $(bindir)/wx-config ; \ | |
226 | $(INSTALL_PROGRAM) $(WXBASEDIR)/wx-config $(bindir)/wx-config | |
227 | @echo " Copying static library" | |
228 | @cd $(WXBASEDIR)/src ; \ | |
229 | rm -f $(libdir)/$(STATIC_LIBRARY) ; \ | |
230 | $(INSTALL_DATA) $(WXBASEDIR)/lib/$(OS)/$(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY) | |
231 | @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \ | |
232 | echo " Copying shared library" ; \ | |
233 | rm -f $(libdir)/lib$(LIB_TARGET).so* ; \ | |
234 | $(INSTALL_PROGRAM) $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \ | |
235 | $(STRIP) $(libdir)/$(SHARED_LIBRARY) ; \ | |
236 | $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \ | |
237 | $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \ | |
238 | echo " " ; \ | |
239 | echo " You may have to run ldconfig!" ; \ | |
240 | echo " " ; \ | |
241 | fi | |
242 | @echo " " | |
243 | @echo "Installation complete." | |
244 | @echo " " | |
245 | ||
246 | clean:: | |
247 | $(RM) -rf gtk | |
248 | $(RM) -rf qt | |
249 | $(RM) -rf motif | |
250 | $(RM) -rf common | |
251 | $(RM) -rf unix | |
252 | $(RM) -rf generic | |
253 | $(RM) -rf png | |
254 | $(RM) -rf jpeg | |
255 | $(RM) -rf zlib | |
256 | $(RM) -rf iodbc | |
257 | @$(RM) lexer.c parser.c | |
258 | ||
259 | #additional things needed for compile | |
260 | ADD_COMPILE= | |
261 | ||
262 | # include the definitions now | |
263 | include ../../template.mak | |
264 | ||
265 | # things for the prolog stuff | |
266 | ||
267 | parser.c: ../common/parser.y lexer.c | |
268 | @if test ! -f parser.y; then \ | |
269 | cp -f ../common/parser.y . ; \ | |
270 | fi | |
271 | @$(YACC) parser.y | |
272 | @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \ | |
273 | sed -e "s/BUFSIZ/5000/g" | \ | |
274 | sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \ | |
275 | sed -e "s/yy/PROIO_yy/g" | \ | |
276 | sed -e "s/input/PROIO_input/g" | \ | |
277 | sed -e "s/unput/PROIO_unput/g" > parser.c | |
278 | @$(RM) y.tab.c | |
279 | @$(RM) parser.y | |
280 | ||
281 | lexer.c: ../common/lexer.l | |
282 | @if test ! -f lexer.l; then \ | |
283 | cp -f ../common/lexer.l . ;\ | |
284 | fi | |
285 | @$(LEX) lexer.l | |
286 | @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \ | |
287 | sed -e "s/yy/PROIO_yy/g" | \ | |
288 | sed -e "s/input/PROIO_input/g" | \ | |
289 | sed -e "s/unput/PROIO_unput/g" > lexer.c | |
290 | @$(RM) lex.yy.c | |
291 | @$(RM) lexer.l | |
292 | ||
293 | clean:: | |
294 |