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.so: $(addsuffix .oo,$(LIBSHXML_MOD_PATHS))
14 $(o)/shxml/libshxml.pc: $(LIBCHARSET)
16 $(o)/shxml/common.o: $(o)/shxml/unicat.h
17 $(o)/shxml/common.oo: $(o)/shxml/unicat.h
18 $(o)/shxml/source.o: $(o)/shxml/unicat.h
19 $(o)/shxml/source.oo: $(o)/shxml/unicat.h
20 $(o)/shxml/dtd.o: $(o)/shxml/unicat.h
21 $(o)/shxml/dtd.oo: $(o)/shxml/unicat.h
22 $(o)/shxml/parse.o: $(o)/shxml/unicat.h
23 $(o)/shxml/parse.oo: $(o)/shxml/unicat.h
24 $(o)/shxml/unicat.h: $(s)/shxml/unicat.pl
25 $(M)GEN $(addprefix $(o)/shxml/unicat,.h .c)
26 $(Q)$< $(addprefix $(o)/shxml/unicat,.h .c)
29 TESTS+=$(o)/shxml/xml-test.test
30 $(o)/shxml/xml-test: $(o)/shxml/xml-test.o $(LIBSHXML)
31 $(o)/shxml/xml-test.test: $(o)/shxml/xml-test
34 API_INCLUDES+=$(o)/shxml/.include-stamp
35 $(o)/shxml/.include-stamp: $(addprefix $(s)/shxml/,$(LIBSHXML_INCLUDES))
36 $(o)/shxml/.include-stamp: IDST=shxml
37 run/lib/pkgconfig/libshxml.pc: $(o)/shxml/libshxml.pc
39 INSTALL_TARGETS+=install-sh-xml
41 install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/shxml $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
42 install -m 644 $(addprefix run/include/shxml/,$(LIBSHXML_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/shxml
43 install -m 644 run/lib/pkgconfig/libshxml.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
44 install -m 644 run/lib/libshxml.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
46 .PHONY: install-sh-xml