1 # Makefile for the XML parser
2 # (c) 2007 Pavel Charvat <pchar@ucw.cz>
5 PROGS+=$(o)/shxml/xml-test
7 LIBSHXML_MODS=common source parse dtd
8 LIBSHXML_INCLUDES=xml.h dtd.h
10 LIBSHXML_MOD_PATHS=$(addprefix $(o)/shxml/,$(LIBSHXML_MODS))
12 $(o)/shxml/libshxml.a: $(addsuffix .o,$(LIBSHXML_MOD_PATHS))
13 $(o)/shxml/libshxml-pic.a: $(addsuffix .oo,$(LIBSHXML_MOD_PATHS))
14 $(o)/shxml/libshxml.so: $(addsuffix .oo,$(LIBSHXML_MOD_PATHS))
15 $(o)/shxml/libshxml.pc: $(LIBCHARSET)
17 ifdef CONFIG_STATIC_PIC
18 $(o)/shxml/libshxml.pc: $(o)/shxml/libshxml-pic.a
21 $(o)/shxml/common.o: $(o)/shxml/unicat.h
22 $(o)/shxml/common.oo: $(o)/shxml/unicat.h
23 $(o)/shxml/source.o: $(o)/shxml/unicat.h
24 $(o)/shxml/source.oo: $(o)/shxml/unicat.h
25 $(o)/shxml/dtd.o: $(o)/shxml/unicat.h
26 $(o)/shxml/dtd.oo: $(o)/shxml/unicat.h
27 $(o)/shxml/parse.o: $(o)/shxml/unicat.h
28 $(o)/shxml/parse.oo: $(o)/shxml/unicat.h
29 $(o)/shxml/unicat.h: $(s)/shxml/unicat.pl
30 $(M)GEN $(addprefix $(o)/shxml/unicat,.h .c)
31 $(Q)$< $(addprefix $(o)/shxml/unicat,.h .c)
34 TESTS+=$(o)/shxml/xml-test.test
35 $(o)/shxml/xml-test: $(o)/shxml/xml-test.o $(LIBSHXML)
36 $(o)/shxml/xml-test.test: $(o)/shxml/xml-test
39 API_INCLUDES+=$(o)/shxml/.include-stamp
40 $(o)/shxml/.include-stamp: $(addprefix $(s)/shxml/,$(LIBSHXML_INCLUDES))
41 $(o)/shxml/.include-stamp: IDST=shxml
42 run/lib/pkgconfig/libshxml.pc: $(o)/shxml/libshxml.pc
44 INSTALL_TARGETS+=install-sh-xml
46 install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/shxml $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
47 install -m 644 $(addprefix run/include/shxml/,$(LIBSHXML_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/shxml
48 install -m 644 run/lib/pkgconfig/libshxml.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
49 install -m 644 run/lib/libshxml.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
50 ifdef CONFIG_STATIC_PIC
51 install -m 644 run/lib/libshxml-pic.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
54 .PHONY: install-sh-xml