xref: /original-bsd/old/sh/Makefile (revision fd0bff90)
1#
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#
17#	@(#)Makefile	4.11 (Berkeley) 07/30/89
18#
19#
20CFLAGS=	-O -w
21LIBC=	/lib/libc.a
22SRCS=	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
25OBJS=	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
28MAN=	cd.0 intro.0 sh.0 wait.0
29
30all: sh
31
32sh: ${OBJS} ${LIBC}
33	${CC} -o $@ ${CFLAGS} ${OBJS} -lcompat
34
35clean:
36	rm -f ${OBJS} core sh
37
38cleandir: clean
39	rm -f ${MAN} tags .depend
40
41depend: ${SRCS}
42	mkdep ${CFLAGS} ${SRCS}
43
44install: ${MAN}
45	install -s -o bin -g bin -m 755 sh ${DESTDIR}/bin/sh
46	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
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
55
56lint: ${SRCS}
57	lint ${CFLAGS} ${SRCS}
58
59tags: ${SRCS}
60	ctags ${SRCS}
61