1 # Makefile for the XML parser
2 # (c) 2007 Pavel Charvat <pchar@ucw.cz>
5 PROGS+=$(o)/ucw-xml/xml-test
7 LIBXML_MODS=common source parse dtd ns
8 LIBXML_MOD_PATHS=$(addprefix $(o)/ucw-xml/,$(LIBXML_MODS))
9 LIBXML_INCLUDES=xml.h dtd.h
10 LIBXML_DEPS=$(LIBUCW) $(LIBCHARSET)
12 $(o)/ucw-xml/libucw-xml$(LV).a: $(addsuffix .o,$(LIBXML_MOD_PATHS))
13 $(o)/ucw-xml/libucw-xml$(LV).so: $(addsuffix .oo,$(LIBXML_MOD_PATHS)) $(LIBXML_DEPS)
14 $(o)/ucw-xml/libucw-xml$(LV).so: SONAME_SUFFIX=.0
15 $(o)/ucw-xml/libucw-xml.pc: $(LIBXML_DEPS)
17 ifdef CONFIG_INSTALL_API
18 $(o)/ucw-xml/libucw-xml.pc: $(addprefix $(o)/ucw-xml/libucw-xml$(LV),.a .so)
21 $(addsuffix .o,$(LIBXML_MOD_PATHS)): $(o)/ucw-xml/unicat.h
22 $(addsuffix .oo,$(LIBXML_MOD_PATHS)): $(o)/ucw-xml/unicat.h
23 $(o)/ucw-xml/unicat.h: $(s)/ucw-xml/unicat.pl
24 $(M)GEN $(addprefix $(o)/ucw-xml/unicat,.h .c)
25 $(Q)$< $(addprefix $(o)/ucw-xml/unicat,.h .c)
28 TESTS+=$(o)/ucw-xml/xml-test.test
29 $(o)/ucw-xml/xml-test: $(o)/ucw-xml/xml-test.o $(LIBXML) $(LIBCHARSET) $(LIBUCW)
30 $(o)/ucw-xml/xml-test.test: $(o)/ucw-xml/xml-test
33 API_INCLUDES+=$(o)/ucw-xml/.include-stamp
34 $(o)/ucw-xml/.include-stamp: $(addprefix $(s)/ucw-xml/,$(LIBXML_INCLUDES))
35 $(o)/ucw-xml/.include-stamp: IDST=ucw-xml
36 run/lib/pkgconfig/libucw-xml.pc: $(o)/ucw-xml/libucw-xml.pc
38 INSTALL_TARGETS+=install-libucw-xml-lib
39 install-libucw-xml-lib:
40 install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
41 install -m 644 run/lib/libucw-xml$(LV).so.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-xml$(LV).so.0.0
42 ln -sf libucw-xml$(LV).so.0.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-xml$(LV).so.0
43 .PHONY: install-libucw-xml-lib
45 INSTALL_TARGETS+=install-libucw-xml-api
46 install-libucw-xml-api:
47 install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw-xml $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
48 install -m 644 run/lib/pkgconfig/libucw-xml.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
49 install -m 644 $(addprefix run/include/ucw-xml/,$(LIBXML_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw-xml
50 ln -sf libucw-xml$(LV).so.0.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-xml$(LV).so
51 install -m 644 run/lib/libucw-xml$(LV).a $(DESTDIR)$(INSTALL_LIB_DIR)
52 .PHONY: install-libucw-xml-api
54 include $(s)/ucw-xml/doc/Makefile