From 3ff2e62722ff5a51a32961d97dc028c56e00481f Mon Sep 17 00:00:00 2001 From: kaa Date: Thu, 9 Nov 2023 22:57:12 -0800 Subject: A good copy of libhyphen is included in-tree. Makefile has been modified so as to allow easy compilation. The build path is now a compiled-in constant, allowing for the hyphenation patterns in-tree to be referenced from any directory. Hyphenation language may be specified at runtime using -l. --- makefile | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 84b0f21..f0c8c7d 100644 --- a/makefile +++ b/makefile @@ -1,25 +1,23 @@ CC = cc #CC = tcc -CFLAGS = -Wall -I/usr/local/include -CFLAGS += -std=c89 -LDFLAGS = -L/usr/local/lib -lhyphen -LDFLAGS += -static -bindir = /home/kaa/bin +CFLAGS = -Wall -I/usr/include +CFLAGS += -static -std=c89 -Iinclude +LDFLAGS = +DEST=$$(pwd)/bin all: hyp -hyp: - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ en.c hyp.c -hyp-es: - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ es.c hyp.c +ext/hyphen-2.8.8/README: + cd ext && tar zxf hyphen-2.8.8.tar.gz +lib/libhyphen.a: ext/hyphen-2.8.8/README + cd ext/hyphen-2.8.8 && ./configure --prefix=$$(pwd)/../.. && make install -clean: - rm -f hyp hyp-es +hyp: lib/libhyphen.a + $(CC) $(CFLAGS) $(HYPFLAGS) $(LDFLAGS) -o $@ -DBUILD_PATH=\"$$(pwd)\" hyp.c lib/libhyphen.a +clean: + rm -f hyp hyp-es && rm -rf lib include bin && cd ext/hyphen-2.8.8 && make clean install: all - cp hyp $(bindir)/hyp - cp unhyp $(bindir)/unhyp - -uninstall: - rm -f $(bindir)/hyp - rm -f $(bindir)/unhyp + strip hyp + cp hyp $(DEST)/hyp + cp unhyp $(DEST)/unhyp -- cgit v1.2.3