]>
Commit | Line | Data |
---|---|---|
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 source file for odbc | |
17 | IODBC_C_SRC=\ | |
18 | iodbc/catalog.c \ | |
19 | iodbc/connect.c \ | |
20 | iodbc/dlf.c \ | |
21 | iodbc/dlproc.c \ | |
22 | iodbc/execute.c \ | |
23 | iodbc/fetch.c \ | |
24 | iodbc/hdbc.c \ | |
25 | iodbc/henv.c \ | |
26 | iodbc/herr.c \ | |
27 | iodbc/hstmt.c \ | |
28 | iodbc/info.c \ | |
29 | iodbc/itrace.c \ | |
30 | iodbc/misc.c \ | |
31 | iodbc/prepare.c \ | |
32 | iodbc/result.c | |
33 | ||
34 | # define source file for png | |
35 | PNG_C_SRC=\ | |
36 | png/png.c \ | |
37 | png/pngset.c \ | |
38 | png/pngget.c \ | |
39 | png/pngrutil.c \ | |
40 | png/pngtrans.c \ | |
41 | png/pngwutil.c \ | |
42 | png/pngread.c \ | |
43 | png/pngrio.c \ | |
44 | png/pngwio.c \ | |
45 | png/pngwrite.c \ | |
46 | png/pngrtran.c \ | |
47 | png/pngwtran.c \ | |
48 | png/pngmem.c \ | |
49 | png/pngerror.c \ | |
50 | png/pngpread.c | |
51 | ||
52 | # define source file for zlib | |
53 | Z_C_SRC=\ | |
54 | zlib/adler32.c \ | |
55 | zlib/compress.c \ | |
56 | zlib/crc32.c \ | |
57 | zlib/gzio.c \ | |
58 | zlib/uncompr.c \ | |
59 | zlib/deflate.c \ | |
60 | zlib/trees.c \ | |
61 | zlib/zutil.c \ | |
62 | zlib/inflate.c \ | |
63 | zlib/infblock.c \ | |
64 | zlib/inftrees.c \ | |
65 | zlib/infcodes.c \ | |
66 | zlib/infutil.c \ | |
67 | zlib/inffast.c | |
68 | ||
69 | # include gtk.inc, qt.inc or motif.inc here | |
70 | include @MAKEINCLUDE@ | |
71 | ||
72 | # determine library names | |
73 | STATIC_LIBRARY=lib$(LIB_TARGET).a | |
74 | SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR) | |
75 | ||
76 | LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @UNIX_THREAD@ | |
77 | # @GTK_JOYSTICK@ | |
78 | ||
79 | LIB_C_ALL_SRC=$(LIB_C_SRC) @IODBC_C_SRC@ @PNG_C_SRC@ @Z_C_SRC@ parser.c | |
80 | ||
81 | #define library objects | |
82 | LIB_OBJ=\ | |
83 | $(LIB_CPP_ALL_SRC:.cpp=.o) \ | |
84 | $(LIB_C_ALL_SRC:.c=.o) | |
85 | ||
86 | all:: | |
87 | @if test ! -d gtk; then mkdir gtk; fi | |
88 | @if test ! -d qt; then mkdir qt; fi | |
89 | @if test ! -d motif; then mkdir motif; fi | |
90 | @if test ! -d motif/xmcombo; then mkdir motif/xmcombo; fi | |
91 | @if test ! -d common; then mkdir common; fi | |
92 | @if test ! -d generic; then mkdir generic; fi | |
93 | @if test ! -d png; then mkdir png; fi | |
94 | @if test ! -d zlib; then mkdir zlib; fi | |
95 | @if test ! -d iodbc; then mkdir iodbc; fi | |
96 | ||
97 | install:: | |
98 | @echo " " | |
99 | @echo "Installing library files and headers.." | |
100 | @echo " " | |
101 | @echo " Creating directories.." | |
102 | @$(WXBASEDIR)/mkinstalldirs \ | |
103 | $(includedir)/wx \ | |
104 | $(includedir)/wx/gtk \ | |
105 | $(includedir)/wx/motif \ | |
106 | $(includedir)/wx/common \ | |
107 | $(includedir)/wx/generic \ | |
108 | $(includedir)/wx/protocol \ | |
109 | $(libdir)/wx/include/wx/gtk \ | |
110 | $(libdir) \ | |
111 | $(bindir) | |
112 | @echo " Copying headers from /include/wx" | |
113 | @cd $(WXBASEDIR)/include/wx ; \ | |
114 | $(INSTALL) -d $(includedir)/wx ; \ | |
115 | for f in *.h ; do \ | |
116 | rm -f $(includedir)/wx/$$f ; \ | |
117 | $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \ | |
118 | done ; \ | |
119 | for f in *.cpp ; do \ | |
120 | rm -f $(includedir)/wx/$$f ; \ | |
121 | $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \ | |
122 | done | |
123 | @if test "@TOOLKIT@" = "GTK" ; then \ | |
124 | echo " Copying headers from /include/wx/gtk" ; \ | |
125 | cd $(WXBASEDIR)/include/wx/gtk ; \ | |
126 | $(INSTALL) -d $(includedir)/wx/gtk ; \ | |
127 | for f in *.h ; do \ | |
128 | rm -f $(includedir)/wx/gtk/$$f ; \ | |
129 | $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \ | |
130 | done ; \ | |
131 | fi | |
132 | @if test "@TOOLKIT@" = "MOTIF" ; then \ | |
133 | echo " Copying headers from /include/wx/motif" ; \ | |
134 | cd $(WXBASEDIR)/include/wx/motif ; \ | |
135 | $(INSTALL) -d $(includedir)/wx/motif ; \ | |
136 | for f in *.h ; do \ | |
137 | rm -f $(includedir)/wx/motif/$$f ; \ | |
138 | $(INSTALL_DATA) $$f $(includedir)/wx/motif/$$f ; \ | |
139 | done ; \ | |
140 | fi | |
141 | @echo " Copying headers from /include/wx/generic" | |
142 | @cd $(WXBASEDIR)/include/wx/generic ; \ | |
143 | $(INSTALL) -d $(includedir)/wx/generic ; \ | |
144 | for f in *.h ; do \ | |
145 | rm -f $(includedir)/wx/generic/$$f ; \ | |
146 | $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \ | |
147 | done | |
148 | @echo " Copying headers from /include/wx/protocol" | |
149 | @cd $(WXBASEDIR)/include/wx/protocol ; \ | |
150 | for f in *.h ; do \ | |
151 | rm -f $(includedir)/wx/protocol/$$f ; \ | |
152 | $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \ | |
153 | done | |
154 | @echo " Moving setup.h to library path" | |
155 | @if test "@TOOLKIT@" = "GTK" ; then \ | |
156 | cd $(WXBASEDIR)/src ; \ | |
157 | $(INSTALL) -d $(libdir)/wx/include/wx/gtk ; \ | |
158 | mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ; \ | |
159 | fi | |
160 | @if test "@TOOLKIT@" = "MOTIF" ; then \ | |
161 | cd $(WXBASEDIR)/src ; \ | |
162 | $(INSTALL) -d $(libdir)/wx/include/wx/motif ; \ | |
163 | mv $(includedir)/wx/motif/setup.h $(libdir)/wx/include/wx/motif/setup.h ; \ | |
164 | fi | |
165 | @echo " Copying wx-config" | |
166 | @cd $(WXBASEDIR)/src ; \ | |
167 | $(INSTALL) -d $(bindir) ; \ | |
168 | rm -f $(bindir)/wx-config ; \ | |
169 | $(INSTALL_PROGRAM) $(WXBASEDIR)/wx-config $(bindir)/wx-config | |
170 | @echo " Copying static library" | |
171 | @cd $(WXBASEDIR)/src ; \ | |
172 | rm -f $(libdir)/$(STATIC_LIBRARY) ; \ | |
173 | $(INSTALL_DATA) $(WXBASEDIR)/lib/$(OS)/$(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY) | |
174 | @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \ | |
175 | echo " Copying shared library" ; \ | |
176 | rm -f $(libdir)/lib$(LIB_TARGET).so* ; \ | |
177 | $(INSTALL_PROGRAM) $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \ | |
178 | $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \ | |
179 | $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \ | |
180 | echo " " ; \ | |
181 | echo " You may have to run ldconfig!" ; \ | |
182 | echo " " ; \ | |
183 | fi | |
184 | @echo " " | |
185 | @echo "Installation complete." | |
186 | @echo " " | |
187 | ||
188 | clean:: | |
189 | $(RM) -rf gtk | |
190 | $(RM) -rf qt | |
191 | $(RM) -rf motif | |
192 | $(RM) -rf common | |
193 | $(RM) -rf generic | |
194 | $(RM) -rf png | |
195 | $(RM) -rf zlib | |
196 | $(RM) -rf iodbc | |
197 | @$(RM) lexer.c parser.c | |
198 | ||
199 | #additional things needed for compile | |
200 | ADD_COMPILE= | |
201 | ||
202 | # include the definitions now | |
203 | include ../../template.mak | |
204 | ||
205 | # things for the prolog stuff | |
206 | ||
207 | parser.c: ../common/parser.y lexer.c | |
208 | @if test ! -f parser.y; then \ | |
209 | cp -f ../common/parser.y . ; \ | |
210 | fi | |
211 | @$(YACC) parser.y | |
212 | @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \ | |
213 | sed -e "s/BUFSIZ/5000/g" | \ | |
214 | sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \ | |
215 | sed -e "s/yy/PROIO_yy/g" | \ | |
216 | sed -e "s/input/PROIO_input/g" | \ | |
217 | sed -e "s/unput/PROIO_unput/g" > parser.c | |
218 | @$(RM) y.tab.c | |
219 | @$(RM) parser.y | |
220 | ||
221 | lexer.c: ../common/lexer.l | |
222 | @if test ! -f lexer.l; then \ | |
223 | cp -f ../common/lexer.l . ;\ | |
224 | fi | |
225 | @$(LEX) lexer.l | |
226 | @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \ | |
227 | sed -e "s/yy/PROIO_yy/g" | \ | |
228 | sed -e "s/input/PROIO_input/g" | \ | |
229 | sed -e "s/unput/PROIO_unput/g" > lexer.c | |
230 | @$(RM) lex.yy.c | |
231 | @$(RM) lexer.l | |
232 | ||
233 | clean:: | |
234 |