]>
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 \ | |
30 | iodbc/main.c \ | |
31 | iodbc/misc.c \ | |
32 | iodbc/prepare.c \ | |
33 | iodbc/result.c | |
c801d85f | 34 | |
ac57418f RR |
35 | # define source file for png |
36 | PNG_C_SRC=\ | |
37 | png/png.c \ | |
38 | png/pngset.c \ | |
39 | png/pngget.c \ | |
40 | png/pngrutil.c \ | |
41 | png/pngtrans.c \ | |
42 | png/pngwutil.c \ | |
43 | png/pngread.c \ | |
44 | png/pngrio.c \ | |
45 | png/pngwio.c \ | |
46 | png/pngwrite.c \ | |
47 | png/pngrtran.c \ | |
48 | png/pngwtran.c \ | |
49 | png/pngmem.c \ | |
50 | png/pngerror.c \ | |
51 | png/pngpread.c | |
52 | ||
53 | # define source file for zlib | |
54 | Z_C_SRC=\ | |
55 | zlib/adler32.c \ | |
56 | zlib/compress.c \ | |
57 | zlib/crc32.c \ | |
58 | zlib/gzio.c \ | |
59 | zlib/uncompr.c \ | |
60 | zlib/deflate.c \ | |
61 | zlib/trees.c \ | |
62 | zlib/zutil.c \ | |
63 | zlib/inflate.c \ | |
64 | zlib/infblock.c \ | |
65 | zlib/inftrees.c \ | |
66 | zlib/infcodes.c \ | |
67 | zlib/infutil.c \ | |
68 | zlib/inffast.c | |
69 | ||
a1a2adef RR |
70 | # include gtk.inc, qt.inc or motif.inc here |
71 | include @MAKEINCLUDE@ | |
c801d85f | 72 | |
f3cb6592 RR |
73 | # determine library names |
74 | STATIC_LIBRARY=lib$(LIB_TARGET).a | |
75 | SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR) | |
76 | ||
f3855ef0 RR |
77 | LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @UNIX_THREAD@ |
78 | # @GTK_JOYSTICK@ | |
c801d85f | 79 | |
ac57418f | 80 | LIB_C_ALL_SRC=$(LIB_C_SRC) @IODBC_C_SRC@ @PNG_C_SRC@ @Z_C_SRC@ parser.c |
6de97a3b | 81 | |
c801d85f KB |
82 | #define library objects |
83 | LIB_OBJ=\ | |
a1a2adef | 84 | $(LIB_CPP_ALL_SRC:.cpp=.o) \ |
6de97a3b | 85 | $(LIB_C_ALL_SRC:.c=.o) |
c801d85f KB |
86 | |
87 | all:: | |
6de97a3b RR |
88 | @if test ! -d gtk; then mkdir gtk; fi |
89 | @if test ! -d qt; then mkdir qt; fi | |
90 | @if test ! -d motif; then mkdir motif; fi | |
892dbe99 | 91 | @if test ! -d motif/xmcombo; then mkdir motif/xmcombo; fi |
6de97a3b RR |
92 | @if test ! -d common; then mkdir common; fi |
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 \ | |
106 | $(includedir)/wx/common \ | |
107 | $(includedir)/wx/generic \ | |
108 | $(includedir)/wx/protocol \ | |
cb43b372 | 109 | $(libdir)/wx/include/wx/gtk \ |
d8c83875 RR |
110 | $(libdir) \ |
111 | $(bindir) | |
c98f0421 RR |
112 | @echo " Copying headers from /include/wx" |
113 | @cd $(WXBASEDIR)/include/wx ; \ | |
a665764c | 114 | $(INSTALL) -d $(includedir)/wx ; \ |
c98f0421 | 115 | for f in *.h ; do \ |
f3cb6592 RR |
116 | rm -f $(includedir)/wx/$$f ; \ |
117 | $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \ | |
f04371f0 RR |
118 | done ; \ |
119 | for f in *.cpp ; do \ | |
120 | rm -f $(includedir)/wx/$$f ; \ | |
121 | $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \ | |
c98f0421 RR |
122 | done |
123 | @echo " Copying headers from /include/wx/gtk" | |
124 | @cd $(WXBASEDIR)/include/wx/gtk ; \ | |
a665764c | 125 | $(INSTALL) -d $(includedir)/wx/gtk ; \ |
c98f0421 | 126 | for f in *.h ; do \ |
f3cb6592 RR |
127 | rm -f $(includedir)/wx/gtk/$$f ; \ |
128 | $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \ | |
f04371f0 | 129 | done |
c98f0421 RR |
130 | @echo " Copying headers from /include/wx/generic" |
131 | @cd $(WXBASEDIR)/include/wx/generic ; \ | |
a665764c | 132 | $(INSTALL) -d $(includedir)/wx/generic ; \ |
c98f0421 | 133 | for f in *.h ; do \ |
f3cb6592 RR |
134 | rm -f $(includedir)/wx/generic/$$f ; \ |
135 | $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \ | |
c98f0421 | 136 | done |
c058d771 RR |
137 | @echo " Copying headers from /include/wx/protocol" |
138 | @cd $(WXBASEDIR)/include/wx/protocol ; \ | |
139 | for f in *.h ; do \ | |
140 | rm -f $(includedir)/wx/protocol/$$f ; \ | |
141 | $(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \ | |
142 | done | |
cb43b372 | 143 | @echo " Moving setup.h to library path" |
e52f60e6 RR |
144 | @cd $(WXBASEDIR)/src ; \ |
145 | $(INSTALL) -d $(libdir)/wx/include/wx/gtk ;\ | |
cb43b372 | 146 | mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ; |
f3cb6592 | 147 | @echo " Copying wx-config" |
e52f60e6 RR |
148 | @cd $(WXBASEDIR)/src ; \ |
149 | $(INSTALL) -d $(bindir) ; \ | |
f3cb6592 | 150 | rm -f $(bindir)/wx-config ; \ |
e52f60e6 | 151 | $(INSTALL_PROGRAM) $(WXBASEDIR)/wx-config $(bindir)/wx-config |
f3cb6592 | 152 | @echo " Copying static library" |
e52f60e6 | 153 | @cd $(WXBASEDIR)/src ; \ |
f3cb6592 | 154 | rm -f $(libdir)/$(STATIC_LIBRARY) ; \ |
e52f60e6 | 155 | $(INSTALL_DATA) $(WXBASEDIR)/lib/$(OS)/$(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY) |
8fdca65c | 156 | @if test -f $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \ |
cb43b372 | 157 | echo " Copying shared library" ; \ |
cb43b372 | 158 | rm -f $(libdir)/lib$(LIB_TARGET).so* ; \ |
e52f60e6 | 159 | $(INSTALL_PROGRAM) $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \ |
d8c83875 RR |
160 | $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \ |
161 | $(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \ | |
cb43b372 RR |
162 | echo " " ; \ |
163 | echo " You may have to run ldconfig!" ; \ | |
164 | echo " " ; \ | |
d8c83875 | 165 | fi |
f3cb6592 | 166 | @echo " " |
cb43b372 | 167 | @echo "Installation complete." |
f3cb6592 RR |
168 | @echo " " |
169 | ||
c801d85f KB |
170 | clean:: |
171 | $(RM) -rf gtk | |
a1a2adef RR |
172 | $(RM) -rf qt |
173 | $(RM) -rf motif | |
c801d85f KB |
174 | $(RM) -rf common |
175 | $(RM) -rf generic | |
176 | $(RM) -rf png | |
177 | $(RM) -rf zlib | |
1a6944fd | 178 | $(RM) -rf iodbc |
6de97a3b | 179 | @$(RM) lexer.c parser.c |
c801d85f KB |
180 | |
181 | #additional things needed for compile | |
01111366 | 182 | ADD_COMPILE= |
c801d85f KB |
183 | |
184 | # include the definitions now | |
185 | include ../../template.mak | |
6de97a3b RR |
186 | |
187 | # things for the prolog stuff | |
188 | ||
189 | parser.c: ../common/parser.y lexer.c | |
190 | @if test ! -f parser.y; then \ | |
191 | cp -f ../common/parser.y . ; \ | |
192 | fi | |
193 | @$(YACC) parser.y | |
194 | @sed -e "s/y.tab.c/parser.y/g" < y.tab.c | \ | |
195 | sed -e "s/BUFSIZ/5000/g" | \ | |
196 | sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \ | |
197 | sed -e "s/yy/PROIO_yy/g" | \ | |
198 | sed -e "s/input/PROIO_input/g" | \ | |
199 | sed -e "s/unput/PROIO_unput/g" > parser.c | |
200 | @$(RM) y.tab.c | |
201 | @$(RM) parser.y | |
202 | ||
203 | lexer.c: ../common/lexer.l | |
204 | @if test ! -f lexer.l; then \ | |
205 | cp -f ../common/lexer.l . ;\ | |
206 | fi | |
207 | @$(LEX) lexer.l | |
208 | @sed -e "s/lex.yy.c/lexer.l/g" < lex.yy.c | \ | |
209 | sed -e "s/yy/PROIO_yy/g" | \ | |
210 | sed -e "s/input/PROIO_input/g" | \ | |
211 | sed -e "s/unput/PROIO_unput/g" > lexer.c | |
212 | @$(RM) lex.yy.c | |
213 | @$(RM) lexer.l | |
214 | ||
215 | clean:: | |
a665764c | 216 |