X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=charset%2FMakefile;h=8e351ff1ba178805d062c9d7b39fde167fb2ca56;hb=1bc3bb66e47ec02003658fb3040aef0ffd7b7540;hp=6c3d1c386a9b621fece00f9106ffa92b9bbcd866;hpb=ecba25617ac0c7e81f1c16238f85cb02b6e05014;p=libucw.git diff --git a/charset/Makefile b/charset/Makefile index 6c3d1c38..8e351ff1 100644 --- a/charset/Makefile +++ b/charset/Makefile @@ -1,22 +1,59 @@ -# Makefile for the Sherlock Charset Library (c) 1997--2000 Martin Mares +# Makefile for the UCW Charset Library (c) 1997--2007 Martin Mares DIRS+=charset -UNI_OBJS=toupper.o tolower.o tocat.o utf8.o unaccent.o tosig.o strlen.o debug.o \ - charconv.o setnames.o +LIBCHARSET_PROGS= +LIBCHARSET_MODS=toupper tolower tocat toligatures unaccent charconv setnames fb-charconv stk-charconv mp-charconv +LIBCHARSET_INCLUDES=charconv.h unicat.h fb-charconv.h stk-charconv.h mp-charconv.h +LIBCHARSET_DEPS=$(LIBUCW) -obj/charset/libcharset.a: $(addprefix obj/charset/,$(UNI_OBJS)) +$(o)/charset/libucw-charset$(LV).a: $(addsuffix .o,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS))) +$(o)/charset/libucw-charset$(LV).so: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS))) $(LIBCHARSET_DEPS) +$(o)/charset/libucw-charset$(LV).so: SONAME_SUFFIX=.0 +$(o)/charset/libucw-charset.pc: $(LIBCHARSET_DEPS) -build_charsets: clean_charsets - misc/unisplit - misc/gentab _U_cat byte U-cat.h - misc/gentab _U_lower word U-lower.h - misc/gentab _U_upper word U-upper.h - misc/mkunacc >misc/u-unacc - misc/gentab _U_unaccent word U-unacc.h - misc/mksig >misc/u-sig - misc/gentab _U_sig byte U-sig.h - misc/tabgen chartable.h +ifdef CONFIG_INSTALL_API +$(o)/charset/libucw-charset.pc: $(addprefix $(o)/charset/libucw-charset$(LV),.a .so) +endif -clean_charsets: - rm -f misc/u-* U-*.h chartable.h +API_LIBS+=libucw-charset +API_INCLUDES+=$(o)/charset/.include-stamp +$(o)/charset/.include-stamp: $(addprefix $(s)/charset/,$(LIBCHARSET_INCLUDES)) +$(o)/charset/.include-stamp: IDST=charset +run/lib/pkgconfig/libucw-charset.pc: $(o)/charset/libucw-charset.pc + +ifdef CONFIG_CHARSET_UTILS +LIBCHARSET_PROGS+=$(o)/charset/ucw-cs2cs +endif + +$(o)/charset/ucw-cs2cs: $(o)/charset/ucw-cs2cs.o $(LIBCHARSET) $(LIBUCW) + +PROGS+=$(LIBCHARSET_PROGS) + +build_charsets: + cd $(s)/charset && sh misc/generate + +clean:: + rm -f $(s)/charset/misc/u-* + +INSTALL_TARGETS+=install-libucw-charset-lib +install-libucw-charset-lib: + install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) + install -m 644 run/lib/libucw-charset$(LV).so.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset$(LV).so.0.0 + ln -sf libucw-charset$(LV).so.0.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset$(LV).so.0 +.PHONY: install-libucw-charset-lib + +INSTALL_TARGETS+=install-libucw-charset-api +install-libucw-charset-api: + install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) + install -m 644 $(addprefix run/include/charset/,$(LIBCHARSET_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset + install -m 644 run/lib/pkgconfig/libucw-charset.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) + ln -sf libucw-charset$(LV).so.0.0 $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset$(LV).so + install -m 644 run/lib/libucw-charset$(LV).a $(DESTDIR)$(INSTALL_LIB_DIR) +.PHONY: install-libucw-charset-api + +INSTALL_TARGETS+=install-libucw-charset-utils +install-libucw-charset-utils: + install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR) + install -m 755 $(LIBCHARSET_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR) +.PHONY: install-libucw-charset-utils