Better Makefile support for built manpages and termkey.h file
This commit is contained in:
parent
480e30539b
commit
297cec0681
7
Makefile
7
Makefile
|
@ -14,6 +14,9 @@ INCDIR=$(PREFIX)/include
|
||||||
MANDIR=$(PREFIX)/share/man
|
MANDIR=$(PREFIX)/share/man
|
||||||
MAN3DIR=$(MANDIR)/man3
|
MAN3DIR=$(MANDIR)/man3
|
||||||
|
|
||||||
|
MANSOURCE=$(wildcard *.3.sh)
|
||||||
|
BUILTMAN=$(MANSOURCE:.3.sh=.3)
|
||||||
|
|
||||||
ifeq ($(DEBUG),1)
|
ifeq ($(DEBUG),1)
|
||||||
CFLAGS_DEBUG=-ggdb -DDEBUG
|
CFLAGS_DEBUG=-ggdb -DDEBUG
|
||||||
endif
|
endif
|
||||||
|
@ -37,14 +40,14 @@ libtermkey.so: termkey.o driver-csi.o driver-ti.o
|
||||||
%.o: %.c termkey.h termkey-internal.h
|
%.o: %.c termkey.h termkey-internal.h
|
||||||
$(CC) $(CFLAGS) $(CFLAGS_DEBUG) -Wall -std=c99 -fPIC -o $@ -c $<
|
$(CC) $(CFLAGS) $(CFLAGS_DEBUG) -Wall -std=c99 -fPIC -o $@ -c $<
|
||||||
|
|
||||||
doc: termkey_waitkey.3 termkey_getkey.3
|
doc: $(BUILTMAN)
|
||||||
|
|
||||||
%.3: %.3.sh
|
%.3: %.3.sh
|
||||||
sh $< >$@
|
sh $< >$@
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o demo
|
rm -f *.o demo $(BUILTMAN) termkey.h
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: install-inc install-lib install-man
|
install: install-inc install-lib install-man
|
||||||
|
|
Loading…
Reference in New Issue