]> git.saurik.com Git - wxWidgets.git/blame - src/Makefile.in
Removed some bugs
[wxWidgets.git] / src / Makefile.in
CommitLineData
c801d85f 1#
a1a2adef 2# wxWindows/Unix main source makefile
c801d85f
KB
3#
4# Copyright 1998, Markus Holzhem and Robert Roebling
5#
6
a1a2adef 7# wxWindows base directory
c801d85f
KB
8WXBASEDIR=@WXBASEDIR@
9
10# set the OS type for compilation
11OS=@OS@
12
13# compile a library only
14RULE=gslib
15
16# define common stuff
17
a1a2adef
RR
18# include gtk.inc, qt.inc or motif.inc here
19include @MAKEINCLUDE@
c801d85f 20
f3cb6592
RR
21# determine library names
22STATIC_LIBRARY=lib$(LIB_TARGET).a
23SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR)
24
a1a2adef 25LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @GTK_JOYSTICK@ @UNIX_THREAD@
c801d85f 26
6de97a3b
RR
27LIB_C_ALL_SRC=$(LIB_C_SRC) parser.c
28
c801d85f
KB
29#define library objects
30LIB_OBJ=\
a1a2adef 31 $(LIB_CPP_ALL_SRC:.cpp=.o) \
6de97a3b 32 $(LIB_C_ALL_SRC:.c=.o)
c801d85f
KB
33
34all::
6de97a3b
RR
35 @if test ! -d gtk; then mkdir gtk; fi
36 @if test ! -d qt; then mkdir qt; fi
37 @if test ! -d motif; then mkdir motif; fi
38 @if test ! -d common; then mkdir common; fi
39 @if test ! -d generic; then mkdir generic; fi
40 @if test ! -d png; then mkdir png; fi
41 @if test ! -d zlib; then mkdir zlib; fi
42 @if test ! -d gdk_imlib; then mkdir gdk_imlib; fi
43 @if test ! -d iodbc; then mkdir iodbc; fi
c801d85f 44
c98f0421 45install::
f3cb6592 46 @echo " "
c98f0421 47 @echo "Installing library files and headers.."
f3cb6592 48 @echo " "
c98f0421
RR
49 @echo " Creating directories.."
50 @$(WXBASEDIR)/mkinstalldirs \
51 /usr/local/include/wx \
52 /usr/local/include/wx/gtk \
53 /usr/local/include/wx/common \
54 /usr/local/include/wx/generic
55 @echo " Copying headers from /include/wx"
56 @cd $(WXBASEDIR)/include/wx ; \
57 for f in *.h ; do \
f3cb6592
RR
58 rm -f $(includedir)/wx/$$f ; \
59 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
c98f0421
RR
60 done
61 @echo " Copying headers from /include/wx/gtk"
62 @cd $(WXBASEDIR)/include/wx/gtk ; \
63 for f in *.h ; do \
f3cb6592
RR
64 rm -f $(includedir)/wx/gtk/$$f ; \
65 $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
c98f0421
RR
66 done
67 @echo " Copying headers from /include/wx/generic"
68 @cd $(WXBASEDIR)/include/wx/generic ; \
69 for f in *.h ; do \
f3cb6592
RR
70 rm -f $(includedir)/wx/generic/$$f ; \
71 $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \
c98f0421 72 done
f3cb6592
RR
73 @echo " Copying wx-config"
74 @cd $(WXBASEDIR) ; \
75 rm -f $(bindir)/wx-config ; \
76 $(INSTALL_PROGRAM) wx-config $(bindir)/wx-config
77 @echo " Copying static library"
c98f0421 78 @cd $(WXBASEDIR)/lib/$(OS) ; \
f3cb6592
RR
79 rm -f $(libdir)/$(STATIC_LIBRARY) ; \
80 $(INSTALL_DATA) $(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
81 @echo " Copying shared library"
c98f0421 82 @cd $(WXBASEDIR)/lib/$(OS) ; \
f3cb6592 83 rm -f $(libdir)/$(SHARED_LIBRARY) ; \
11bc0805
RR
84 $(INSTALL_PROGRAM) $(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
85 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
86 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so
f3cb6592
RR
87 @echo " "
88 @echo "Installation complete. You may have to run ldconfig!"
89 @echo " "
90
c98f0421 91
c801d85f
KB
92clean::
93 $(RM) -rf gtk
a1a2adef
RR
94 $(RM) -rf qt
95 $(RM) -rf motif
c801d85f
KB
96 $(RM) -rf common
97 $(RM) -rf generic
98 $(RM) -rf png
99 $(RM) -rf zlib
100 $(RM) -rf gdk_imlib
1a6944fd 101 $(RM) -rf iodbc
6de97a3b 102 @$(RM) lexer.c parser.c
c801d85f
KB
103
104#additional things needed for compile
105ADD_COMPILE= \
7c351dad 106 -DHAVE_LIBPNG -DDJPEG_PROG=\"\" -DCJPEG_PROG=\"\"
c801d85f
KB
107
108# include the definitions now
109include ../../template.mak
6de97a3b
RR
110
111# things for the prolog stuff
112
113parser.c: ../common/parser.y lexer.c
114 @if test ! -f parser.y; then \
115 cp -f ../common/parser.y . ; \
116 fi
117 @$(YACC) parser.y
118 @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \
119 sed -e "s/BUFSIZ/5000/g" | \
120 sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
121 sed -e "s/yy/PROIO_yy/g" | \
122 sed -e "s/input/PROIO_input/g" | \
123 sed -e "s/unput/PROIO_unput/g" > parser.c
124 @$(RM) y.tab.c
125 @$(RM) parser.y
126
127lexer.c: ../common/lexer.l
128 @if test ! -f lexer.l; then \
129 cp -f ../common/lexer.l . ;\
130 fi
131 @$(LEX) lexer.l
132 @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \
133 sed -e "s/yy/PROIO_yy/g" | \
134 sed -e "s/input/PROIO_input/g" | \
135 sed -e "s/unput/PROIO_unput/g" > lexer.c
136 @$(RM) lex.yy.c
137 @$(RM) lexer.l
138
139clean::
140