5 .PHONY
: help
all check clean package
6 .PHONY
: clib2 newlib library so
8 vpath
%.c ..
/lib ..
/examples ..
/xmlwf ..
/tests ..
/tests
/benchmark
9 vpath
%.h ..
/lib ..
/tests
11 #############################################################################
19 @echo
" all - make libraries, xmlwf, examples and runs tests"
20 @echo
" install - install expat libraries and tools into SDK"
21 @echo
" clean - clean object files"
22 @echo
" check - run all the tests"
23 @echo
" package - prepare distribution archive"
25 all: clib2 newlib library so
check
27 clib2
: clib2
/libexpat.a clib2
/xmlwf clib2
/elements clib2
/outline clib2
/runtests clib2
/benchmark
29 newlib
: newlib
/libexpat.a newlib
/xmlwf newlib
/elements newlib
/outline newlib
/runtests newlib
/benchmark
31 library
: libs
/expat.library libs
/xmlwf libs
/elements libs
/outline libs
/runtests libs
/benchmark
33 so
: so
/libexpat.so so
/xmlwf so
/elements so
/outline so
/runtests so
/benchmark
35 check: clib2
/runtests newlib
/runtests libs
/runtests so
/runtests
42 -delete clib2
/#?.o quiet
43 -delete newlib
/#?.o quiet
44 -delete libs
/#?.o quiet
49 -delete T
:expat
all force quiet
50 makedir
all T
:expat
/Workbench
/Libs
51 copy clone libs
/expat.library T
:expat
/Workbench
/Libs
52 makedir
all T
:expat
/Workbench
/SObjs
53 copy clone so
/libexpat.so T
:expat
/Workbench
/SObjs
54 makedir
all T
:expat
/SDK
/Local
/C
55 copy clone libs
/xmlwf T
:expat
/SDK
/Local
/C
56 makedir
all T
:expat
/SDK
/Local
/clib2
/lib
57 copy clone clib2
/libexpat.a T
:expat
/SDK
/Local
/clib2
/lib
58 makedir
all T
:expat
/SDK
/Local
/newlib
/lib
59 copy clone newlib
/libexpat.a T
:expat
/SDK
/Local
/newlib
/lib
60 makedir
all T
:expat
/SDK
/Local
/common
/include
61 copy clone
/lib
/expat.h
/lib
/expat_external.h T
:expat
/SDK
/Local
/common
/include
62 makedir
all T
:expat
/SDK
/Include
/include_h
/inline4
63 copy clone
include/inline4
/expat.h T
:expat
/SDK
/Include
/include_h
/inline4
64 makedir
all T
:expat
/SDK
/Include
/include_h
/interfaces
65 copy clone
include/interfaces
/expat.h T
:expat
/SDK
/Include
/include_h
/interfaces
66 makedir
all T
:expat
/SDK
/Include
/include_h
/libraries
67 copy clone
include/libraries
/expat.h T
:expat
/SDK
/Include
/include_h
/libraries
68 makedir
all T
:expat
/SDK
/Include
/include_h
/proto
69 copy clone
include/proto
/expat.h T
:expat
/SDK
/Include
/include_h
/proto
70 makedir
all T
:expat
/SDK
/Documentation
/Libs
/Expat
71 copy clone
/COPYING T
:expat
/SDK
/Documentation
/Libs
/Expat
72 copy clone
/README T
:expat
/SDK
/Documentation
/Libs
/Expat
73 copy clone README.txt T
:expat
/SDK
/Documentation
/Libs
/Expat
/README.AmigaOS
75 lha
-r a expat.lha T
:expat
77 #############################################################################
83 CFLAGS
:= -DNDEBUG
-O3
85 STRIPFLAGS
:= -R.comment
87 #############################################################################
89 clib2
/libexpat.a
: clib2
/xmlparse.o clib2
/xmltok.o clib2
/xmlrole.o
90 $(LIBTOOL
) $(LTFLAGS
) $@
$^
93 clib2
/xmlparse.o
: xmlparse.c expat.h xmlrole.h xmltok.h \
94 expat_external.h internal.h amigaconfig.h
96 clib2
/xmlrole.o
: xmlrole.c ascii.h xmlrole.h expat_external.h \
97 internal.h amigaconfig.h
99 clib2
/xmltok.o
: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \
100 iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \
101 expat_external.h internal.h amigaconfig.h
103 #############################################################################
105 clib2
/xmlwf
: clib2
/xmlwf.o clib2
/xmlfile.o clib2
/codepage.o clib2
/readfilemap.o
106 $(CC
) -mcrt
=clib2
$^
-o
$@ clib2
/libexpat.a
107 $(STRIP
) $(STRIPFLAGS
) $@
109 clib2
/xmlwf.o
: xmlwf.c
111 clib2
/xmlfile.o
: xmlfile.c
113 clib2
/codepage.o
: codepage.c
115 clib2
/readfilemap.o
: readfilemap.c
117 #############################################################################
119 clib2
/elements
: clib2
/elements.o
120 $(CC
) -mcrt
=clib2
$^
-o
$@ clib2
/libexpat.a
121 $(STRIP
) $(STRIPFLAGS
) $@
123 clib2
/elements.o
: elements.c
125 #############################################################################
127 clib2
/outline
: clib2
/outline.o
128 $(CC
) -mcrt
=clib2
$^
-o
$@ clib2
/libexpat.a
129 $(STRIP
) $(STRIPFLAGS
) $@
131 clib2
/outline.o
: outline.c
133 #############################################################################
135 clib2
/runtests
: clib2
/runtests.o clib2
/chardata.o clib2
/minicheck.o
136 $(CC
) -mcrt
=clib2
$^
-o
$@ clib2
/libexpat.a
138 clib2
/chardata.o
: chardata.c chardata.h
140 clib2
/minicheck.o
: minicheck.c minicheck.h
142 clib2
/runtests.o
: runtests.c chardata.h
144 #############################################################################
146 clib2
/benchmark
: clib2
/benchmark.o
147 $(CC
) -mcrt
=clib2
$^
-o
$@ clib2
/libexpat.a
-lm
149 clib2
/benchmark.o
: benchmark.c
151 #############################################################################
153 newlib
/libexpat.a
: newlib
/xmlparse.o newlib
/xmltok.o newlib
/xmlrole.o
154 $(LIBTOOL
) $(LTFLAGS
) $@
$^
157 newlib
/xmlparse.o
: xmlparse.c expat.h xmlrole.h xmltok.h \
158 expat_external.h internal.h amigaconfig.h
160 newlib
/xmlrole.o
: xmlrole.c ascii.h xmlrole.h expat_external.h \
161 internal.h amigaconfig.h
163 newlib
/xmltok.o
: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \
164 iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \
165 expat_external.h internal.h amigaconfig.h
167 #############################################################################
169 newlib
/xmlwf
: newlib
/xmlwf.o newlib
/xmlfile.o newlib
/codepage.o newlib
/readfilemap.o
170 $(CC
) -mcrt
=newlib
$^
-o
$@ newlib
/libexpat.a
171 $(STRIP
) $(STRIPFLAGS
) $@
173 newlib
/xmlwf.o
: xmlwf.c
175 newlib
/xmlfile.o
: xmlfile.c
177 newlib
/codepage.o
: codepage.c
179 newlib
/readfilemap.o
: readfilemap.c
181 #############################################################################
183 newlib
/elements
: newlib
/elements.o
184 $(CC
) -mcrt
=newlib
$^
-o
$@ newlib
/libexpat.a
185 $(STRIP
) $(STRIPFLAGS
) $@
187 newlib
/elements.o
: elements.c
189 #############################################################################
191 newlib
/outline
: newlib
/outline.o
192 $(CC
) -mcrt
=newlib
$^
-o
$@ newlib
/libexpat.a
193 $(STRIP
) $(STRIPFLAGS
) $@
195 newlib
/outline.o
: outline.c
197 #############################################################################
199 newlib
/runtests
: newlib
/runtests.o newlib
/chardata.o newlib
/minicheck.o
200 $(CC
) -mcrt
=newlib
$^
-o
$@ newlib
/libexpat.a
202 newlib
/chardata.o
: chardata.c chardata.h
204 newlib
/minicheck.o
: minicheck.c minicheck.h
206 newlib
/runtests.o
: runtests.c chardata.h
208 #############################################################################
210 newlib
/benchmark
: newlib
/benchmark.o
211 $(CC
) -mcrt
=newlib
$^
-o
$@ newlib
/libexpat.a
213 newlib
/benchmark.o
: benchmark.c
215 #############################################################################
217 libs
/expat.library
: libs
/expat_lib.o libs
/expat_68k.o libs
/expat_68k_handler_stubs.o libs
/expat_vectors.o newlib
/libexpat.a
218 $(CC
) -mcrt
=newlib
-nostartfiles
$^
-o
$@ newlib
/libexpat.a
-Wl
,--cref
,-M
,-Map
=$@.map
220 $(STRIP
) $(STRIPFLAGS
) $@
222 libs
/expat_lib.o
: expat_lib.c expat_base.h
224 libs
/expat_68k.o
: expat_68k.c expat_68k.h expat_base.h
226 libs
/expat_68k_handler_stubs.o
: expat_68k_handler_stubs.c expat_68k.h
228 libs
/expat_vectors.o
: expat_vectors.c
230 libs
/launch.o
: launch.c
232 #############################################################################
234 libs
/xmlwf
: libs
/xmlwf.o libs
/xmlfile.o libs
/codepage.o libs
/readfilemap.o libs
/launch.o
235 $(CC
) -mcrt
=newlib
$^
-o
$@
236 $(STRIP
) $(STRIPFLAGS
) $@
238 libs
/xmlwf.o
: xmlwf.c
240 libs
/xmlfile.o
: xmlfile.c
242 libs
/codepage.o
: codepage.c
244 libs
/readfilemap.o
: readfilemap.c
246 #############################################################################
248 libs
/elements
: libs
/elements.o libs
/launch.o
249 $(CC
) -mcrt
=newlib
$^
-o
$@
250 $(STRIP
) $(STRIPFLAGS
) $@
252 libs
/elements.o
: elements.c
254 #############################################################################
256 libs
/outline
: libs
/outline.o libs
/launch.o
257 $(CC
) -mcrt
=newlib
$^
-o
$@
258 $(STRIP
) $(STRIPFLAGS
) $@
260 libs
/outline.o
: outline.c
262 #############################################################################
264 libs
/runtests
: libs
/runtests.o libs
/chardata.o libs
/minicheck.o libs
/launch.o
265 $(CC
) -mcrt
=newlib
$^
-o
$@
267 libs
/chardata.o
: chardata.c chardata.h
269 libs
/minicheck.o
: minicheck.c minicheck.h
271 libs
/runtests.o
: runtests.c chardata.h
273 #############################################################################
275 libs
/benchmark
: libs
/benchmark.o libs
/launch.o
276 $(CC
) -mcrt
=newlib
$^
-o
$@
278 libs
/benchmark.o
: benchmark.c
280 #############################################################################
282 so
/libexpat.so
: so
/xmlparse.o so
/xmltok.o so
/xmlrole.o
283 $(CC
) -mcrt
=newlib
-shared
-o
$@
$^
286 so
/xmlparse.o
: xmlparse.c expat.h xmlrole.h xmltok.h \
287 expat_external.h internal.h amigaconfig.h
289 so
/xmlrole.o
: xmlrole.c ascii.h xmlrole.h expat_external.h \
290 internal.h amigaconfig.h
292 so
/xmltok.o
: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \
293 iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \
294 expat_external.h internal.h amigaconfig.h
296 #############################################################################
298 so
/xmlwf
: newlib
/xmlwf.o newlib
/xmlfile.o newlib
/codepage.o newlib
/readfilemap.o
299 $(CC
) -mcrt
=newlib
-use-dynld
$^
-o
$@
-Lso
-lexpat
300 $(STRIP
) $(STRIPFLAGS
) $@
302 #############################################################################
304 so
/elements
: newlib
/elements.o
305 $(CC
) -mcrt
=newlib
-use-dynld
$^
-o
$@
-Lso
-lexpat
306 $(STRIP
) $(STRIPFLAGS
) $@
308 #############################################################################
310 so
/outline
: newlib
/outline.o
311 $(CC
) -mcrt
=newlib
-use-dynld
$^
-o
$@
-Lso
-lexpat
312 $(STRIP
) $(STRIPFLAGS
) $@
314 #############################################################################
316 so
/runtests
: newlib
/runtests.o newlib
/chardata.o newlib
/minicheck.o
317 $(CC
) -mcrt
=newlib
-use-dynld
$^
-o
$@
-Lso
-lexpat
319 #############################################################################
321 so
/benchmark
: newlib
/benchmark.o
322 $(CC
) -mcrt
=newlib
-use-dynld
$^
-o
$@
-Lso
-lexpat
324 #############################################################################
327 $(CC
) -mcrt
=clib2
$(CFLAGS
) -I..
/lib
-c
$< -o
$@
330 $(CC
) -mcrt
=newlib
$(CFLAGS
) -I..
/lib
-c
$< -o
$@
333 $(CC
) -mcrt
=newlib
$(CFLAGS
) -D__USE_INLINE__
-I.
-Iinclude
-Iinclude
/libraries
-I..
/lib
-c
$< -o
$@
336 $(CC
) -mcrt
=newlib
$(CFLAGS
) -fPIC
-I..
/lib
-c
$< -o
$@