--- Makefile.orig 2014-07-30 21:21:46 UTC +++ Makefile @@ -1,25 +1,22 @@ -CC = gcc -WARN = -Wall -Wextra -Werror -CFLAGS = -O2 -g $(WARN) INCLUDE = -LDFLAGS = -lresolv +LDFLAGS = DESTDIR ?= -PREFIX = /usr/local +PREFIX ?= /usr/local BINDIR ?= $(DESTDIR)$(PREFIX)/bin -MANDIR ?= $(DESTDIR)$(PREFIX)/share/man/man1 +MANDIR ?= $(DESTDIR)$(PREFIX)/man/man1 BIN = wrapsrv MAN = wrapsrv.1 SRC = wrapsrv.c -all: $(BIN) $(DOC) +all: $(BIN) $(MAN) $(BIN): $(SRC) $(CC) $(CFLAGS) -o $@ $(SRC) $(INCLUDE) $(LDFLAGS) $(MAN): wrapsrv.docbook - docbook2x-man $< + docbook2mdoc $< > $@ clean: rm -f $(BIN)