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
35 # define source file for png
53 # define source file for zlib
70 # include gtk.inc, qt.inc or motif.inc here
73 # determine library names
74 STATIC_LIBRARY=lib$(LIB_TARGET).a
75 SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR)
77 LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @UNIX_THREAD@
80 LIB_C_ALL_SRC=$(LIB_C_SRC) @IODBC_C_SRC@ @PNG_C_SRC@ @Z_C_SRC@ parser.c
82 #define library objects
84 $(LIB_CPP_ALL_SRC:.cpp=.o) \
85 $(LIB_C_ALL_SRC:.c=.o)
88 @if test ! -d gtk; then mkdir gtk; fi
89 @if test ! -d qt; then mkdir qt; fi
90 @if test ! -d motif; then mkdir motif; fi
91 @if test ! -d motif/xmcombo; then mkdir motif/xmcombo; fi
92 @if test ! -d common; then mkdir common; fi
93 @if test ! -d generic; then mkdir generic; fi
94 @if test ! -d png; then mkdir png; fi
95 @if test ! -d zlib; then mkdir zlib; fi
96 @if test ! -d iodbc; then mkdir iodbc; fi
100 @echo "Installing library files and headers.."
102 @echo " Creating directories.."
103 @$(WXBASEDIR)/mkinstalldirs \
105 $(includedir)/wx/gtk \
106 $(includedir)/wx/motif \
107 $(includedir)/wx/common \
108 $(includedir)/wx/generic \
109 $(includedir)/wx/protocol \
110 $(libdir)/wx/include/wx/gtk \
113 @echo " Copying headers from /include/wx"
114 @cd $(WXBASEDIR)/include/wx ; \
115 $(INSTALL) -d $(includedir)/wx ; \
117 rm -f $(includedir)/wx/$$f ; \
118 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
120 for f in *.cpp ; do \
121 rm -f $(includedir)/wx/$$f ; \
122 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
124 @if test "@TOOLKIT@" = "GTK" ; then \
125 echo " Copying headers from /include/wx/gtk" ; \
126 cd $(WXBASEDIR)/include/wx/gtk ; \
127 $(INSTALL) -d $(includedir)/wx/gtk ; \
129 rm -f $(includedir)/wx/gtk/$$f ; \
130 $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
133 @if test "@TOOLKIT@" = "MOTIF" ; then \
134 echo " Copying headers from /include/wx/motif" ; \
135 cd $(WXBASEDIR)/include/wx/motif ; \
136 $(INSTALL) -d $(includedir)/wx/motif ; \
138 rm -f $(includedir)/wx/motif/$$f ; \
139 $(INSTALL_DATA) $$f $(includedir)/wx/motif/$$f ; \
142 @echo " Copying headers from /include/wx/generic"
143 @cd $(WXBASEDIR)/include/wx/generic ; \
144 $(INSTALL) -d $(includedir)/wx/generic ; \
146 rm -f $(includedir)/wx/generic/$$f ; \
147 $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \
149 @echo " Copying headers from /include/wx/protocol"
150 @cd $(WXBASEDIR)/include/wx/protocol ; \
152 rm -f $(includedir)/wx/protocol/$$f ; \
153 $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \
155 @echo " Moving setup.h to library path"
156 @if test "@TOOLKIT@" = "GTK" ; then \
157 cd $(WXBASEDIR)/src ; \
158 $(INSTALL) -d $(libdir)/wx/include/wx/gtk ; \
159 mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ; \
161 @echo " Moving setup.h to library path"
162 @if test "@TOOLKIT@" = "MOTIF" ; then \
163 cd $(WXBASEDIR)/src ; \
164 $(INSTALL) -d $(libdir)/wx/include/wx/motif ; \
165 mv $(includedir)/wx/motif/setup.h $(libdir)/wx/include/wx/motif/setup.h ; \
167 @echo " Copying wx-config"
168 @cd $(WXBASEDIR)/src ; \
169 $(INSTALL) -d $(bindir) ; \
170 rm -f $(bindir)/wx-config ; \
171 $(INSTALL_PROGRAM) $(WXBASEDIR)/wx-config $(bindir)/wx-config
172 @echo " Copying static library"
173 @cd $(WXBASEDIR)/src ; \
174 rm -f $(libdir)/$(STATIC_LIBRARY) ; \
175 $(INSTALL_DATA) $(WXBASEDIR)/lib/$(OS)/$(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
176 @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \
177 echo " Copying shared library" ; \
178 rm -f $(libdir)/lib$(LIB_TARGET).so* ; \
179 $(INSTALL_PROGRAM) $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
180 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
181 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \
183 echo " You may have to run ldconfig!" ; \
187 @echo "Installation complete."
199 @$(RM) lexer.c parser.c
201 #additional things needed for compile
204 # include the definitions now
205 include ../../template.mak
207 # things for the prolog stuff
209 parser.c: ../common/parser.y lexer.c
210 @if test ! -f parser.y; then \
211 cp -f ../common/parser.y . ; \
214 @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \
215 sed -e "s/BUFSIZ/5000/g" | \
216 sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
217 sed -e "s/yy/PROIO_yy/g" | \
218 sed -e "s/input/PROIO_input/g" | \
219 sed -e "s/unput/PROIO_unput/g" > parser.c
223 lexer.c: ../common/lexer.l
224 @if test ! -f lexer.l; then \
225 cp -f ../common/lexer.l . ;\
228 @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \
229 sed -e "s/yy/PROIO_yy/g" | \
230 sed -e "s/input/PROIO_input/g" | \
231 sed -e "s/unput/PROIO_unput/g" > lexer.c