add all label
[unix-history] / usr / src / bin / csh / Makefile
... / ...
CommitLineData
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 5.13 (Berkeley) %G%
18#
19# C Shell with process control; VM/UNIX VAX Makefile
20# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
21#
22# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile.
23
24DEFS= -DTELL -DVFORK -DFILEC # -DPROF
25CFLAGS= ${DEFS} -I. -O # -pg
26XSTR= /usr/ucb/xstr
27MAN= csh.0
28
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
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
42 mv -f x.o $*.o
43 rm -f x.c
44
45all: csh
46
47# strings.o must be last since it can change when previous files compile
48csh: ${OBJS} strings.o
49 ${CC} ${CFLAGS} ${OBJS} strings.o -o $@
50
51# strings.o, sh.init.o, and sh.char.o are specially processed to be shared
52strings.o: strings
53 ${XSTR}
54 ${CC} -c -R xs.c
55 mv -f xs.o strings.o
56 rm -f xs.c
57
58sh.char.o sh.init.o:
59 ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
60 ${CC} ${CFLAGS} -c -R x.c
61 mv -f x.o $*.o
62 rm -f x.c
63
64clean:
65 rm -f ${OBJS} core csh strings strings.o x.c x.o xs.c xs.o
66
67cleandir: clean
68 rm -f ${MAN} tags .depend
69
70depend: ${SRCS}
71 mkdep ${CFLAGS} ${SRCS}
72
73install: ${MAN}
74 install -s -o bin -g bin -m 755 csh ${DESTDIR}/bin/csh
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}
81
82tags:
83 ctags ${SRCS}