diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -1,5 +1,6 @@ TARGET=quart PREFIX?=/usr/local +MANUALS=$(PREFIX)/share/man SRC=*.c CC=gcc CFLAGS=-D_GNU_SOURCE -std=c99 -pedantic -lm @@ -17,9 +18,8 @@ noasan: $(SRC) $(CC) $(DBG_FLAGS) $(CFLAGS) -o $(TARGET) $^ docs: - scdoc < quart.1.scd > quart.1 - scdoc < quart.5.scd > quart.5 - ln -fs quart.1 qc.1 + scdoc < man/quart.1.scd > man/quart.1 + scdoc < man/quart.5.scd > man/quart.5 .PHONY: clean @@ -32,12 +32,13 @@ clean: install: $(TARGET) @cp -v $(TARGET) $(PREFIX)/bin/$(TARGET) @cp -v qc $(PREFIX)/bin/qc - @install -m644 quart.1 $(PREFIX)/share/man1/quart.1 - @install -m644 quart.5 $(PREFIX)/share/man5/quart.5 - @ln -s $(PREFIX)/share/man5/quart.1 $(PREFIX)/share/man5/qc.1 + @install -v -m644 man/quart.1 $(MANUALS)/man1/quart.1 + @install -v -m644 man/quart.5 $(MANUALS)/man5/quart.5 + @ln -fs $(MANUALS)/man1/quart.1 $(MANUALS)/man1/qc.1 uninstall: @rm -v $(PREFIX)/bin/$(TARGET) - @rm -v $(PREFIX)/share/man1/quart.1 - @rm -v $(PREFIX)/share/man5/quart.5 - @rm -v $(PREFIX)/share/man5/qc.1 + @rm -v $(PREFIX)/bin/qc + @rm -v $(MANUALS)/man1/quart.1 + @rm -v $(MANUALS)/man5/quart.5 + @rm -v $(MANUALS)/man1/qc.1 |