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
35 # include gtk.inc, qt.inc or motif.inc here
38 # determine library names
39 STATIC_LIBRARY=lib$(LIB_TARGET).a
40 SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR)
42 LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @GTK_JOYSTICK@ @UNIX_THREAD@
44 LIB_C_ALL_SRC=$(LIB_C_SRC) @IODBC_C_SRC@ parser.c
46 #define library objects
48 $(LIB_CPP_ALL_SRC:.cpp=.o) \
49 $(LIB_C_ALL_SRC:.c=.o)
52 @if test ! -d gtk; then mkdir gtk; fi
53 @if test ! -d qt; then mkdir qt; fi
54 @if test ! -d motif; then mkdir motif; fi
55 @if test ! -d motif/xmcombo; then mkdir motif/xmcombo; fi
56 @if test ! -d common; then mkdir common; fi
57 @if test ! -d generic; then mkdir generic; fi
58 @if test ! -d png; then mkdir png; fi
59 @if test ! -d zlib; then mkdir zlib; fi
60 @if test ! -d iodbc; then mkdir iodbc; fi
64 @echo "Installing library files and headers.."
66 @echo " Creating directories.."
67 @$(WXBASEDIR)/mkinstalldirs \
69 $(includedir)/wx/gtk \
70 $(includedir)/wx/common \
71 $(includedir)/wx/generic \
72 $(includedir)/wx/protocol \
73 $(libdir)/wx/include/wx/gtk \
76 @echo " Copying headers from /include/wx"
77 @cd $(WXBASEDIR)/include/wx ; \
78 $(INSTALL) -d $(includedir)/wx ; \
80 rm -f $(includedir)/wx/$$f ; \
81 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
84 rm -f $(includedir)/wx/$$f ; \
85 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
87 @echo " Copying headers from /include/wx/gtk"
88 @cd $(WXBASEDIR)/include/wx/gtk ; \
89 $(INSTALL) -d $(includedir)/wx/gtk ; \
91 rm -f $(includedir)/wx/gtk/$$f ; \
92 $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
94 @echo " Copying headers from /include/wx/generic"
95 @cd $(WXBASEDIR)/include/wx/generic ; \
96 $(INSTALL) -d $(includedir)/wx/generic ; \
98 rm -f $(includedir)/wx/generic/$$f ; \
99 $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \
101 @echo " Copying headers from /include/wx/protocol"
102 @cd $(WXBASEDIR)/include/wx/protocol ; \
104 rm -f $(includedir)/wx/protocol/$$f ; \
105 $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \
107 @echo " Moving setup.h to library path"
108 @cd $(WXBASEDIR)/src ; \
109 $(INSTALL) -d $(libdir)/wx/include/wx/gtk ;\
110 mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ;
111 @echo " Copying wx-config"
112 @cd $(WXBASEDIR)/src ; \
113 $(INSTALL) -d $(bindir) ; \
114 rm -f $(bindir)/wx-config ; \
115 $(INSTALL_PROGRAM) $(WXBASEDIR)/wx-config $(bindir)/wx-config
116 @echo " Copying static library"
117 @cd $(WXBASEDIR)/src ; \
118 rm -f $(libdir)/$(STATIC_LIBRARY) ; \
119 $(INSTALL_DATA) $(WXBASEDIR)/lib/$(OS)/$(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
120 @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \
121 echo " Copying shared library" ; \
122 rm -f $(libdir)/lib$(LIB_TARGET).so* ; \
123 $(INSTALL_PROGRAM) $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
124 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
125 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \
127 echo " You may have to run ldconfig!" ; \
131 @echo "Installation complete."
143 @$(RM) lexer.c parser.c
145 #additional things needed for compile
148 # include the definitions now
149 include ../../template.mak
151 # things for the prolog stuff
153 parser.c: ../common/parser.y lexer.c
154 @if test ! -f parser.y; then \
155 cp -f ../common/parser.y . ; \
158 @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \
159 sed -e "s/BUFSIZ/5000/g" | \
160 sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
161 sed -e "s/yy/PROIO_yy/g" | \
162 sed -e "s/input/PROIO_input/g" | \
163 sed -e "s/unput/PROIO_unput/g" > parser.c
167 lexer.c: ../common/lexer.l
168 @if test ! -f lexer.l; then \
169 cp -f ../common/lexer.l . ;\
172 @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \
173 sed -e "s/yy/PROIO_yy/g" | \
174 sed -e "s/input/PROIO_input/g" | \
175 sed -e "s/unput/PROIO_unput/g" > lexer.c