]> mj.ucw.cz Git - libucw.git/blob - shxml/Makefile
598a1c668c5465fadb48f9cf806abcb996e4182c
[libucw.git] / shxml / Makefile
1 # Makefile for the XML parser
2 # (c) 2007 Pavel Charvat <pchar@ucw.cz>
3
4 DIRS+=shxml
5 PROGS+=$(o)/shxml/xml-test
6
7 LIBSHXML_MODS=common source parse dtd
8 LIBSHXML_INCLUDES=xml.h dtd.h
9
10 LIBSHXML_MOD_PATHS=$(addprefix $(o)/shxml/,$(LIBSHXML_MODS))
11
12 $(o)/shxml/libucw-xml.a: $(addsuffix .o,$(LIBSHXML_MOD_PATHS))
13 $(o)/shxml/libucw-xml-pic.a: $(addsuffix .oo,$(LIBSHXML_MOD_PATHS))
14 $(o)/shxml/libucw-xml.so: $(addsuffix .oo,$(LIBSHXML_MOD_PATHS))
15 $(o)/shxml/libucw-xml.so: SONAME_SUFFIX=.$(UCW_ABI_VERSION)
16 $(o)/shxml/libucw-xml.pc: $(LIBCHARSET)
17
18 ifdef CONFIG_STATIC_PIC
19 $(o)/shxml/libucw-xml.pc: $(o)/shxml/libucw-xml-pic.a
20 endif
21 ifdef CONFIG_INSTALL_API
22 $(o)/shxml/libucw-xml.pc: $(o)/shxml/libucw-xml.a $(o)/shxml/libucw-xml-pic.a $(o)/shxml/libucw-xml.so
23 endif
24
25 $(o)/shxml/common.o: $(o)/shxml/unicat.h
26 $(o)/shxml/common.oo: $(o)/shxml/unicat.h
27 $(o)/shxml/source.o: $(o)/shxml/unicat.h
28 $(o)/shxml/source.oo: $(o)/shxml/unicat.h
29 $(o)/shxml/dtd.o: $(o)/shxml/unicat.h
30 $(o)/shxml/dtd.oo: $(o)/shxml/unicat.h
31 $(o)/shxml/parse.o: $(o)/shxml/unicat.h
32 $(o)/shxml/parse.oo: $(o)/shxml/unicat.h
33 $(o)/shxml/unicat.h: $(s)/shxml/unicat.pl
34         $(M)GEN $(addprefix $(o)/shxml/unicat,.h .c)
35         $(Q)$< $(addprefix $(o)/shxml/unicat,.h .c)
36         $(Q)touch $@
37
38 TESTS+=$(o)/shxml/xml-test.test
39 $(o)/shxml/xml-test: $(o)/shxml/xml-test.o $(LIBSHXML)
40 $(o)/shxml/xml-test.test: $(o)/shxml/xml-test
41
42 API_LIBS+=libucw-xml
43 API_INCLUDES+=$(o)/shxml/.include-stamp
44 $(o)/shxml/.include-stamp: $(addprefix $(s)/shxml/,$(LIBSHXML_INCLUDES))
45 $(o)/shxml/.include-stamp: IDST=shxml
46 run/lib/pkgconfig/libucw-xml.pc: $(o)/shxml/libucw-xml.pc
47
48 INSTALL_TARGETS+=install-libucw-xml install-libucw-xml-api
49
50 install-libucw-xml:
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)
53
54 install-libucw-xml-api:
55         install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/shxml $(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/shxml/,$(LIBSHXML_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/shxml
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)
61
62 .PHONY: install-libucw-xml install-libucw-xml-api