~ubuntu-branches/ubuntu/natty/9base/natty

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
# std.mk - included by most Makefiles in subdirs

OFILES    ?= ${TARG}.o
MANFILE   ?= ${TARG}.1

include ../config.mk

all: ${TARG}
	@strip ${TARG}
	@echo built ${TARG}

install: install-default post-install
       
install-default: ${TARG}
	@mkdir -p ${DESTDIR}${PREFIX}/bin
	@cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/
	@chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG}
	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
	@cp -f ${MANFILE} ${DESTDIR}${MANPREFIX}/man1
	@chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILE}

uninstall: pre-uninstall
	rm -f ${DESTDIR}${PREFIX}/bin/${TARG}
	rm -f ${DESTDIR}${MANPREFIX}/man1/${MANFILE}

.c.o:
	@echo CC $*.c
	@${CC} ${CFLAGS} -I../lib9 -I../lib9/sec $*.c

clean:
	rm -f ${OFILES} ${TARG}

${TARG}: ${OFILES}
	@echo LD ${TARG}
	@${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -L../lib9 -l9 -lm