1 # Makefile for the UCW Charset Library (c) 1997--2007 Martin Mares <mj@ucw.cz>
5 LIBCHARSET_MODS=toupper tolower tocat toligatures unaccent charconv setnames fb-charconv stk-charconv mp-charconv
6 LIBCHARSET_INCLUDES=charconv.h unicat.h fb-charconv.h stk-charconv.h mp-charconv.h
8 $(o)/charset/libucw-charset.a: $(addsuffix .o,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
9 $(o)/charset/libucw-charset-pic.a: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
10 $(o)/charset/libucw-charset.so: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
11 $(o)/charset/libucw-charset.so: SONAME_SUFFIX=.$(UCW_ABI_VERSION)
12 $(o)/charset/libucw-charset.pc: $(LIBUCW)
14 ifdef CONFIG_STATIC_PIC
15 $(o)/charset/libucw-charset.pc: $(o)/charset/libucw-charset-pic.a
17 ifdef CONFIG_INSTALL_API
18 $(o)/charset/libucw-charset.pc: $(o)/charset/libucw-charset.a $(o)/charset/libucw-charset-pic.a $(o)/charset/libucw-charset.so
21 API_LIBS+=libucw-charset
22 API_INCLUDES+=$(o)/charset/.include-stamp
23 $(o)/charset/.include-stamp: $(addprefix $(s)/charset/,$(LIBCHARSET_INCLUDES))
24 $(o)/charset/.include-stamp: IDST=charset
25 run/lib/pkgconfig/libucw-charset.pc: $(o)/charset/libucw-charset.pc
27 ifdef CONFIG_CHARSET_UTILS
28 PROGS+=$(o)/charset/cs2cs
31 $(o)/charset/cs2cs: $(o)/charset/cs2cs.o $(LIBUCW) $(o)/charset/libucw-charset.pc
34 cd $(s)/charset && sh misc/generate
37 rm -f $(s)/charset/misc/u-*
39 INSTALL_TARGETS+=install-libucw-charset install-libucw-charset-api
41 install-libucw-charset:
42 install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
43 install -m 644 run/lib/libucw-charset.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)
45 install-libucw-charset-api:
46 install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
47 install -m 644 $(addprefix run/include/charset/,$(LIBCHARSET_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset
48 install -m 644 run/lib/pkgconfig/libucw-charset.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
49 ln -sf libucw-charset.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset.so
50 install -m 644 run/lib/libucw-charset.a $(DESTDIR)$(INSTALL_LIB_DIR)
51 install -m 644 run/lib/libucw-charset-pic.a $(DESTDIR)$(INSTALL_LIB_DIR)
53 .PHONY: install-libucw-charset install-libucw-charset-api