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_MOD_PATHS=$(addprefix $(o)/xml/,$(LIBXML_MODS))
9 LIBXML_INCLUDES=xml.h dtd.h
10 LIBXML_DEPS=$(LIBUCW) $(LIBCHARSET)
12 $(o)/xml/libucw-xml$(LV).a: $(addsuffix .o,$(LIBXML_MOD_PATHS))
13 $(o)/xml/libucw-xml$(LV)-pic.a: $(addsuffix .oo,$(LIBXML_MOD_PATHS))
14 $(o)/xml/libucw-xml$(LV).so: $(addsuffix .oo,$(LIBXML_MOD_PATHS)) $(LIBXML_DEPS)
15 $(o)/xml/libucw-xml$(LV).so: SONAME_SUFFIX=.0
16 $(o)/xml/libucw-xml.pc: $(LIBXML_DEPS)
18 ifdef CONFIG_STATIC_PIC
19 $(o)/xml/libucw-xml.pc: $(o)/xml/libucw-xml$(LV)-pic.a
21 ifdef CONFIG_INSTALL_API
22 $(o)/xml/libucw-xml.pc: $(addprefix $(o)/xml/libucw-xml$(LV),.a .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) $(LIBCHARSET) $(LIBUCW)
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-lib
49 install-libucw-xml-lib:
50 install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
51 install -m 644 run/lib/libucw-xml$(LV).so.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-xml$(LV).so.0.0
52 ln -sf libucw-xml$(LV).so.0.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-xml$(LV).so.0
53 .PHONY: install-libucw-xml-lib
55 INSTALL_TARGETS+=install-libucw-xml-api
56 install-libucw-xml-api:
57 install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/xml $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
58 install -m 644 run/lib/pkgconfig/libucw-xml.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
59 install -m 644 $(addprefix run/include/xml/,$(LIBXML_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/xml
60 ln -sf libucw-xml$(LV).so.0.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-xml$(LV).so
61 install -m 644 run/lib/libucw-xml$(LV).a $(DESTDIR)$(INSTALL_LIB_DIR)
62 .PHONY: install-libucw-xml-api