aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-18 11:55:08 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-18 11:55:08 +0000
commit297cec06815b32ca19de62422c72670169fbad5d (patch)
tree6e58272058d827e1f3404da19998b51a391905ce /Makefile
parent480e30539b617bcda6d8cfbf18464e7365367174 (diff)
downloadtermo-297cec06815b32ca19de62422c72670169fbad5d.tar.gz
termo-297cec06815b32ca19de62422c72670169fbad5d.tar.xz
termo-297cec06815b32ca19de62422c72670169fbad5d.zip
Better Makefile support for built manpages and termkey.h file
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 97441a1..c8724c4 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,9 @@ INCDIR=$(PREFIX)/include
MANDIR=$(PREFIX)/share/man
MAN3DIR=$(MANDIR)/man3
+MANSOURCE=$(wildcard *.3.sh)
+BUILTMAN=$(MANSOURCE:.3.sh=.3)
+
ifeq ($(DEBUG),1)
CFLAGS_DEBUG=-ggdb -DDEBUG
endif
@@ -37,14 +40,14 @@ libtermkey.so: termkey.o driver-csi.o driver-ti.o
%.o: %.c termkey.h termkey-internal.h
$(CC) $(CFLAGS) $(CFLAGS_DEBUG) -Wall -std=c99 -fPIC -o $@ -c $<
-doc: termkey_waitkey.3 termkey_getkey.3
+doc: $(BUILTMAN)
%.3: %.3.sh
sh $< >$@
.PHONY: clean
clean:
- rm -f *.o demo
+ rm -f *.o demo $(BUILTMAN) termkey.h
.PHONY: install
install: install-inc install-lib install-man