]> git.saurik.com Git - wxWidgets.git/blame - src/Makefile.in
Augmented version to b5
[wxWidgets.git] / src / Makefile.in
CommitLineData
c801d85f 1#
a1a2adef 2# wxWindows/Unix main source makefile
c801d85f
KB
3#
4# Copyright 1998, Markus Holzhem and Robert Roebling
5#
6
a1a2adef 7# wxWindows base directory
c801d85f
KB
8WXBASEDIR=@WXBASEDIR@
9
10# set the OS type for compilation
11OS=@OS@
12
13# compile a library only
14RULE=gslib
15
ac57418f 16# define source file for odbc
84b46c35
GL
17IODBC_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 \
84b46c35
GL
30 iodbc/misc.c \
31 iodbc/prepare.c \
32 iodbc/result.c
c801d85f 33
e1929140
RR
34# define source file for jpeg
35JPEG_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
ac57418f
RR
83# define source file for png
84PNG_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
102Z_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
a1a2adef
RR
118# include gtk.inc, qt.inc or motif.inc here
119include @MAKEINCLUDE@
c801d85f 120
f3cb6592
RR
121# determine library names
122STATIC_LIBRARY=lib$(LIB_TARGET).a
123SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR)
124
f3855ef0
RR
125LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @UNIX_THREAD@
126# @GTK_JOYSTICK@
c801d85f 127
e1929140 128LIB_C_ALL_SRC=$(LIB_C_SRC) @IODBC_C_SRC@ @PNG_C_SRC@ @Z_C_SRC@ @JPEG_C_SRC@ parser.c
6de97a3b 129
c801d85f
KB
130#define library objects
131LIB_OBJ=\
a1a2adef 132 $(LIB_CPP_ALL_SRC:.cpp=.o) \
6de97a3b 133 $(LIB_C_ALL_SRC:.c=.o)
c801d85f
KB
134
135all::
6de97a3b
RR
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
892dbe99 139 @if test ! -d motif/xmcombo; then mkdir motif/xmcombo; fi
6de97a3b 140 @if test ! -d common; then mkdir common; fi
29545b1d 141 @if test ! -d unix; then mkdir unix; fi
6de97a3b
RR
142 @if test ! -d generic; then mkdir generic; fi
143 @if test ! -d png; then mkdir png; fi
e1929140 144 @if test ! -d jpeg; then mkdir jpeg; fi
6de97a3b 145 @if test ! -d zlib; then mkdir zlib; fi
6de97a3b 146 @if test ! -d iodbc; then mkdir iodbc; fi
c801d85f 147
c98f0421 148install::
f3cb6592 149 @echo " "
c98f0421 150 @echo "Installing library files and headers.."
f3cb6592 151 @echo " "
c98f0421
RR
152 @echo " Creating directories.."
153 @$(WXBASEDIR)/mkinstalldirs \
d8c83875
RR
154 $(includedir)/wx \
155 $(includedir)/wx/gtk \
8c739649 156 $(includedir)/wx/motif \
034be888 157 $(includedir)/wx/unix \
d8c83875
RR
158 $(includedir)/wx/generic \
159 $(includedir)/wx/protocol \
cb43b372 160 $(libdir)/wx/include/wx/gtk \
d8c83875
RR
161 $(libdir) \
162 $(bindir)
c98f0421
RR
163 @echo " Copying headers from /include/wx"
164 @cd $(WXBASEDIR)/include/wx ; \
a665764c 165 $(INSTALL) -d $(includedir)/wx ; \
c98f0421 166 for f in *.h ; do \
f3cb6592
RR
167 rm -f $(includedir)/wx/$$f ; \
168 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
f04371f0
RR
169 done ; \
170 for f in *.cpp ; do \
171 rm -f $(includedir)/wx/$$f ; \
172 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
c98f0421 173 done
8c739649
RR
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
c98f0421
RR
192 @echo " Copying headers from /include/wx/generic"
193 @cd $(WXBASEDIR)/include/wx/generic ; \
a665764c 194 $(INSTALL) -d $(includedir)/wx/generic ; \
c98f0421 195 for f in *.h ; do \
f3cb6592
RR
196 rm -f $(includedir)/wx/generic/$$f ; \
197 $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \
c98f0421 198 done
c058d771
RR
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
034be888
RR
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
cb43b372 211 @echo " Moving setup.h to library path"
8c739649
RR
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
8c739649
RR
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
f3cb6592 222 @echo " Copying wx-config"
e52f60e6
RR
223 @cd $(WXBASEDIR)/src ; \
224 $(INSTALL) -d $(bindir) ; \
f3cb6592 225 rm -f $(bindir)/wx-config ; \
e52f60e6 226 $(INSTALL_PROGRAM) $(WXBASEDIR)/wx-config $(bindir)/wx-config
f3cb6592 227 @echo " Copying static library"
e52f60e6 228 @cd $(WXBASEDIR)/src ; \
f3cb6592 229 rm -f $(libdir)/$(STATIC_LIBRARY) ; \
e52f60e6 230 $(INSTALL_DATA) $(WXBASEDIR)/lib/$(OS)/$(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
8fdca65c 231 @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \
cb43b372 232 echo " Copying shared library" ; \
cb43b372 233 rm -f $(libdir)/lib$(LIB_TARGET).so* ; \
e52f60e6 234 $(INSTALL_PROGRAM) $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
034be888 235 $(STRIP) $(libdir)/$(SHARED_LIBRARY) ; \
d8c83875
RR
236 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
237 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \
cb43b372
RR
238 echo " " ; \
239 echo " You may have to run ldconfig!" ; \
240 echo " " ; \
d8c83875 241 fi
f3cb6592 242 @echo " "
cb43b372 243 @echo "Installation complete."
f3cb6592
RR
244 @echo " "
245
c801d85f
KB
246clean::
247 $(RM) -rf gtk
a1a2adef
RR
248 $(RM) -rf qt
249 $(RM) -rf motif
c801d85f 250 $(RM) -rf common
29545b1d 251 $(RM) -rf unix
c801d85f
KB
252 $(RM) -rf generic
253 $(RM) -rf png
e1929140 254 $(RM) -rf jpeg
c801d85f 255 $(RM) -rf zlib
1a6944fd 256 $(RM) -rf iodbc
6de97a3b 257 @$(RM) lexer.c parser.c
c801d85f
KB
258
259#additional things needed for compile
01111366 260ADD_COMPILE=
c801d85f
KB
261
262# include the definitions now
263include ../../template.mak
6de97a3b
RR
264
265# things for the prolog stuff
266
267parser.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
281lexer.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
293clean::
a665764c 294