File: Makefile

package info (click to toggle)
spline 1.1-11
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 52 kB
  • ctags: 36
  • sloc: ansic: 343; makefile: 74; sh: 4
file content (53 lines) | stat: -rw-r--r-- 1,103 bytes parent folder | download
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
45
46
47
48
49
50
51
52
53
# Makefile for aspline

RM      = rm -f

CC      = gcc
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
DEFS	= -DVERSION=\"1.1\"
LIBS    = -lm

INSTOPT=
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTOPT += -s
endif

BIN     = aspline
MAN     = $(BIN).1
SRCS    = utils.c
OBJS	= ${SRCS:.c=.o}

prefix  = /usr
BINDIR  = $(prefix)/bin
MANDIR  = $(prefix)/share/man/man1

all:	$(BIN)

.c.o:	$(SRCS)
	$(CC) $(CFLAGS) $(DEFS) -c -o $@ $<

$(BIN):	$(SRCS) $(OBJS) $(BIN).c
	$(CC) $(CFLAGS) $(DEFS) -o $(BIN) $(BIN).c $(OBJS) $(LIBS)

clean:
	$(RM) *.o *~ *.bak \#*\# errors core* a.out TAGS *.out

distclean: clean
	$(RM) $(BIN)

realclean:	distclean
	-rcsclean

install:	$(MAN) $(BIN)
	install -d -g root -o root -m 755 $(BINDIR) $(MANDIR)
	install $(INSTOPT) -g root -o root -m 755 $(BIN) $(BINDIR)
	install -g root -o root -m 644 $(MAN) $(MANDIR)