--- Makefile.orig 2014-07-30 21:21:46 UTC +++ Makefile @@ -1,10 +1,7 @@ -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 @@ -13,13 +10,13 @@ SRC = wrapsrv.c 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)