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) @IOBC_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 common; then mkdir common; fi
56 @if test ! -d generic; then mkdir generic; fi
57 @if test ! -d png; then mkdir png; fi
58 @if test ! -d zlib; then mkdir zlib; fi
59 @if test ! -d iodbc; then mkdir iodbc; fi
63 @echo "Installing library files and headers.."
65 @echo " Creating directories.."
66 @$(WXBASEDIR)/mkinstalldirs \
68 $(includedir)/wx/gtk \
69 $(includedir)/wx/common \
70 $(includedir)/wx/generic \
71 $(includedir)/wx/protocol \
72 $(libdir)/wx/include/wx/gtk \
75 @echo " Copying headers from /include/wx"
76 @cd $(WXBASEDIR)/include/wx ; \
77 $(INSTALL) -d $(includedir)/wx ; \
79 rm -f $(includedir)/wx/$$f ; \
80 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
82 @echo " Copying headers from /include/wx/gtk"
83 @cd $(WXBASEDIR)/include/wx/gtk ; \
84 $(INSTALL) -d $(includedir)/wx/gtk ; \
86 rm -f $(includedir)/wx/gtk/$$f ; \
87 $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
89 @echo " Copying headers from /include/wx/generic"
90 @cd $(WXBASEDIR)/include/wx/generic ; \
91 $(INSTALL) -d $(includedir)/wx/generic ; \
93 rm -f $(includedir)/wx/generic/$$f ; \
94 $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \
96 @echo " Copying headers from /include/wx/protocol"
97 @cd $(WXBASEDIR)/include/wx/protocol ; \
99 rm -f $(includedir)/wx/protocol/$$f ; \
100 $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \
102 @echo " Moving setup.h to library path"
103 @$(INSTALL) -d $(libdir)/wx/include/wx/gtk ;\
104 mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ;
105 @echo " Copying wx-config"
107 $(INSTALL) -d $(bindir) ;\
108 rm -f $(bindir)/wx-config ; \
109 $(INSTALL_PROGRAM) wx-config $(bindir)/wx-config
110 @echo " Copying static library"
111 @cd $(WXBASEDIR)/lib/$(OS) ; \
112 rm -f $(libdir)/$(STATIC_LIBRARY) ; \
113 $(INSTALL_DATA) $(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
114 @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \
115 echo " Copying shared library" ; \
116 cd $(WXBASEDIR)/lib/$(OS) ; \
117 rm -f $(libdir)/lib$(LIB_TARGET).so* ; \
118 $(INSTALL_PROGRAM) $(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
119 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
120 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \
122 echo " You may have to run ldconfig!" ; \
126 @echo "Installation complete."
138 @$(RM) lexer.c parser.c
140 #additional things needed for compile
143 # include the definitions now
144 include ../../template.mak
146 # things for the prolog stuff
148 parser.c: ../common/parser.y lexer.c
149 @if test ! -f parser.y; then \
150 cp -f ../common/parser.y . ; \
153 @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \
154 sed -e "s/BUFSIZ/5000/g" | \
155 sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
156 sed -e "s/yy/PROIO_yy/g" | \
157 sed -e "s/input/PROIO_input/g" | \
158 sed -e "s/unput/PROIO_unput/g" > parser.c
162 lexer.c: ../common/lexer.l
163 @if test ! -f lexer.l; then \
164 cp -f ../common/lexer.l . ;\
167 @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \
168 sed -e "s/yy/PROIO_yy/g" | \
169 sed -e "s/input/PROIO_input/g" | \
170 sed -e "s/unput/PROIO_unput/g" > lexer.c