1 # Makefile for the XML parser
2 # (c) 2007 Pavel Charvat <pchar@ucw.cz>
5 PROGS+=$(o)/xml/xml-test
7 LIBXML_MODS=common source parse dtd
8 LIBXML_INCLUDES=xml.h dtd.h
10 LIBXML_MOD_PATHS=$(addprefix $(o)/xml/,$(LIBXML_MODS))
12 $(o)/xml/libucw-xml.a: $(addsuffix .o,$(LIBXML_MOD_PATHS))
13 $(o)/xml/libucw-xml-pic.a: $(addsuffix .oo,$(LIBXML_MOD_PATHS))
14 $(o)/xml/libucw-xml.so: $(addsuffix .oo,$(LIBXML_MOD_PATHS))
15 $(o)/xml/libucw-xml.so: SONAME_SUFFIX=.$(UCW_ABI_VERSION)
16 $(o)/xml/libucw-xml.pc: $(LIBCHARSET)
18 ifdef CONFIG_STATIC_PIC
19 $(o)/xml/libucw-xml.pc: $(o)/xml/libucw-xml-pic.a
21 ifdef CONFIG_INSTALL_API
22 $(o)/xml/libucw-xml.pc: $(o)/xml/libucw-xml.a $(o)/xml/libucw-xml-pic.a $(o)/xml/libucw-xml.so
25 $(o)/xml/common.o: $(o)/xml/unicat.h
26 $(o)/xml/common.oo: $(o)/xml/unicat.h
27 $(o)/xml/source.o: $(o)/xml/unicat.h
28 $(o)/xml/source.oo: $(o)/xml/unicat.h
29 $(o)/xml/dtd.o: $(o)/xml/unicat.h
30 $(o)/xml/dtd.oo: $(o)/xml/unicat.h
31 $(o)/xml/parse.o: $(o)/xml/unicat.h
32 $(o)/xml/parse.oo: $(o)/xml/unicat.h
33 $(o)/xml/unicat.h: $(s)/xml/unicat.pl
34 $(M)GEN $(addprefix $(o)/xml/unicat,.h .c)
35 $(Q)$< $(addprefix $(o)/xml/unicat,.h .c)
38 TESTS+=$(o)/xml/xml-test.test
39 $(o)/xml/xml-test: $(o)/xml/xml-test.o $(LIBXML)
40 $(o)/xml/xml-test.test: $(o)/xml/xml-test
43 API_INCLUDES+=$(o)/xml/.include-stamp
44 $(o)/xml/.include-stamp: $(addprefix $(s)/xml/,$(LIBXML_INCLUDES))
45 $(o)/xml/.include-stamp: IDST=xml
46 run/lib/pkgconfig/libucw-xml.pc: $(o)/xml/libucw-xml.pc
48 INSTALL_TARGETS+=install-libucw-xml install-libucw-xml-api
51 install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
52 install -m 644 run/lib/libucw-xml.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)
54 install-libucw-xml-api:
55 install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/xml $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
56 install -m 644 run/lib/pkgconfig/libucw-xml.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
57 install -m 644 $(addprefix run/include/xml/,$(LIBXML_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/xml
58 ln -sf libucw-xml.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-xml.so
59 install -m 644 run/lib/libucw-xml.a $(DESTDIR)$(INSTALL_LIB_DIR)
60 install -m 644 run/lib/libucw-xml-pic.a $(DESTDIR)$(INSTALL_LIB_DIR)
62 .PHONY: install-libucw-xml install-libucw-xml-api