From 15904ad51325426bcb3b8e87e714584e437417b7 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 21 Dec 2025 09:53:48 +0100 Subject: Implement script and block listing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e189657..5b9f09b 100644 --- a/Makefile +++ b/Makefile @@ -15,10 +15,13 @@ LIB_MINOR = 0 LIB_VERSION = $(LIB_MAJOR).$(LIB_MINOR) LIB_NAME = cmap +UNICODE_VERSION = 17.0.0 + OBJ =\ libcmap_block_list.o\ libcmap_script_list.o\ + libcmap_find_in_no_block.o\ libcmap_find_block.o\ libcmap_find_script.o @@ -27,10 +30,18 @@ HDR =\ LOBJ = $(OBJ:.o=.lo) +PARSERS =\ + Scripts.parse\ + Blocks.parse + all: libcmap.a libcmap.$(LIBEXT) $(OBJ): $(HDR) $(LOBJ): $(HDR) +$(PARSERS:=.o): parse-common.c + +libcmap_script_list.o: Scripts.txt.c +libcmap_block_list.o: Blocks.txt.c .c.o: $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) @@ -46,6 +57,18 @@ libcmap.a: $(OBJ) libcmap.$(LIBEXT): $(LOBJ) $(CC) $(LIBFLAGS) -o $@ $(LOBJ) $(LDFLAGS) +Scripts.$(UNICODE_VERSION).txt: + $(DOWNLOAD) 'https://www.unicode.org/Public/17.0.0/ucd/Scripts.txt' > $@ + +Blocks.$(UNICODE_VERSION).txt: + $(DOWNLOAD) 'https://www.unicode.org/Public/17.0.0/ucd/Blocks.txt' > $@ + +Scripts.txt.c: Scripts.$(UNICODE_VERSION).txt Scripts.parse + ./Scripts.parse < $(@:.txt.c=).$(UNICODE_VERSION).txt > $@ + +Blocks.txt.c: Blocks.$(UNICODE_VERSION).txt Blocks.parse + ./Blocks.parse < $(@:.txt.c=).$(UNICODE_VERSION).txt > $@ + install: libcmap.a libcmap.$(LIBEXT) mkdir -p -- "$(DESTDIR)$(PREFIX)/lib" mkdir -p -- "$(DESTDIR)$(PREFIX)/include" @@ -66,8 +89,14 @@ uninstall: clean: -rm -f -- *.o *.a *.lo *.su *.so *.so.* *.dll *.dylib -rm -f -- *.gch *.gcov *.gcno *.gcda *.$(LIBEXT) + -rm -f -- *.txt.c *.parse + +clean-downloads: + -rm -f -- *.txt + +clean-all: clean clean-downloads .SUFFIXES: .SUFFIXES: .lo .o .c -.PHONY: all install uninstall clean +.PHONY: all install uninstall clean clean-downloads clean-all -- cgit v1.3.1