1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
# Makefile for deroff
# $Id: Makefile,v 1.3 1999/10/10 19:08:05 david Exp $
prefix=/usr
LEXSRC=deroff.l
SRC=$(LEXSRC:.l=.c)
BIN=$(LEXSRC:.l=)
MAN=$(LEXSRC:.l=.1)
LFLAGS=-Ca -f -8
CFLAGS=-g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes\
-Wmissing-declarations -Wbad-function-cast -Wnested-externs\
-Wcast-qual -Wcast-align -Wshadow -Wwrite-strings -Wpointer-arith\
-Wformat\
-DHAVE_GETOPT_LONG
INSTOPT=
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTOPT += -s
endif
all: $(BIN)
$(SRC): $(LEXSRC)
$(LEX) $(LFLAGS) -t $^ > $@
$(BIN): $(SRC)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
install: $(MAN)
install $(INSTOPT) -o root -g root -m 755 $(BIN) $(prefix)/bin
install -o root -g root -m 644 $(MAN) $(prefix)/share/man/man1
clean:
$(RM) *.o $(SRC) $(BIN)
distclean: clean
$(RM) $(BIN)
|