summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile32
1 files changed, 15 insertions, 17 deletions
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