Annotation of embedaddon/expat/amiga/Makefile, revision 1.1.1.2

1.1       misho       1: #
                      2: # Makefile for AmigaOS
                      3: #
                      4: 
1.1.1.2 ! misho       5: .PHONY: help all check clean package
        !             6: .PHONY: clib2 newlib library so
1.1       misho       7: 
1.1.1.2 ! misho       8: vpath %.c ../lib ../examples ../xmlwf ../tests ../tests/benchmark
1.1       misho       9: vpath %.h ../lib ../tests
                     10: 
1.1.1.2 ! misho      11: #############################################################################
1.1       misho      12: 
                     13: help:
                     14:        @echo "Requires:"
1.1.1.2 ! misho      15:        @echo " AmigaOS 4.x"
        !            16:        @echo " SDK 53.13"
1.1       misho      17:        @echo ""
                     18:        @echo "Targets:"
1.1.1.2 ! misho      19:        @echo " all     - make libraries, xmlwf, examples and runs tests"
1.1       misho      20:        @echo " install - install expat libraries and tools into SDK"
1.1.1.2 ! misho      21:        @echo " clean   - clean object files"
        !            22:        @echo " check   - run all the tests"
        !            23:        @echo " package - prepare distribution archive"
        !            24: 
        !            25: all: clib2 newlib library so check
1.1       misho      26: 
1.1.1.2 ! misho      27: clib2: clib2/libexpat.a clib2/xmlwf clib2/elements clib2/outline clib2/runtests clib2/benchmark
1.1       misho      28: 
1.1.1.2 ! misho      29: newlib: newlib/libexpat.a newlib/xmlwf newlib/elements newlib/outline newlib/runtests newlib/benchmark
1.1       misho      30: 
1.1.1.2 ! misho      31: library: libs/expat.library libs/xmlwf libs/elements libs/outline libs/runtests libs/benchmark
1.1       misho      32: 
1.1.1.2 ! misho      33: so: so/libexpat.so so/xmlwf so/elements so/outline so/runtests so/benchmark
        !            34: 
        !            35: check: clib2/runtests newlib/runtests libs/runtests so/runtests
        !            36:        clib2/runtests
        !            37:        newlib/runtests
        !            38:        libs/runtests
        !            39:        so/runtests
1.1       misho      40: 
                     41: clean:
1.1.1.2 ! misho      42:        -delete clib2/#?.o quiet
        !            43:        -delete newlib/#?.o quiet
1.1       misho      44:        -delete libs/#?.o quiet
1.1.1.2 ! misho      45:        -delete so/#?.o quiet
        !            46: 
        !            47: package:
        !            48:        $(MAKE) all
        !            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
        !            74:        -delete expat.lha
        !            75:        lha -r a expat.lha T:expat
        !            76: 
        !            77: #############################################################################
        !            78: 
        !            79: CC         := gcc
        !            80: LIBTOOL    := ar
        !            81: STRIP      := strip
        !            82: 
        !            83: CFLAGS     := -DNDEBUG -O3
        !            84: LTFLAGS    := -crs
        !            85: STRIPFLAGS := -R.comment
        !            86: 
        !            87: #############################################################################
        !            88: 
        !            89: clib2/libexpat.a: clib2/xmlparse.o clib2/xmltok.o clib2/xmlrole.o
        !            90:        $(LIBTOOL) $(LTFLAGS) $@ $^
        !            91:        protect $@ -e
        !            92: 
        !            93: clib2/xmlparse.o: xmlparse.c expat.h xmlrole.h xmltok.h \
        !            94:        expat_external.h internal.h amigaconfig.h
        !            95: 
        !            96: clib2/xmlrole.o: xmlrole.c ascii.h xmlrole.h expat_external.h \
        !            97:        internal.h amigaconfig.h
        !            98: 
        !            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
        !           102: 
        !           103: #############################################################################
