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) @UNIX_THREAD@
45 LIB_C_ALL_SRC=$(LIB_C_SRC) @IODBC_C_SRC@ parser.c
47 #define library objects
49 $(LIB_CPP_ALL_SRC:.cpp=.o) \
50 $(LIB_C_ALL_SRC:.c=.o)
53 @if test ! -d gtk; then mkdir gtk; fi
54 @if test ! -d qt; then mkdir qt; fi
55 @if test ! -d motif; then mkdir motif; fi
56 @if test ! -d motif/xmcombo; then mkdir motif/xmcombo; fi
57 @if test ! -d common; then mkdir common; fi
58 @if test ! -d generic; then mkdir generic; fi
59 @if test ! -d png; then mkdir png; fi
60 @if test ! -d zlib; then mkdir zlib; fi
61 @if test ! -d iodbc; then mkdir iodbc; fi
65 @echo "Installing library files and headers.."
67 @echo " Creating directories.."
68 @$(WXBASEDIR)/mkinstalldirs \
70 $(includedir)/wx/gtk \
71 $(includedir)/wx/common \
72 $(includedir)/wx/generic \
73 $(includedir)/wx/protocol \
74 $(libdir)/wx/include/wx/gtk \
77 @echo " Copying headers from /include/wx"
78 @cd $(WXBASEDIR)/include/wx ; \
79 $(INSTALL) -d $(includedir)/wx ; \
81 rm -f $(includedir)/wx/$$f ; \
82 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
85 rm -f $(includedir)/wx/$$f ; \
86 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
88 @echo " Copying headers from /include/wx/gtk"
89 @cd $(WXBASEDIR)/include/wx/gtk ; \
90 $(INSTALL) -d $(includedir)/wx/gtk ; \
92 rm -f $(includedir)/wx/gtk/$$f ; \
93 $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
95 @echo " Copying headers from /include/wx/generic"
96 @cd $(WXBASEDIR)/include/wx/generic ; \
97 $(INSTALL) -d $(includedir)/wx/generic ; \
99 rm -f $(includedir)/wx/generic/$$f ; \
100 $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \
102 @echo " Copying headers from /include/wx/protocol"
103 @cd $(WXBASEDIR)/include/wx/protocol ; \
105 rm -f $(includedir)/wx/protocol/$$f ; \
106 $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \
108 @echo " Moving setup.h to library path"
109 @cd $(WXBASEDIR)/src ; \
110 $(INSTALL) -d $(libdir)/wx/include/wx/gtk ;\
111 mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ;
112 @echo " Copying wx-config"
113 @cd $(WXBASEDIR)/src ; \
114 $(INSTALL) -d $(bindir) ; \
115 rm -f $(bindir)/wx-config ; \
116 $(INSTALL_PROGRAM) $(WXBASEDIR)/wx-config $(bindir)/wx-config
117 @echo " Copying static library"
118 @cd $(WXBASEDIR)/src ; \
119 rm -f $(libdir)/$(STATIC_LIBRARY) ; \
120 $(INSTALL_DATA) $(WXBASEDIR)/lib/$(OS)/$(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
121 @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \
122 echo " Copying shared library" ; \
123 rm -f $(libdir)/lib$(LIB_TARGET).so* ; \
124 $(INSTALL_PROGRAM) $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
125 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
126 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \
128 echo " You may have to run ldconfig!" ; \
132 @echo "Installation complete."
144 @$(RM) lexer.c parser.c
146 #additional things needed for compile
149 # include the definitions now
150 include ../../template.mak
152 # things for the prolog stuff
154 parser.c: ../common/parser.y lexer.c
155 @if test ! -f parser.y; then \
156 cp -f ../common/parser.y . ; \
159 @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \
160 sed -e "s/BUFSIZ/5000/g" | \
161 sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
162 sed -e "s/yy/PROIO_yy/g" | \
163 sed -e "s/input/PROIO_input/g" | \
164 sed -e "s/unput/PROIO_unput/g" > parser.c
168 lexer.c: ../common/lexer.l
169 @if test ! -f lexer.l; then \
170 cp -f ../common/lexer.l . ;\
173 @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \
174 sed -e "s/yy/PROIO_yy/g" | \
175 sed -e "s/input/PROIO_input/g" | \
176 sed -e "s/unput/PROIO_unput/g" > lexer.c