X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=charset%2FMakefile;h=32cc82a7637102008980eb58efa37daf6dced645;hb=06dcd3ee2abfe6a101d3d609e17bccac56d7202d;hp=fab75f42cf7e479bcc7967750ba0e7332f544eeb;hpb=ac9212c1d03bd23f6322bef39a4a0384b5afcc5d;p=libucw.git diff --git a/charset/Makefile b/charset/Makefile index fab75f42..32cc82a7 100644 --- a/charset/Makefile +++ b/charset/Makefile @@ -1,51 +1,45 @@ -# Makefile for the Sherlock UniCode Library (c) 1997 Martin Mares +# Makefile for the UCW Charset Library (c) 1997--2007 Martin Mares -CLIB=../lib/libunicode.a +DIRS+=charset -OBJS=toupper.o tolower.o tocat.o utf8.o unaccent.o tosig.o strlen.o debug.o +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 -all: .stamp $(CLIB) +$(o)/charset/libcharset.a: $(addsuffix .o,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS))) +$(o)/charset/libcharset-pic.a: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS))) +$(o)/charset/libcharset.so: $(addsuffix .oo,$(addprefix $(o)/charset/,$(LIBCHARSET_MODS))) +$(o)/charset/libcharset.pc: $(LIBUCW) -.stamp: - mkdir -p $(TOPDIR)/run/char - ln -sf `pwd`/set $(TOPDIR)/run/char - touch .stamp +ifdef CONFIG_STATIC_PIC +$(o)/charset/libcharset.pc: $(o)/charset/libcharset-pic.a +endif -$(CLIB): $(OBJS) - rm -f $(CLIB) - ar rcs $(CLIB) $(OBJS) +API_LIBS+=libcharset +API_INCLUDES+=$(o)/charset/.include-stamp +$(o)/charset/.include-stamp: $(addprefix $(s)/charset/,$(LIBCHARSET_INCLUDES)) +$(o)/charset/.include-stamp: IDST=charset +run/lib/pkgconfig/libcharset.pc: $(o)/charset/libcharset.pc -toupper.o: toupper.c unicode.h U-upper.h -tolower.o: tolower.c unicode.h U-lower.h -tocat.o: tocat.c unicode.h U-cat.h -utf8.o: utf8.c unicode.h -unaccent.o: unaccent.c unicode.h U-unacc.h -tosig.o: tosig.c unicode.h U-sig.h -strlen.o: strlen.c unicode.h -debug.o: debug.c unicode.h +ifdef CONFIG_CHARSET_UTILS +PROGS+=$(o)/charset/cs2cs +endif -test: test.o $(CLIB) $(TOPDIR)/lib/libsh.a - $(CC) $(LDFLAGS) test.o -o test -lsh -lunicode +$(o)/charset/cs2cs: $(o)/charset/cs2cs.o $(LIBUCW) $(o)/charset/libcharset.pc -test.o: test.c unicode.h +build_charsets: + cd $(s)/charset && sh misc/generate -buildall: cleanall - mkdir exp - for a in `find set -type f -maxdepth 1` ; do b=`basename $$a` ; echo $$b ; misc/mkexpands $$b >exp/$$b ; done - 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 +clean:: + rm -f $(s)/charset/misc/u-* -cleanall: - rm -rf exp misc/u-* U-*.h +INSTALL_TARGETS+=install-libcharset +install-libcharset: + 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/libcharset.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR) + install -m 644 run/lib/pkgconfig/libcharset.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) +ifdef CONFIG_STATIC_PIC + install -m 644 run/lib/libcharset-pic.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR) +endif -tags: - etags *.[ch] - -clean: - rm -f .stamp misc/u-* test +.PHONY: install-libcharset