]>
Commit | Line | Data |
---|---|---|
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 |
8 | WXBASEDIR=@WXBASEDIR@ |
9 | ||
10 | # set the OS type for compilation | |
11 | OS=@OS@ | |
12 | ||
13 | # compile a library only | |
14 | RULE=gslib | |
15 | ||
ac57418f | 16 | # define source file for odbc |
84b46c35 GL |
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 \ | |
84b46c35 GL |
30 | iodbc/misc.c \ |
31 | iodbc/prepare.c \ | |
32 | iodbc/result.c | |
c801d85f | 33 | |
ac57418f RR |
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 | ||
a1a2adef RR |
69 | # include gtk.inc, qt.inc or motif.inc here |
70 | include @MAKEINCLUDE@ | |
c801d85f | 71 | |
f3cb6592 RR |
72 | # determine library names |
73 | STATIC_LIBRARY=lib$(LIB_TARGET).a | |
74 | SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR) | |
75 | ||
f3855ef0 RR |
76 | LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @UNIX_THREAD@ |
77 | # @GTK_JOYSTICK@ | |
c801d85f | 78 | |
ac57418f | 79 | LIB_C_ALL_SRC=$(LIB_C_SRC) @IODBC_C_SRC@ @PNG_C_SRC@ @Z_C_SRC@ parser.c |
6de97a3b | 80 | |
c801d85f KB |
81 | #define library objects |
82 | LIB_OBJ=\ | |
a1a2adef | 83 | $(LIB_CPP_ALL_SRC:.cpp=.o) \ |
6de97a3b | 84 | $(LIB_C_ALL_SRC:.c=.o) |
c801d85f KB |
85 | |
86 | all:: | |
6de97a3b RR |
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 | |
892dbe99 | 90 | @if test ! -d motif/xmcombo; then mkdir motif/xmcombo; fi |
6de97a3b | 91 | @if test ! -d common; then mkdir common; fi |
29545b1d | 92 | @if test ! -d unix; then mkdir unix; fi |
6de97a3b RR |
93 | @if test ! -d generic; then mkdir generic; fi |
94 | @if test ! -d png; then mkdir png; fi | |
95 | @if test ! -d zlib; then mkdir zlib; fi | |
6de97a3b | 96 | @if test ! -d iodbc; then mkdir iodbc; fi |
c801d85f | 97 | |
c98f0421 | 98 | install:: |
f3cb6592 | 99 | @echo " " |
c98f0421 | 100 | @echo "Installing library files and headers.." |
f3cb6592 | 101 | @echo " " |
c98f0421 RR |
102 | @echo " Creating directories.." |
103 | @$(WXBASEDIR)/mkinstalldirs \ | |
d8c83875 RR |
104 | $(includedir)/wx \ |
105 | $(includedir)/wx/gtk \ | |
8c739649 | 106 | $(includedir)/wx/motif \ |
d8c83875 RR |
107 | $(includedir)/wx/common \ |
108 | $(includedir)/wx/generic \ | |
109 | $(includedir)/wx/protocol \ | |
cb43b372 | 110 | $(libdir)/wx/include/wx/gtk \ |
d8c83875 RR |
111 | $(libdir) \ |
112 | $(bindir) | |
c98f0421 RR |
113 | @echo " Copying headers from /include/wx" |
114 | @cd $(WXBASEDIR)/include/wx ; \ | |
a665764c | 115 | $(INSTALL) -d $(includedir)/wx ; \ |
c98f0421 | 116 | for f in *.h ; do \ |
f3cb6592 RR |
117 | rm -f $(includedir)/wx/$$f ; \ |
118 | $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \ | |
f04371f0 RR |
119 | done ; \ |
120 | for f in *.cpp ; do \ | |
121 | rm -f $(includedir)/wx/$$f ; \ | |
122 | $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \ | |
c98f0421 | 123 | done |
8c739649 RR |
124 | @if test "@TOOLKIT@" = "GTK" ; then \ |
125 | echo " Copying headers from /include/wx/gtk" ; \ | |
126 | cd $(WXBASEDIR)/include/wx/gtk ; \ | |
127 | $(INSTALL) -d $(includedir)/wx/gtk ; \ | |
128 | for f in *.h ; do \ | |
129 | rm -f $(includedir)/wx/gtk/$$f ; \ | |
130 | $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \ | |
131 | done ; \ | |
132 | fi | |
133 | @if test "@TOOLKIT@" = "MOTIF" ; then \ | |
134 | echo " Copying headers from /include/wx/motif" ; \ | |
135 | cd $(WXBASEDIR)/include/wx/motif ; \ | |
136 | $(INSTALL) -d $(includedir)/wx/motif ; \ | |
137 | for f in *.h ; do \ | |
138 | rm -f $(includedir)/wx/motif/$$f ; \ | |
139 | $(INSTALL_DATA) $$f $(includedir)/wx/motif/$$f ; \ | |
140 | done ; \ | |
141 | fi | |
c98f0421 RR |
142 | @echo " Copying headers from /include/wx/generic" |
143 | @cd $(WXBASEDIR)/include/wx/generic ; \ | |
a665764c | 144 | $(INSTALL) -d $(includedir)/wx/generic ; \ |
c98f0421 | 145 | for f in *.h ; do \ |
f3cb6592 RR |
146 | rm -f $(includedir)/wx/generic/$$f ; \ |
147 | $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \ | |
c98f0421 | 148 | done |
c058d771 RR |
149 | @echo " Copying headers from /include/wx/protocol" |
150 | @cd $(WXBASEDIR)/include/wx/protocol ; \ | |
151 | for f in *.h ; do \ | |
152 | rm -f $(includedir)/wx/protocol/$$f ; \ | |
153 | $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \ | |
154 | done | |
cb43b372 | 155 | @echo " Moving setup.h to library path" |
8c739649 RR |
156 | @if test "@TOOLKIT@" = "GTK" ; then \ |
157 | cd $(WXBASEDIR)/src ; \ | |
158 | $(INSTALL) -d $(libdir)/wx/include/wx/gtk ; \ | |
159 | mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ; \ | |
160 | fi | |
8c739649 RR |
161 | @if test "@TOOLKIT@" = "MOTIF" ; then \ |
162 | cd $(WXBASEDIR)/src ; \ | |
163 | $(INSTALL) -d $(libdir)/wx/include/wx/motif ; \ | |
164 | mv $(includedir)/wx/motif/setup.h $(libdir)/wx/include/wx/motif/setup.h ; \ | |
165 | fi | |
f3cb6592 | 166 | @echo " Copying wx-config" |
e52f60e6 RR |
167 | @cd $(WXBASEDIR)/src ; \ |
168 | $(INSTALL) -d $(bindir) ; \ | |
f3cb6592 | 169 | rm -f $(bindir)/wx-config ; \ |
e52f60e6 | 170 | $(INSTALL_PROGRAM) $(WXBASEDIR)/wx-config $(bindir)/wx-config |
f3cb6592 | 171 | @echo " Copying static library" |
e52f60e6 | 172 | @cd $(WXBASEDIR)/src ; \ |
f3cb6592 | 173 | rm -f $(libdir)/$(STATIC_LIBRARY) ; \ |
e52f60e6 | 174 | $(INSTALL_DATA) $(WXBASEDIR)/lib/$(OS)/$(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY) |
1bfcb0b6 | 175 | $(STRIP) $(libdir)/$(STATIC_LIBRARY) |
8fdca65c | 176 | @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \ |
cb43b372 | 177 | echo " Copying shared library" ; \ |
cb43b372 | 178 | rm -f $(libdir)/lib$(LIB_TARGET).so* ; \ |
e52f60e6 | 179 | $(INSTALL_PROGRAM) $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \ |
1bfcb0b6 | 180 | $(STRIP) $(libdir)/$(SHARED_LIBRARY) |
d8c83875 RR |
181 | $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \ |
182 | $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \ | |
cb43b372 RR |
183 | echo " " ; \ |
184 | echo " You may have to run ldconfig!" ; \ | |
185 | echo " " ; \ | |
d8c83875 | 186 | fi |
f3cb6592 | 187 | @echo " " |
cb43b372 | 188 | @echo "Installation complete." |
f3cb6592 RR |
189 | @echo " " |
190 | ||
c801d85f KB |
191 | clean:: |
192 | $(RM) -rf gtk | |
a1a2adef RR |
193 | $(RM) -rf qt |
194 | $(RM) -rf motif | |
c801d85f | 195 | $(RM) -rf common |
29545b1d | 196 | $(RM) -rf unix |
c801d85f KB |
197 | $(RM) -rf generic |
198 | $(RM) -rf png | |
199 | $(RM) -rf zlib | |
1a6944fd | 200 | $(RM) -rf iodbc |
6de97a3b | 201 | @$(RM) lexer.c parser.c |
c801d85f KB |
202 | |
203 | #additional things needed for compile | |
01111366 | 204 | ADD_COMPILE= |
c801d85f KB |
205 | |
206 | # include the definitions now | |
207 | include ../../template.mak | |
6de97a3b RR |
208 | |
209 | # things for the prolog stuff | |
210 | ||
211 | parser.c: ../common/parser.y lexer.c | |
212 | @if test ! -f parser.y; then \ | |
213 | cp -f ../common/parser.y . ; \ | |
214 | fi | |
215 | @$(YACC) parser.y | |
216 | @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \ | |
217 | sed -e "s/BUFSIZ/5000/g" | \ | |
218 | sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \ | |
219 | sed -e "s/yy/PROIO_yy/g" | \ | |
220 | sed -e "s/input/PROIO_input/g" | \ | |
221 | sed -e "s/unput/PROIO_unput/g" > parser.c | |
222 | @$(RM) y.tab.c | |
223 | @$(RM) parser.y | |
224 | ||
225 | lexer.c: ../common/lexer.l | |
226 | @if test ! -f lexer.l; then \ | |
227 | cp -f ../common/lexer.l . ;\ | |
228 | fi | |
229 | @$(LEX) lexer.l | |
230 | @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \ | |
231 | sed -e "s/yy/PROIO_yy/g" | \ | |
232 | sed -e "s/input/PROIO_input/g" | \ | |
233 | sed -e "s/unput/PROIO_unput/g" > lexer.c | |
234 | @$(RM) lex.yy.c | |
235 | @$(RM) lexer.l | |
236 | ||
237 | clean:: | |
a665764c | 238 |