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/common \
107 $(includedir)/wx/generic \
108 $(includedir)/wx/protocol \
109 $(libdir)/wx/include/wx/gtk \
112 @echo " Copying headers from /include/wx"
113 @cd $(WXBASEDIR)/include/wx ; \
114 $(INSTALL) -d $(includedir)/wx ; \
116 rm -f $(includedir)/wx/$$f ; \
117 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
119 for f in *.cpp ; do \
120 rm -f $(includedir)/wx/$$f ; \
121 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
123 @echo " Copying headers from /include/wx/gtk"
124 @cd $(WXBASEDIR)/include/wx/gtk ; \
125 $(INSTALL) -d $(includedir)/wx/gtk ; \
127 rm -f $(includedir)/wx/gtk/$$f ; \
128 $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
130 @echo " Copying headers from /include/wx/generic"
131 @cd $(WXBASEDIR)/include/wx/generic ; \
132 $(INSTALL) -d $(includedir)/wx/generic ; \
134 rm -f $(includedir)/wx/generic/$$f ; \
135 $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \
137 @echo " Copying headers from /include/wx/protocol"
138 @cd $(WXBASEDIR)/include/wx/protocol ; \
140 rm -f $(includedir)/wx/protocol/$$f ; \
141 $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \
143 @echo " Moving setup.h to library path"
144 @cd $(WXBASEDIR)/src ; \
145 $(INSTALL) -d $(libdir)/wx/include/wx/gtk ;\
146 mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ;
147 @echo " Copying wx-config"
148 @cd $(WXBASEDIR)/src ; \
149 $(INSTALL) -d $(bindir) ; \
150 rm -f $(bindir)/wx-config ; \
151 $(INSTALL_PROGRAM) $(WXBASEDIR)/wx-config $(bindir)/wx-config
152 @echo " Copying static library"
153 @cd $(WXBASEDIR)/src ; \
154 rm -f $(libdir)/$(STATIC_LIBRARY) ; \
155 $(INSTALL_DATA) $(WXBASEDIR)/lib/$(OS)/$(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
156 @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \
157 echo " Copying shared library" ; \
158 rm -f $(libdir)/lib$(LIB_TARGET).so* ; \
159 $(INSTALL_PROGRAM) $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
160 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
161 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \
163 echo " You may have to run ldconfig!" ; \
167 @echo "Installation complete."
179 @$(RM) lexer.c parser.c
181 #additional things needed for compile
184 # include the definitions now
185 include ../../template.mak
187 # things for the prolog stuff
189 parser.c: ../common/parser.y lexer.c
190 @if test ! -f parser.y; then \
191 cp -f ../common/parser.y . ; \
194 @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \
195 sed -e "s/BUFSIZ/5000/g" | \
196 sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
197 sed -e "s/yy/PROIO_yy/g" | \
198 sed -e "s/input/PROIO_input/g" | \
199 sed -e "s/unput/PROIO_unput/g" > parser.c
203 lexer.c: ../common/lexer.l
204 @if test ! -f lexer.l; then \
205 cp -f ../common/lexer.l . ;\
208 @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \
209 sed -e "s/yy/PROIO_yy/g" | \
210 sed -e "s/input/PROIO_input/g" | \
211 sed -e "s/unput/PROIO_unput/g" > lexer.c