File: Makefile

package info (click to toggle)
deroff 1.1-6
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 44 kB
  • ctags: 12
  • sloc: lex: 308; makefile: 69; sh: 4
file content (44 lines) | stat: -rw-r--r-- 904 bytes parent folder | download | duplicates (3)
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)