1.1       misho     104: 
1.1.1.2 ! misho     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) $@
1.1       misho     108: 
1.1.1.2 ! misho     109: clib2/xmlwf.o: xmlwf.c
1.1       misho     110: 
1.1.1.2 ! misho     111: clib2/xmlfile.o: xmlfile.c
        !           112: 
        !           113: clib2/codepage.o: codepage.c
        !           114: 
        !           115: clib2/readfilemap.o: readfilemap.c
        !           116: 
        !           117: #############################################################################
        !           118: 
        !           119: clib2/elements: clib2/elements.o
        !           120:        $(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a
        !           121:        $(STRIP) $(STRIPFLAGS) $@
1.1       misho     122: 
1.1.1.2 ! misho     123: clib2/elements.o: elements.c
1.1       misho     124: 
1.1.1.2 ! misho     125: #############################################################################
1.1       misho     126: 
1.1.1.2 ! misho     127: clib2/outline: clib2/outline.o
        !           128:        $(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a
        !           129:        $(STRIP) $(STRIPFLAGS) $@
        !           130: 
        !           131: clib2/outline.o: outline.c
        !           132: 
        !           133: #############################################################################
        !           134: 
        !           135: clib2/runtests: clib2/runtests.o clib2/chardata.o clib2/minicheck.o
        !           136:        $(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a
        !           137: 
        !           138: clib2/chardata.o: chardata.c chardata.h
        !           139: 
        !           140: clib2/minicheck.o: minicheck.c minicheck.h
        !           141: 
        !           142: clib2/runtests.o: runtests.c chardata.h
        !           143: 
        !           144: #############################################################################
        !           145: 
        !           146: clib2/benchmark: clib2/benchmark.o
        !           147:        $(CC) -mcrt=clib2 $^ -o $@ clib2/libexpat.a -lm
        !           148: 
        !           149: clib2/benchmark.o: benchmark.c
        !           150: 
        !           151: #############################################################################
        !           152: 
        !           153: newlib/libexpat.a: newlib/xmlparse.o newlib/xmltok.o newlib/xmlrole.o
1.1       misho     154:        $(LIBTOOL) $(LTFLAGS) $@ $^
1.1.1.2 ! misho     155:        protect $@ -e
1.1       misho     156: 
1.1.1.2 ! misho     157: newlib/xmlparse.o: xmlparse.c expat.h xmlrole.h xmltok.h \
1.1       misho     158:        expat_external.h internal.h amigaconfig.h
                    159: 
1.1.1.2 ! misho     160: newlib/xmlrole.o: xmlrole.c ascii.h xmlrole.h expat_external.h \
1.1       misho     161:        internal.h amigaconfig.h
                    162: 
1.1.1.2 ! misho     163: newlib/xmltok.o: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \
1.1       misho     164:        iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \
                    165:        expat_external.h internal.h amigaconfig.h
                    166: 
1.1.1.2 ! misho     167: #############################################################################
        !           168: 
        !           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) $@
        !           172: 
        !           173: newlib/xmlwf.o: xmlwf.c
        !           174: 
        !           175: newlib/xmlfile.o: xmlfile.c
        !           176: 
        !           177: newlib/codepage.o: codepage.c
        !           178: 
        !           179: newlib/readfilemap.o: readfilemap.c
        !           180: 
        !           181: #############################################################################
        !           182: 
        !           183: newlib/elements: newlib/elements.o
        !           184:        $(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
        !           185:        $(STRIP) $(STRIPFLAGS) $@
        !           186: 
        !           187: newlib/elements.o: elements.c
        !           188: 
        !           189: #############################################################################
        !           190: 
        !           191: newlib/outline: newlib/outline.o
        !           192:        $(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
        !           193:        $(STRIP) $(STRIPFLAGS) $@
        !           194: 
        !           195: newlib/outline.o: outline.c
        !           196: 
        !           197: #############################################################################
        !           198: 
        !           199: newlib/runtests: newlib/runtests.o newlib/chardata.o newlib/minicheck.o
        !           200:        $(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
        !           201: 
        !           202: newlib/chardata.o: chardata.c chardata.h
        !           203: 
        !           204: newlib/minicheck.o: minicheck.c minicheck.h
        !           205: 
        !           206: newlib/runtests.o: runtests.c chardata.h
        !           207: 
        !           208: #############################################################################
1.1       misho     209: 
1.1.1.2 ! misho     210: newlib/benchmark: newlib/benchmark.o
        !           211:        $(CC) -mcrt=newlib $^ -o $@ newlib/libexpat.a
1.1       misho     212: 
1.1.1.2 ! misho     213: newlib/benchmark.o: benchmark.c
1.1       misho     214: 
1.1.1.2 ! misho     215: #############################################################################
1.1       misho     216: 
1.1.1.2 ! misho     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
        !           219:        protect $@ -e
        !           220:        $(STRIP) $(STRIPFLAGS) $@
        !           221: 
        !           222: libs/expat_lib.o: expat_lib.c expat_base.h
        !           223: 
        !           224: libs/expat_68k.o: expat_68k.c expat_68k.h expat_base.h
1.1       misho     225: 
1.1.1.2 ! misho     226: libs/expat_68k_handler_stubs.o: expat_68k_handler_stubs.c expat_68k.h
1.1       misho     227: 
1.1.1.2 ! misho     228: libs/expat_vectors.o: expat_vectors.c
1.1       misho     229: 
1.1.1.2 ! misho     230: libs/launch.o: launch.c
        !           231: 
        !           232: #############################################################################
        !           233: 
        !           234: libs/xmlwf: libs/xmlwf.o libs/xmlfile.o libs/codepage.o libs/readfilemap.o libs/launch.o
        !           235:        $(CC) -mcrt=newlib $^ -o $@
1.1       misho     236:        $(STRIP) $(STRIPFLAGS) $@
                    237: 
1.1.1.2 ! misho     238: libs/xmlwf.o: xmlwf.c
1.1       misho     239: 
1.1.1.2 ! misho     240: libs/xmlfile.o: xmlfile.c
1.1       misho     241: 
1.1.1.2 ! misho     242: libs/codepage.o: codepage.c
1.1       misho     243: 
1.1.1.2 ! misho     244: libs/readfilemap.o: readfilemap.c
1.1       misho     245: 
1.1.1.2 ! misho     246: #############################################################################
1.1       misho     247: 
1.1.1.2 ! misho     248: libs/elements: libs/elements.o libs/launch.o
        !           249:        $(CC) -mcrt=newlib $^ -o $@
1.1       misho     250:        $(STRIP) $(STRIPFLAGS) $@
                    251: 
1.1.1.2 ! misho     252: libs/elements.o: elements.c
        !           253: 
        !           254: #############################################################################
        !           255: 
        !           256: libs/outline: libs/outline.o libs/launch.o
        !           257:        $(CC) -mcrt=newlib $^ -o $@
        !           258:        $(STRIP) $(STRIPFLAGS) $@
        !           259: 
        !           260: libs/outline.o: outline.c
        !           261: 
        !           262: #############################################################################
        !           263: 
        !           264: libs/runtests: libs/runtests.o libs/chardata.o libs/minicheck.o libs/launch.o
        !           265:        $(CC) -mcrt=newlib $^ -o $@
        !           266: 
        !           267: libs/chardata.o: chardata.c chardata.h
        !           268: 
        !           269: libs/minicheck.o: minicheck.c minicheck.h
        !           270: 
        !           271: libs/runtests.o: runtests.c chardata.h
        !           272: 
        !           273: #############################################################################
        !           274: 
        !           275: libs/benchmark: libs/benchmark.o libs/launch.o
        !           276:        $(CC) -mcrt=newlib $^ -o $@
        !           277: 
        !           278: libs/benchmark.o: benchmark.c
        !           279: 
        !           280: #############################################################################
        !           281: 
        !           282: so/libexpat.so: so/xmlparse.o so/xmltok.o so/xmlrole.o
        !           283:        $(CC) -mcrt=newlib -shared -o $@ $^
        !           284:        protect $@ -e
        !           285: 
        !           286: so/xmlparse.o: xmlparse.c expat.h xmlrole.h xmltok.h \
        !           287:        expat_external.h internal.h amigaconfig.h
        !           288: 
        !           289: so/xmlrole.o: xmlrole.c ascii.h xmlrole.h expat_external.h \
        !           290:        internal.h amigaconfig.h
        !           291: 
        !           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
        !           295: 
        !           296: #############################################################################
        !           297: 
        !           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) $@
        !           301: 
        !           302: #############################################################################
        !           303: 
        !           304: so/elements: newlib/elements.o
        !           305:        $(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
        !           306:        $(STRIP) $(STRIPFLAGS) $@
1.1       misho     307: 
1.1.1.2 ! misho     308: #############################################################################
1.1       misho     309: 
1.1.1.2 ! misho     310: so/outline: newlib/outline.o
        !           311:        $(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
1.1       misho     312:        $(STRIP) $(STRIPFLAGS) $@
                    313: 
1.1.1.2 ! misho     314: #############################################################################
1.1       misho     315: 
1.1.1.2 ! misho     316: so/runtests: newlib/runtests.o newlib/chardata.o newlib/minicheck.o
        !           317:        $(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
1.1       misho     318: 
1.1.1.2 ! misho     319: #############################################################################
1.1       misho     320: 
1.1.1.2 ! misho     321: so/benchmark: newlib/benchmark.o
        !           322:        $(CC) -mcrt=newlib -use-dynld $^ -o $@ -Lso -lexpat
1.1       misho     323: 
1.1.1.2 ! misho     324: #############################################################################
1.1       misho     325: 
1.1.1.2 ! misho     326: clib2/%.o: %.c
        !           327:        $(CC) -mcrt=clib2 $(CFLAGS) -I../lib -c $< -o $@
1.1       misho     328: 
1.1.1.2 ! misho     329: newlib/%.o: %.c
        !           330:        $(CC) -mcrt=newlib $(CFLAGS) -I../lib -c $< -o $@
1.1       misho     331: 
1.1.1.2 ! misho     332: libs/%.o: %.c
        !           333:        $(CC) -mcrt=newlib $(CFLAGS) -D__USE_INLINE__ -I. -Iinclude -Iinclude/libraries -I../lib -c $< -o $@
1.1       misho     334: 
1.1.1.2 ! misho     335: so/%.o: %.c
        !           336:        $(CC) -mcrt=newlib $(CFLAGS) -fPIC -I../lib -c $< -o $@

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>