1 # Makefile for the UCW Charset Library (c) 1997--2007 Martin Mares <mj@ucw.cz>
6 LIBCHARSET_MODS=toupper tolower tocat toligatures unaccent charconv setnames fb-charconv stk-charconv mp-charconv
7 LIBCHARSET_INCLUDES=charconv.h unicat.h fb-charconv.h stk-charconv.h mp-charconv.h
9 $(o)/charset/libucw-charset$(LV).a: $(addsuffix .o,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
10 $(o)/charset/libucw-charset$(LV)-pic.a: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
11 $(o)/charset/libucw-charset$(LV).so: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
12 $(o)/charset/libucw-charset$(LV).so: SONAME_SUFFIX=.$(UCW_ABI_MAJOR)
13 $(o)/charset/libucw-charset.pc: $(LIBUCW)
15 ifdef CONFIG_STATIC_PIC
16 $(o)/charset/libucw-charset.pc: $(o)/charset/libucw-charset$(LV)-pic.a
18 ifdef CONFIG_INSTALL_API
19 $(o)/charset/libucw-charset.pc: $(addprefix $(o)/charset/libucw-charset$(LV),.a -pic.a .so)
22 API_LIBS+=libucw-charset
23 API_INCLUDES+=$(o)/charset/.include-stamp
24 $(o)/charset/.include-stamp: $(addprefix $(s)/charset/,$(LIBCHARSET_INCLUDES))
25 $(o)/charset/.include-stamp: IDST=charset
26 run/lib/pkgconfig/libucw-charset.pc: $(o)/charset/libucw-charset.pc
28 ifdef CONFIG_CHARSET_UTILS
29 LIBCHARSET_PROGS+=$(o)/charset/ucw-cs2cs
32 $(o)/charset/ucw-cs2cs: $(o)/charset/ucw-cs2cs.o $(LIBCHARSET)
34 PROGS+=$(LIBCHARSET_PROGS)
37 cd $(s)/charset && sh misc/generate
40 rm -f $(s)/charset/misc/u-*
42 INSTALL_TARGETS+=install-libucw-charset-lib
43 install-libucw-charset-lib:
44 install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
45 install -m 644 run/lib/libucw-charset$(LV).so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset$(LV).so.$(UCW_ABI_VERSION)
46 .PHONY: install-libucw-charset-lib
48 INSTALL_TARGETS+=install-libucw-charset-api
49 install-libucw-charset-api:
50 install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
51 install -m 644 $(addprefix run/include/charset/,$(LIBCHARSET_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset
52 install -m 644 run/lib/pkgconfig/libucw-charset.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
53 ln -sf libucw-charset$(LV).so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset$(LV).so
54 install -m 644 run/lib/libucw-charset$(LV).a $(DESTDIR)$(INSTALL_LIB_DIR)
55 install -m 644 run/lib/libucw-charset$(LV)-pic.a $(DESTDIR)$(INSTALL_LIB_DIR)
56 .PHONY: install-libucw-charset-api
58 INSTALL_TARGETS+=install-libucw-charset-utils
59 install-libucw-charset-utils:
60 install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR)
61 install -m 755 $(LIBCHARSET_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR)
62 .PHONY: install-libucw-charset-utils