Commit | Line | Data |
---|---|---|
0cc4afcc | 1 | # |
6e481409 KB |
2 | # Copyright (c) 1987 The Regents of the University of California. |
3 | # All rights reserved. | |
4 | # | |
5 | # Redistribution and use in source and binary forms are permitted | |
6 | # provided that the above copyright notice and this paragraph are | |
7 | # duplicated in all such forms and that any documentation, | |
8 | # advertising materials, and other materials related to such | |
9 | # distribution and use acknowledge that the software was developed | |
10 | # by the University of California, Berkeley. The name of the | |
11 | # University may not be used to endorse or promote products derived | |
12 | # from this software without specific prior written permission. | |
13 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
14 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
15 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
16 | # | |
a2afe4ee | 17 | # @(#)Makefile 4.9 (Berkeley) %G% |
66456d87 | 18 | # |
66456d87 KB |
19 | # |
20 | CFLAGS= -O -w | |
21 | LIBC= /lib/libc.a | |
22 | SRCS= setbrk.c builtin.c blok.c stak.c cmd.c fault.c main.c word.c \ | |
23 | string.c name.c args.c xec.c service.c error.c io.c print.c \ | |
24 | macro.c expand.c ctype.c msg.c | |
25 | OBJS= setbrk.o builtin.o blok.o stak.o cmd.o fault.o main.o word.o \ | |
26 | string.o name.o args.o xec.o service.o error.o io.o print.o \ | |
27 | macro.o expand.o ctype.o msg.o | |
6e481409 | 28 | MAN= sh.0 |
66456d87 KB |
29 | |
30 | all: sh | |
31 | ||
6e481409 | 32 | sh: ${OBJS} ${LIBC} |
66456d87 KB |
33 | ${CC} -o $@ ${CFLAGS} ${OBJS} |
34 | ||
6e481409 | 35 | clean: |
66456d87 KB |
36 | rm -f ${OBJS} core sh |
37 | ||
6e481409 KB |
38 | cleandir: clean |
39 | rm -f ${MAN} tags .depend | |
40 | ||
41 | depend: ${SRCS} | |
66456d87 KB |
42 | mkdep ${CFLAGS} ${SRCS} |
43 | ||
6e481409 | 44 | install: ${MAN} |
66456d87 | 45 | install -s -o bin -g bin -m 755 sh ${DESTDIR}/bin/sh |
6e481409 | 46 | install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 |
a2afe4ee KB |
47 | rm -f ${DESTDIR}/usr/man/cat1/case.0 |
48 | rm -f ${DESTDIR}/usr/man/cat1/for.0 | |
49 | rm -f ${DESTDIR}/usr/man/cat1/if.0 | |
50 | rm -f ${DESTDIR}/usr/man/cat1/while.0 | |
51 | ln ${DESTDIR}/usr/man/cat1/sh.0 ${DESTDIR}/usr/man/cat1/case.0 | |
52 | ln ${DESTDIR}/usr/man/cat1/sh.0 ${DESTDIR}/usr/man/cat1/for.0 | |
53 | ln ${DESTDIR}/usr/man/cat1/sh.0 ${DESTDIR}/usr/man/cat1/if.0 | |
54 | ln ${DESTDIR}/usr/man/cat1/sh.0 ${DESTDIR}/usr/man/cat1/while.0 | |
66456d87 | 55 | |
6e481409 | 56 | lint: ${SRCS} |
66456d87 KB |
57 | lint ${CFLAGS} ${SRCS} |
58 | ||
6e481409 | 59 | tags: ${SRCS} |
66456d87 | 60 | ctags ${SRCS} |