2 # wxWindows/Unix main source makefile
4 # Copyright 1998, Markus Holzhem and Robert Roebling
7 # wxWindows base directory
10 # set the OS type for compilation
13 # compile a library only
16 # define source file for odbc
34 # define source file for jpeg
83 # define source file for png
101 # define source file for zlib
118 # include gtk.inc, qt.inc or motif.inc here
119 include @MAKEINCLUDE@
121 # determine library names
122 STATIC_LIBRARY=lib$(LIB_TARGET).a
123 SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR)
125 LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @UNIX_THREAD@
128 LIB_C_ALL_SRC=$(LIB_C_SRC) @IODBC_C_SRC@ @PNG_C_SRC@ @Z_C_SRC@ @JPEG_C_SRC@ parser.c
130 #define library objects
132 $(LIB_CPP_ALL_SRC:.cpp=.o) \
133 $(LIB_C_ALL_SRC:.c=.o)
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
150 @echo "Installing library files and headers.."
152 @echo " Creating directories.."
153 @$(WXBASEDIR)/mkinstalldirs \
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 \
163 @echo " Copying headers from /include/wx"
164 @cd $(WXBASEDIR)/include/wx ; \
165 $(INSTALL) -d $(includedir)/wx ; \
167 rm -f $(includedir)/wx/$$f ; \
168 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
170 for f in *.cpp ; do \
171 rm -f $(includedir)/wx/$$f ; \
172 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
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 ; \
179 rm -f $(includedir)/wx/gtk/$$f ; \
180 $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
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 ; \
188 rm -f $(includedir)/wx/motif/$$f ; \
189 $(INSTALL_DATA) $$f $(includedir)/wx/motif/$$f ; \
192 @echo " Copying headers from /include/wx/generic"
193 @cd $(WXBASEDIR)/include/wx/generic ; \
194 $(INSTALL) -d $(includedir)/wx/generic ; \
196 rm -f $(includedir)/wx/generic/$$f ; \
197 $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \
199 @echo " Copying headers from /include/wx/protocol"
200 @cd $(WXBASEDIR)/include/wx/protocol ; \
202 rm -f $(includedir)/wx/protocol/$$f ; \
203 $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \
205 @echo " Copying headers from /include/wx/unix"
206 @cd $(WXBASEDIR)/include/wx/unix ; \
208 rm -f $(includedir)/wx/unix/$$f ; \
209 $(INSTALL_DATA) $$f $(includedir)/wx/unix/$$f ; \
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 ; \
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 ; \
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 ; \
239 echo " You may have to run ldconfig!" ; \
243 @echo "Installation complete."
257 @$(RM) lexer.c parser.c
259 #additional things needed for compile
262 # include the definitions now
263 include ../../template.mak
265 # things for the prolog stuff
267 parser.c: ../common/parser.y lexer.c
268 @if test ! -f parser.y; then \
269 cp -f ../common/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
281 lexer.c: ../common/lexer.l
282 @if test ! -f lexer.l; then \
283 cp -f ../common/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