2005-02-25 20:38:54 -05:00
|
|
|
#
|
|
|
|
# Makefile for AmigaOS
|
|
|
|
#
|
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
.PHONY: help all check clean package
|
|
|
|
.PHONY: clib2 newlib library so
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
vpath %.c ../lib ../examples ../xmlwf ../tests ../tests/benchmark
|
2005-12-24 01:39:56 -05:00
|
|
|
vpath %.h ../lib ../tests
|
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
#############################################################################
|
2005-02-25 20:38:54 -05:00
|
|
|
|
|
|
|
help:
|
2005-12-24 01:39:56 -05:00
|
|
|
@echo "Requires:"
|
2009-01-31 01:21:09 -05:00
|
|
|
@echo " AmigaOS 4.x"
|
|
|
|
@echo " SDK 53.13"
|
2005-02-25 20:38:54 -05:00
|
|
|
@echo ""
|
|
|
|
@echo "Targets:"
|
2009-01-31 01:21:09 -05:00
|
|
|
@echo " all - make libraries, xmlwf, examples and runs tests"
|
2005-12-24 01:39:56 -05:00
|
|
|
@echo " install - install expat libraries and tools into SDK"
|
2009-01-31 01:21:09 -05:00
|
|
|
@echo " clean - clean object files"
|
2009-01-31 15:57:34 -05:00
|
|
|
@echo " check - run all the tests"
|
2009-01-31 01:21:09 -05:00
|
|
|
@echo " package - prepare distribution archive"
|
|
|
|
|
|
|
|
all: clib2 newlib library so check
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
clib2: clib2/libexpat.a clib2/xmlwf clib2/elements clib2/outline clib2/runtests clib2/benchmark
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
newlib: newlib/libexpat.a newlib/xmlwf newlib/elements newlib/outline newlib/runtests newlib/benchmark
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
library: libs/expat.library libs/xmlwf libs/elements libs/outline libs/runtests libs/benchmark
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
so: so/libexpat.so so/xmlwf so/elements so/outline so/runtests so/benchmark
|
|
|
|
|
|
|
|
check: clib2/runtests newlib/runtests libs/runtests so/runtests
|
|
|
|
clib2/runtests
|
|
|
|
newlib/runtests
|
|
|
|
libs/runtests
|
|
|
|
so/runtests
|
2005-02-25 20:38:54 -05:00
|
|
|
|
|
|
|
clean:
|
2009-01-31 01:21:09 -05:00
|
|
|
-delete clib2/#?.o quiet
|
|
|
|
-delete newlib/#?.o quiet
|
2005-12-24 01:39:56 -05:00
|
|
|
-delete libs/#?.o quiet
|
2009-01-31 01:21:09 -05:00
|
|
|
-delete so/#?.o quiet
|
|
|
|
|
|
|
|
package:
|
|
|
|
$(MAKE) all
|
|
|
|
-delete T:expat all force quiet
|
|
|
|
makedir all T:expat/Workbench/Libs
|
|
|
|
copy clone libs/expat.library T:expat/Workbench/Libs
|
2009-01-31 15:57:34 -05:00
|
|
|
makedir all T:expat/Workbench/SObjs
|
|
|
|
copy clone so/libexpat.so T:expat/Workbench/SObjs
|
2009-01-31 01:21:09 -05:00
|
|
|
makedir all T:expat/SDK/Local/C
|
|
|
|
copy clone libs/xmlwf T:expat/SDK/Local/C
|
|
|
|
makedir all T:expat/SDK/Local/clib2/lib
|
|
|
|
copy clone clib2/libexpat.a T:expat/SDK/Local/clib2/lib
|
|
|
|
makedir all T:expat/SDK/Local/newlib/lib
|
|
|
|
copy clone newlib/libexpat.a T:expat/SDK/Local/newlib/lib
|
|
|
|
makedir all T:expat/SDK/Local/common/include
|
|
|
|
copy clone /lib/expat.h /lib/expat_external.h T:expat/SDK/Local/common/include
|
|
|
|
makedir all T:expat/SDK/Include/include_h/inline4
|
|
|
|
copy clone include/inline4/expat.h T:expat/SDK/Include/include_h/inline4
|
|
|
|
makedir all T:expat/SDK/Include/include_h/interfaces
|
|
|
|
copy clone include/interfaces/expat.h T:expat/SDK/Include/include_h/interfaces
|
|
|
|
makedir all T:expat/SDK/Include/include_h/libraries
|
|
|
|
copy clone include/libraries/expat.h T:expat/SDK/Include/include_h/libraries
|
|
|
|
makedir all T:expat/SDK/Include/include_h/proto
|
|
|
|
copy clone include/proto/expat.h T:expat/SDK/Include/include_h/proto
|
|
|
|
makedir all T:expat/SDK/Documentation/Libs/Expat
|
|
|
|
copy clone /COPYING T:expat/SDK/Documentation/Libs/Expat
|
|
|
|
copy clone /README T:expat/SDK/Documentation/Libs/Expat
|
|
|
|
copy clone README.txt T:expat/SDK/Documentation/Libs/Expat/README.AmigaOS
|
|
|
|
-delete expat.lha
|
|
|
|
lha -r a expat.lha T:expat
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
CC := gcc
|
|
|
|
LIBTOOL := ar
|
|
|
|
STRIP := strip
|
|
|
|
|
|
|
|
CFLAGS := -DNDEBUG -O3
|
|
|
|
LTFLAGS := -crs
|
|
|
|
STRIPFLAGS := -R.comment
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
clib2/libexpat.a: clib2/xmlparse.o clib2/xmltok.o clib2/xmlrole.o
|
|
|
|
$(LIBTOOL) $(LTFLAGS) $@ $^
|
2009-01-31 15:57:34 -05:00
|
|
|
protect $@ -e
|
2009-01-31 01:21:09 -05:00
|
|
|
|
|
|
|
clib2/xmlparse.o: xmlparse.c expat.h xmlrole.h xmltok.h \
|
|
|
|
expat_external.h internal.h amigaconfig.h
|
|
|
|
|
|
|
|
clib2/xmlrole.o: xmlrole.c ascii.h xmlrole.h expat_external.h \
|
|
|
|
internal.h amigaconfig.h
|
|
|
|
|
|
|
|
clib2/xmltok.o: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \
|
|
|
|
iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \
|
|
|
|
expat_external.h internal.h amigaconfig.h
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
clib2/xmlwf: clib2/xmlwf.o clib2/xmlfile.o clib2/codepage.o clib2/readfilemap.o
|
|
|
|
$(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a
|
|
|
|
$(STRIP) $(STRIPFLAGS) $@
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
clib2/xmlwf.o: xmlwf.c
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
clib2/xmlfile.o: xmlfile.c
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
clib2/codepage.o: codepage.c
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
clib2/readfilemap.o: readfilemap.c
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
#############################################################################
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
clib2/elements: clib2/elements.o
|
|
|
|
$(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a
|
|
|
|
$(STRIP) $(STRIPFLAGS) $@
|
|
|
|
|
|
|
|
clib2/elements.o: elements.c
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
clib2/outline: clib2/outline.o
|
|
|
|
$(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a
|
|
|
|
$(STRIP) $(STRIPFLAGS) $@
|
|
|
|
|
|
|
|
clib2/outline.o: outline.c
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
clib2/runtests: clib2/runtests.o clib2/chardata.o clib2/minicheck.o
|
|
|
|
$(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a
|
|
|
|
|
|
|
|
clib2/chardata.o: chardata.c chardata.h
|
|
|
|
|
|
|
|
clib2/minicheck.o: minicheck.c minicheck.h
|
|
|
|
|
|
|
|
clib2/runtests.o: runtests.c chardata.h
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
#############################################################################
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
clib2/benchmark: clib2/benchmark.o
|
|
|
|
$(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a -lm
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
clib2/benchmark.o: benchmark.c
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
#############################################################################
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
newlib/libexpat.a: newlib/xmlparse.o newlib/xmltok.o newlib/xmlrole.o
|
2005-12-24 01:39:56 -05:00
|
|
|
$(LIBTOOL) $(LTFLAGS) $@ $^
|
2009-01-31 15:57:34 -05:00
|
|
|
protect $@ -e
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
newlib/xmlparse.o: xmlparse.c expat.h xmlrole.h xmltok.h \
|
2005-12-24 01:39:56 -05:00
|
|
|
expat_external.h internal.h amigaconfig.h
|
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
newlib/xmlrole.o: xmlrole.c ascii.h xmlrole.h expat_external.h \
|
2005-12-24 01:39:56 -05:00
|
|
|
internal.h amigaconfig.h
|
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
newlib/xmltok.o: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \
|
2005-12-24 01:39:56 -05:00
|
|
|
iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \
|
|
|
|
expat_external.h internal.h amigaconfig.h
|
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
newlib/xmlwf: newlib/xmlwf.o newlib/xmlfile.o newlib/codepage.o newlib/readfilemap.o
|
|
|
|
$(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
|
|
|
|
$(STRIP) $(STRIPFLAGS) $@
|
|
|
|
|
|
|
|
newlib/xmlwf.o: xmlwf.c
|
|
|
|
|
|
|
|
newlib/xmlfile.o: xmlfile.c
|
|
|
|
|
|
|
|
newlib/codepage.o: codepage.c
|
|
|
|
|
|
|
|
newlib/readfilemap.o: readfilemap.c
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
newlib/elements: newlib/elements.o
|
|
|
|
$(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
|
|
|
|
$(STRIP) $(STRIPFLAGS) $@
|
|
|
|
|
|
|
|
newlib/elements.o: elements.c
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
#############################################################################
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
newlib/outline: newlib/outline.o
|
|
|
|
$(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
|
|
|
|
$(STRIP) $(STRIPFLAGS) $@
|
|
|
|
|
|
|
|
newlib/outline.o: outline.c
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
newlib/runtests: newlib/runtests.o newlib/chardata.o newlib/minicheck.o
|
|
|
|
$(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
|
|
|
|
|
|
|
|
newlib/chardata.o: chardata.c chardata.h
|
|
|
|
|
|
|
|
newlib/minicheck.o: minicheck.c minicheck.h
|
|
|
|
|
|
|
|
newlib/runtests.o: runtests.c chardata.h
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
newlib/benchmark: newlib/benchmark.o
|
|
|
|
$(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
|
|
|
|
|
|
|
|
newlib/benchmark.o: benchmark.c
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
2009-08-07 23:48:55 -04:00
|
|
|
libs/expat.library: libs/expat_lib.o libs/expat_68k.o libs/expat_68k_handler_stubs.o libs/expat_vectors.o newlib/libexpat.a
|
|
|
|
$(CC) -mcrt=newlib -nostartfiles $^ -o $@ newlib/libexpat.a -Wl,--cref,-M,-Map=$@.map
|
2009-01-31 15:57:34 -05:00
|
|
|
protect $@ -e
|
2009-08-07 23:48:55 -04:00
|
|
|
$(STRIP) $(STRIPFLAGS) $@
|
2009-01-31 01:21:09 -05:00
|
|
|
|
2009-08-07 23:48:55 -04:00
|
|
|
libs/expat_lib.o: expat_lib.c expat_base.h
|
2009-01-31 01:21:09 -05:00
|
|
|
|
2009-08-07 23:48:55 -04:00
|
|
|
libs/expat_68k.o: expat_68k.c expat_68k.h expat_base.h
|
2009-01-31 01:21:09 -05:00
|
|
|
|
|
|
|
libs/expat_68k_handler_stubs.o: expat_68k_handler_stubs.c expat_68k.h
|
|
|
|
|
|
|
|
libs/expat_vectors.o: expat_vectors.c
|
|
|
|
|
|
|
|
libs/launch.o: launch.c
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
libs/xmlwf: libs/xmlwf.o libs/xmlfile.o libs/codepage.o libs/readfilemap.o libs/launch.o
|
|
|
|
$(CC) -mcrt=newlib $^ -o $@
|
|
|
|
$(STRIP) $(STRIPFLAGS) $@
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
libs/xmlwf.o: xmlwf.c
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
libs/xmlfile.o: xmlfile.c
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
libs/codepage.o: codepage.c
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
libs/readfilemap.o: readfilemap.c
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
libs/elements: libs/elements.o libs/launch.o
|
|
|
|
$(CC) -mcrt=newlib $^ -o $@
|
|
|
|
$(STRIP) $(STRIPFLAGS) $@
|
|
|
|
|
|
|
|
libs/elements.o: elements.c
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
libs/outline: libs/outline.o libs/launch.o
|
|
|
|
$(CC) -mcrt=newlib $^ -o $@
|
2005-02-25 20:38:54 -05:00
|
|
|
$(STRIP) $(STRIPFLAGS) $@
|
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
libs/outline.o: outline.c
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
libs/runtests: libs/runtests.o libs/chardata.o libs/minicheck.o libs/launch.o
|
|
|
|
$(CC) -mcrt=newlib $^ -o $@
|
|
|
|
|
|
|
|
libs/chardata.o: chardata.c chardata.h
|
|
|
|
|
|
|
|
libs/minicheck.o: minicheck.c minicheck.h
|
|
|
|
|
|
|
|
libs/runtests.o: runtests.c chardata.h
|
|
|
|
|
|
|
|
#############################################################################
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
libs/benchmark: libs/benchmark.o libs/launch.o
|
|
|
|
$(CC) -mcrt=newlib $^ -o $@
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
libs/benchmark.o: benchmark.c
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
#############################################################################
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
so/libexpat.so: so/xmlparse.o so/xmltok.o so/xmlrole.o
|
|
|
|
$(CC) -mcrt=newlib -shared -o $@ $^
|
2009-01-31 15:57:34 -05:00
|
|
|
protect $@ -e
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
so/xmlparse.o: xmlparse.c expat.h xmlrole.h xmltok.h \
|
|
|
|
expat_external.h internal.h amigaconfig.h
|
|
|
|
|
|
|
|
so/xmlrole.o: xmlrole.c ascii.h xmlrole.h expat_external.h \
|
|
|
|
internal.h amigaconfig.h
|
|
|
|
|
|
|
|
so/xmltok.o: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \
|
|
|
|
iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \
|
|
|
|
expat_external.h internal.h amigaconfig.h
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
so/xmlwf: newlib/xmlwf.o newlib/xmlfile.o newlib/codepage.o newlib/readfilemap.o
|
|
|
|
$(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
|
2005-02-25 20:38:54 -05:00
|
|
|
$(STRIP) $(STRIPFLAGS) $@
|
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
so/elements: newlib/elements.o
|
|
|
|
$(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
|
|
|
|
$(STRIP) $(STRIPFLAGS) $@
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
#############################################################################
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
so/outline: newlib/outline.o
|
|
|
|
$(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
|
2005-02-25 20:38:54 -05:00
|
|
|
$(STRIP) $(STRIPFLAGS) $@
|
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
#############################################################################
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
so/runtests: newlib/runtests.o newlib/chardata.o newlib/minicheck.o
|
|
|
|
$(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
#############################################################################
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
so/benchmark: newlib/benchmark.o
|
|
|
|
$(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
#############################################################################
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
clib2/%.o: %.c
|
|
|
|
$(CC) -mcrt=clib2 $(CFLAGS) -I../lib -c $< -o $@
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
newlib/%.o: %.c
|
|
|
|
$(CC) -mcrt=newlib $(CFLAGS) -I../lib -c $< -o $@
|
2005-12-24 01:39:56 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
libs/%.o: %.c
|
|
|
|
$(CC) -mcrt=newlib $(CFLAGS) -D__USE_INLINE__ -I. -Iinclude -Iinclude/libraries -I../lib -c $< -o $@
|
2005-02-25 20:38:54 -05:00
|
|
|
|
2009-01-31 01:21:09 -05:00
|
|
|
so/%.o: %.c
|
|
|
|
$(CC) -mcrt=newlib $(CFLAGS) -fPIC -I../lib -c $< -o $@
|