]> git.saurik.com Git - wxWidgets.git/blob - src/Makefile.in
c9dac317330188026cac241d6308d2ee0f044ef7
[wxWidgets.git] / src / Makefile.in
1 #
2 # wxWindows/Unix main source makefile
3 #
4 # Copyright 1998, Markus Holzhem and Robert Roebling
5 #
6
7 # wxWindows base directory
8 WXBASEDIR=@WXBASEDIR@
9
10 # set the OS type for compilation
11 OS=@OS@
12
13 # compile a library only
14 RULE=gslib
15
16 # define common stuff
17
18 # include gtk.inc, qt.inc or motif.inc here
19 include @MAKEINCLUDE@
20
21 LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @GTK_JOYSTICK@ @UNIX_THREAD@
22
23 LIB_C_ALL_SRC=$(LIB_C_SRC) parser.c
24
25 #define library objects
26 LIB_OBJ=\
27 $(LIB_CPP_ALL_SRC:.cpp=.o) \
28 $(LIB_C_ALL_SRC:.c=.o)
29
30 all::
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
40
41 install::
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 ; \
51 for f in *.h ; do \
52 rm -f /usr/local/include/wx/$$f ; \
53 $(INSTALL_DATA) $$f /usr/local/include/wx/$$f ; \
54 done
55 @echo " Copying headers from /include/wx/gtk"
56 @cd $(WXBASEDIR)/include/wx/gtk ; \
57 for f in *.h ; do \
58 rm -f /usr/local/include/wx/gtk/$$f ; \
59 $(INSTALL_DATA) $$f /usr/local/include/wx/gtk/$$f ; \
60 done
61 @echo " Copying headers from /include/wx/generic"
62 @cd $(WXBASEDIR)/include/wx/generic ; \
63 for f in *.h ; do \
64 rm -f /usr/local/include/wx/generic/$$f ; \
65 $(INSTALL_DATA) $$f /usr/local/include/wx/generic/$$f ; \
66 done
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 ; \
72 done
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 ; \
78 done
79
80 clean::
81 $(RM) -rf gtk
82 $(RM) -rf qt
83 $(RM) -rf motif
84 $(RM) -rf common
85 $(RM) -rf generic
86 $(RM) -rf png
87 $(RM) -rf zlib
88 $(RM) -rf gdk_imlib
89 $(RM) -rf iodbc
90 @$(RM) lexer.c parser.c
91
92 #additional things needed for compile
93 ADD_COMPILE= \
94 -DHAVE_LIBPNG -DDJPEG_PROG=\"\" -DCJPEG_PROG=\"\"
95
96 # include the definitions now
97 include ../../template.mak
98
99 # things for the prolog stuff
100
101 parser.c: ../common/parser.y lexer.c
102 @if test ! -f parser.y; then \
103 cp -f ../common/parser.y . ; \
104 fi
105 @$(YACC) 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
112 @$(RM) y.tab.c
113 @$(RM) parser.y
114
115 lexer.c: ../common/lexer.l
116 @if test ! -f lexer.l; then \
117 cp -f ../common/lexer.l . ;\
118 fi
119 @$(LEX) 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
124 @$(RM) lex.yy.c
125 @$(RM) lexer.l
126
127 clean::
128