add all label
[unix-history] / usr / src / bin / csh / Makefile
CommitLineData
fef62a9f 1#
d36dffb4
KB
2# Copyright (c) 1987 The Regents of the University of California.
3# All rights reserved.
b79f4fa9 4#
d36dffb4
KB
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#
b60a4331 17# @(#)Makefile 5.13 (Berkeley) %G%
fef62a9f
BJ
18#
19# C Shell with process control; VM/UNIX VAX Makefile
20# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
21#
35371dec
EW
22# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile.
23
d36dffb4 24DEFS= -DTELL -DVFORK -DFILEC # -DPROF
5fe577ad 25CFLAGS= ${DEFS} -I. -O # -pg
fef62a9f 26XSTR= /usr/ucb/xstr
d36dffb4 27MAN= csh.0
9db2f2d5 28
fad613b5
KB
29SRCS= alloc.c doprnt.c sh.c sh.char.c sh.dir.c sh.dol.c sh.err.c \
30 sh.exec.c sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c \
31 sh.init.c sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c \
32 sh.sem.c sh.set.c sh.time.c
33OBJS= alloc.o doprnt.o sh.o sh.char.o sh.dir.o sh.dol.o sh.err.o \
34 sh.exec.o sh.exp.o sh.file.o sh.func.o sh.glob.o sh.hist.o \
35 sh.init.o sh.lex.o sh.misc.o sh.parse.o sh.print.o sh.proc.o \
36 sh.sem.o sh.set.o sh.time.o
fef62a9f
BJ
37
38# Special massaging of C files for sharing of strings
39.c.o:
40 ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
41 ${CC} -c ${CFLAGS} x.c
f7f80f24 42 mv -f x.o $*.o
644ec8bb 43 rm -f x.c
fef62a9f 44
b60a4331
KB
45all: csh
46
35371dec
EW
47# strings.o must be last since it can change when previous files compile
48csh: ${OBJS} strings.o
9db2f2d5 49 ${CC} ${CFLAGS} ${OBJS} strings.o -o $@
fef62a9f 50
9bdca61e 51# strings.o, sh.init.o, and sh.char.o are specially processed to be shared
fef62a9f
BJ
52strings.o: strings
53 ${XSTR}
54 ${CC} -c -R xs.c
f7f80f24 55 mv -f xs.o strings.o
644ec8bb 56 rm -f xs.c
fef62a9f 57
9bdca61e
JL
58sh.char.o sh.init.o:
59 ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
fef62a9f 60 ${CC} ${CFLAGS} -c -R x.c
9bdca61e 61 mv -f x.o $*.o
644ec8bb 62 rm -f x.c
66456d87 63
9db2f2d5 64clean:
d36dffb4 65 rm -f ${OBJS} core csh strings strings.o x.c x.o xs.c xs.o
9db2f2d5 66
d36dffb4
KB
67cleandir: clean
68 rm -f ${MAN} tags .depend
9db2f2d5 69
d36dffb4
KB
70depend: ${SRCS}
71 mkdep ${CFLAGS} ${SRCS}
9db2f2d5 72
d36dffb4 73install: ${MAN}
9db2f2d5 74 install -s -o bin -g bin -m 755 csh ${DESTDIR}/bin/csh
d36dffb4
KB
75 install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
76 rm -f ${DESTDIR}/usr/man/cat1/limit.0
77 ln ${DESTDIR}/usr/man/cat1/csh.0 ${DESTDIR}/usr/man/cat1/limit.0
78
79lint: ${SRCS}
80 lint ${CFLAGS} ${SRCS}
9db2f2d5
KB
81
82tags:
83 ctags ${SRCS}