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
8 LIBCHARSET_DEPS=$(LIBUCW)
10 $(o)/charset/libucw-charset$(LV).a: $(addsuffix .o,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
11 $(o)/charset/libucw-charset$(LV)-pic.a: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS)))
12 $(o)/charset/libucw-charset$(LV).so: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS))) $(LIBCHARSET_DEPS)
13 $(o)/charset/libucw-charset$(LV).so: SONAME_SUFFIX=.0
14 $(o)/charset/libucw-charset.pc: $(LIBCHARSET_DEPS)
16 ifdef CONFIG_STATIC_PIC
17 $(o)/charset/libucw-charset.pc: $(o)/charset/libucw-charset$(LV)-pic.a
19 ifdef CONFIG_INSTALL_API
20 $(o)/charset/libucw-charset.pc: $(addprefix $(o)/charset/libucw-charset$(LV),.a .so)
23 API_LIBS+=libucw-charset
24 API_INCLUDES+=$(o)/charset/.include-stamp
25 $(o)/charset/.include-stamp: $(addprefix $(s)/charset/,$(LIBCHARSET_INCLUDES))
26 $(o)/charset/.include-stamp: IDST=charset
27 run/lib/pkgconfig/libucw-charset.pc: $(o)/charset/libucw-charset.pc
29 ifdef CONFIG_CHARSET_UTILS
30 LIBCHARSET_PROGS+=$(o)/charset/ucw-cs2cs
33 $(o)/charset/ucw-cs2cs: $(o)/charset/ucw-cs2cs.o $(LIBCHARSET) $(LIBUCW)
35 PROGS+=$(LIBCHARSET_PROGS)
38 cd $(s)/charset && sh misc/generate
41 rm -f $(s)/charset/misc/u-*
43 INSTALL_TARGETS+=install-libucw-charset-lib
44 install-libucw-charset-lib:
45 install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
46 install -m 644 run/lib/libucw-charset$(LV).so.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset$(LV).so.0.0
47 ln -sf libucw-charset$(LV).so.0.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset$(LV).so.0
48 .PHONY: install-libucw-charset-lib
50 INSTALL_TARGETS+=install-libucw-charset-api
51 install-libucw-charset-api:
52 install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
53 install -m 644 $(addprefix run/include/charset/,$(LIBCHARSET_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset
54 install -m 644 run/lib/pkgconfig/libucw-charset.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
55 ln -sf libucw-charset$(LV).so.0.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset$(LV).so
56 install -m 644 run/lib/libucw-charset$(LV).a $(DESTDIR)$(INSTALL_LIB_DIR)
57 .PHONY: install-libucw-charset-api
59 INSTALL_TARGETS+=install-libucw-charset-utils
60 install-libucw-charset-utils:
61 install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR)
62 install -m 755 $(LIBCHARSET_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR)
63 .PHONY: install-libucw-charset-utils