]> git.saurik.com Git - wxWidgets.git/blob - src/Makefile.in
no message
[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 # determine library names
22 STATIC_LIBRARY=lib$(LIB_TARGET).a
23 SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR)
24
25 LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @GTK_JOYSTICK@ @UNIX_THREAD@
26
27 LIB_C_ALL_SRC=$(LIB_C_SRC) parser.c
28
29 #define library objects
30 LIB_OBJ=\
31 $(LIB_CPP_ALL_SRC:.cpp=.o) \
32 $(LIB_C_ALL_SRC:.c=.o)
33
34 all::
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 iodbc; then mkdir iodbc; fi
43
44 install::
45 @echo " "
46 @echo "Installing library files and headers.."
47 @echo " "
48 @echo " Creating directories.."
49 @$(WXBASEDIR)/mkinstalldirs \
50 $(includedir)/wx \
51 $(includedir)/wx/gtk \
52 $(includedir)/wx/common \
53 $(includedir)/wx/generic \
54 $(includedir)/wx/protocol \
55 $(libdir)/wx/include/wx/gtk \
56 $(libdir) \
57 $(bindir)
58 @echo " Copying headers from /include/wx"
59 @cd $(WXBASEDIR)/include/wx ; \
60 $(INSTALL) -d $(includedir)/wx ; \
61 for f in *.h ; do \
62 rm -f $(includedir)/wx/$$f ; \
63 $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
64 done
65 @echo " Copying headers from /include/wx/gtk"
66 @cd $(WXBASEDIR)/include/wx/gtk ; \
67 $(INSTALL) -d $(includedir)/wx/gtk ; \
68 for f in *.h ; do \
69 rm -f $(includedir)/wx/gtk/$$f ; \
70 $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
71 done ;
72 @echo " Copying headers from /include/wx/generic"
73 @cd $(WXBASEDIR)/include/wx/generic ; \
74 $(INSTALL) -d $(includedir)/wx/generic ; \
75 for f in *.h ; do \
76 rm -f $(includedir)/wx/generic/$$f ; \
77 $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \
78 done
79 @echo " Copying headers from /include/wx/protocol"
80 @cd $(WXBASEDIR)/include/wx/protocol ; \
81 for f in *.h ; do \
82 rm -f $(includedir)/wx/protocol/$$f ; \
83 $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \
84 done
85 @echo " Moving setup.h to library path"
86 @$(INSTALL) -d $(libdir)/wx/include/wx/gtk ;\
87 mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ;
88 @echo " Copying wx-config"
89 @cd $(WXBASEDIR) ; \
90 $(INSTALL) -d $(bindir) ;\
91 rm -f $(bindir)/wx-config ; \
92 $(INSTALL_PROGRAM) wx-config $(bindir)/wx-config
93 @echo " Copying static library"
94 @cd $(WXBASEDIR)/lib/$(OS) ; \
95 rm -f $(libdir)/$(STATIC_LIBRARY) ; \
96 $(INSTALL_DATA) $(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
97 @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \
98 echo " Copying shared library" ; \
99 cd $(WXBASEDIR)/lib/$(OS) ; \
100 rm -f $(libdir)/lib$(LIB_TARGET).so* ; \
101 $(INSTALL_PROGRAM) $(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
102 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
103 $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \
104 echo " " ; \
105 echo " You may have to run ldconfig!" ; \
106 echo " " ; \
107 fi
108 @echo " "
109 @echo "Installation complete."
110 @echo " "
111
112 clean::
113 $(RM) -rf gtk
114 $(RM) -rf qt
115 $(RM) -rf motif
116 $(RM) -rf common
117 $(RM) -rf generic
118 $(RM) -rf png
119 $(RM) -rf zlib
120 $(RM) -rf iodbc
121 @$(RM) lexer.c parser.c
122
123 #additional things needed for compile
124 ADD_COMPILE=
125
126 # include the definitions now
127 include ../../template.mak
128
129 # things for the prolog stuff
130
131 parser.c: ../common/parser.y lexer.c
132 @if test ! -f parser.y; then \
133 cp -f ../common/parser.y . ; \
134 fi
135 @$(YACC) parser.y
136 @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \
137 sed -e "s/BUFSIZ/5000/g" | \
138 sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
139 sed -e "s/yy/PROIO_yy/g" | \
140 sed -e "s/input/PROIO_input/g" | \
141 sed -e "s/unput/PROIO_unput/g" > parser.c
142 @$(RM) y.tab.c
143 @$(RM) parser.y
144
145 lexer.c: ../common/lexer.l
146 @if test ! -f lexer.l; then \
147 cp -f ../common/lexer.l . ;\
148 fi
149 @$(LEX) lexer.l
150 @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \
151 sed -e "s/yy/PROIO_yy/g" | \
152 sed -e "s/input/PROIO_input/g" | \
153 sed -e "s/unput/PROIO_unput/g" > lexer.c
154 @$(RM) lex.yy.c
155 @$(RM) lexer.l
156
157 clean::
158