File: Makefile

package info (click to toggle)
9base 1%3A6-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 5,148 kB
  • ctags: 6,505
  • sloc: ansic: 61,051; yacc: 1,991; asm: 1,621; cs: 1,150; perl: 965; makefile: 592; sh: 12; sed: 4
file content (37 lines) | stat: -rw-r--r-- 931 bytes parent folder | download | duplicates (8)
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
# sam - sam shell unix port from plan9
# Depends on ../lib9

TARG      = sam
OFILES= sam.o address.o buff.o cmd.o disk.o error.o file.o\
	io.o list.o mesg.o moveto.o multi.o rasp.o regexp.o\
	shell.o string.o sys.o unix.o util.o xec.o
MANFILES  = sam.1

include ../config.mk

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

install: ${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 ${MANFILES} ${DESTDIR}${MANPREFIX}/man1
	@chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES}

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

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

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

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