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
18 # include gtk.inc, qt.inc or motif.inc here
21 LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @GTK_JOYSTICK@ @UNIX_THREAD@
23 LIB_C_ALL_SRC=$(LIB_C_SRC) parser.c
25 #define library objects
27 $(LIB_CPP_ALL_SRC:.cpp=.o) \
28 $(LIB_C_ALL_SRC:.c=.o)
31 @if test ! -d gtk; then mkdir gtk; fi
32 @if test ! -d qt; then mkdir qt; fi
33 @if test ! -d motif; then mkdir motif; fi
34 @if test ! -d common; then mkdir common; fi
35 @if test ! -d generic; then mkdir generic; fi
36 @if test ! -d png; then mkdir png; fi
37 @if test ! -d zlib; then mkdir zlib; fi
38 @if test ! -d gdk_imlib; then mkdir gdk_imlib; fi
39 @if test ! -d iodbc; then mkdir iodbc; fi
42 @echo "Installing library files and headers.."
43 @echo " Creating directories.."
44 @$(WXBASEDIR)/mkinstalldirs \
45 /usr/local/include/wx \
46 /usr/local/include/wx/gtk \
47 /usr/local/include/wx/common \
48 /usr/local/include/wx/generic
49 @echo " Copying headers from /include/wx"
50 @cd $(WXBASEDIR)/include/wx ; \
52 rm -f /usr/local/include/wx/$$f ; \
53 $(INSTALL_DATA) $$f /usr/local/include/wx/$$f ; \
55 @echo " Copying headers from /include/wx/gtk"
56 @cd $(WXBASEDIR)/include/wx/gtk ; \
58 rm -f /usr/local/include/wx/gtk/$$f ; \
59 $(INSTALL_DATA) $$f /usr/local/include/wx/gtk/$$f ; \
61 @echo " Copying headers from /include/wx/generic"
62 @cd $(WXBASEDIR)/include/wx/generic ; \
64 rm -f /usr/local/include/wx/generic/$$f ; \
65 $(INSTALL_DATA) $$f /usr/local/include/wx/generic/$$f ; \
67 @echo " Copying static libraries files to /usr/local/lib"
68 @cd $(WXBASEDIR)/lib/$(OS) ; \
69 for f in libwx_gtk.a ; do \
70 rm -f /usr/local/lib/$$f ; \
71 $(INSTALL_DATA) $$f /usr/local/lib/$$f ; \
73 @echo " Copying shared libraries to /usr/local/lib"
74 @cd $(WXBASEDIR)/lib/$(OS) ; \
75 for f in libwx_gtk.so* ; do \
76 rm -f /usr/local/lib/$$f ; \
77 $(INSTALL_PROGRAM) $$f /usr/local/lib/$$f ; \
90 @$(RM) lexer.c parser.c
92 #additional things needed for compile
94 -DHAVE_LIBPNG -DDJPEG_PROG=\"\" -DCJPEG_PROG=\"\"
96 # include the definitions now
97 include ../../template.mak
99 # things for the prolog stuff
101 parser.c: ../common/parser.y lexer.c
102 @if test ! -f parser.y; then \
103 cp -f ../common/parser.y . ; \
106 @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \
107 sed -e "s/BUFSIZ/5000/g" | \
108 sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
109 sed -e "s/yy/PROIO_yy/g" | \
110 sed -e "s/input/PROIO_input/g" | \
111 sed -e "s/unput/PROIO_unput/g" > parser.c
115 lexer.c: ../common/lexer.l
116 @if test ! -f lexer.l; then \
117 cp -f ../common/lexer.l . ;\
120 @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \
121 sed -e "s/yy/PROIO_yy/g" | \
122 sed -e "s/input/PROIO_input/g" | \
123 sed -e "s/unput/PROIO_unput/g" > lexer.c