5 .PHONY
: help
all staticlib sharedlib
check clean install
7 vpath
%.c ..
/lib ..
/examples ..
/xmlwf ..
/tests
8 vpath
%.h ..
/lib ..
/tests
12 # Set these for SDK installation.
15 staticlibdir
= SDK
:Local
/clib2
/lib
16 staticincludedir
= SDK
:Local
/clib2
/include
17 sharedlibdir
= SDK
:Local
/Libs
18 sharedincludedir
= SDK
:Local
/common
/include
21 ifeq ($(MAKECMDGOALS
), staticlib
)
27 STATICLIB
= $(DESTDIR
)/libexpat.a
28 SHAREDLIB
= $(DESTDIR
)/expat.library
30 XMLWF
= $(DESTDIR
)/xmlwf
31 ELEMENTS
= $(DESTDIR
)/elements
32 OUTLINE
= $(DESTDIR
)/outline
33 RUNTESTS
= $(DESTDIR
)/runtests
34 BENCHMARK
= $(DESTDIR
)/benchmark
44 @echo
" all - make expat libraries, xmlwf, examples and run test suite"
45 @echo
" install - install expat libraries and tools into SDK"
52 staticlib
: $(STATICLIB
) $(XMLWF
) $(ELEMENTS
) $(OUTLINE
) $(RUNTESTS
) $(BENCHMARK
) check
55 sharedlib
: $(SHAREDLIB
) $(XMLWF
) $(ELEMENTS
) $(OUTLINE
) $(RUNTESTS
) $(BENCHMARK
) check
62 -delete lib
/#?.o quiet
63 -delete libs
/#?.o quiet
66 copy lib
/xmlwf
$(tooldir
) quiet
67 copy
/lib
/expat.h
/lib
/expat_external.h
$(staticincludedir
) quiet
68 copy lib
/libexpat.a
$(staticlibdir
) quiet
69 copy libs
/expat.library
$(sharedlibdir
) quiet
70 copy
include $(sharedincludedir
) quiet
all
81 STRIPFLAGS
= -R.comment
84 ifeq ($(MAKECMDGOALS
), staticlib
)
89 ifeq ($(MAKECMDGOALS
), sharedlib
)
90 CFLAGS
+= -DAMIGA_SHARED_LIB
-D__USE_INLINE__
91 INCLUDES
= -I.
-Iinclude
-Iinclude
/libraries
-I..
/lib
92 LAUNCH
= $(DESTDIR
)/launch.o
96 COMPILE
= $(CC
) $(CFLAGS
) $(INCLUDES
) -c
98 LINK
= $(CC
) $(LDFLAGS
) -o
$@
101 $(STATICLIB
): $(DESTDIR
)/xmlparse.o
$(DESTDIR
)/xmltok.o
$(DESTDIR
)/xmlrole.o
102 $(LIBTOOL
) $(LTFLAGS
) $@
$^
104 $(DESTDIR
)/xmlparse.o
: xmlparse.c expat.h xmlrole.h xmltok.h \
105 expat_external.h internal.h amigaconfig.h
108 $(DESTDIR
)/xmlrole.o
: xmlrole.c ascii.h xmlrole.h expat_external.h \
109 internal.h amigaconfig.h
112 $(DESTDIR
)/xmltok.o
: xmltok.c xmltok_impl.c xmltok_ns.c ascii.h asciitab.h \
113 iasciitab.h latin1tab.h nametab.h utf8tab.h xmltok.h xmltok_impl.h \
114 expat_external.h internal.h amigaconfig.h
118 $(SHAREDLIB
): $(DESTDIR
)/expat_lib.o
$(DESTDIR
)/expat_vectors.o
$(DESTDIR
)/stdlib.o lib
/libexpat.a
119 $(LINK
) -nostartfiles
-nostdlib
-o
$@
$^
121 $(DESTDIR
)/expat_lib.o
: expat_lib.c
124 $(DESTDIR
)/expat_vectors.o
: expat_vectors.c
127 $(DESTDIR
)/stdlib.o
: stdlib.c
134 $(XMLWF
): $(DESTDIR
)/xmlwf.o
$(DESTDIR
)/xmlfile.o
$(DESTDIR
)/codepage.o
$(DESTDIR
)/readfilemap.o
$(LAUNCH
)
136 $(STRIP
) $(STRIPFLAGS
) $@
138 $(DESTDIR
)/xmlwf.o
: xmlwf.c
141 $(DESTDIR
)/xmlfile.o
: xmlfile.c
144 $(DESTDIR
)/codepage.o
: codepage.c
147 $(DESTDIR
)/readfilemap.o
: readfilemap.c
151 $(ELEMENTS
): $(DESTDIR
)/elements.o
$(LAUNCH
)
153 $(STRIP
) $(STRIPFLAGS
) $@
155 $(DESTDIR
)/elements.o
: elements.c
159 $(OUTLINE
): $(DESTDIR
)/outline.o
$(LAUNCH
)
161 $(STRIP
) $(STRIPFLAGS
) $@
163 $(DESTDIR
)/outline.o
: outline.c
167 $(RUNTESTS
): $(DESTDIR
)/runtests.o
$(DESTDIR
)/chardata.o
$(DESTDIR
)/minicheck.o
$(LAUNCH
)
170 $(DESTDIR
)/chardata.o
: chardata.c chardata.h
173 $(DESTDIR
)/minicheck.o
: minicheck.c minicheck.h
176 $(DESTDIR
)/runtests.o
: runtests.c chardata.h
180 $(BENCHMARK
): $(DESTDIR
)/benchmark.o
$(LAUNCH
)
181 $(LINK
) $^
$(LIBS
) -lm
183 $(DESTDIR
)/benchmark.o
: benchmark
/benchmark.c