1# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 2# Use is subject to license terms. 3 4# Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T 5# All Rights Reserved 6 7# Copyright (c) 1980 Regents of the University of California. 8# All rights reserved. The Berkeley Software License Agreement 9# specifies the terms and conditions for redistribution. 10 11# ident "%Z%%M% %I% %E% SMI" 12 13# 14# C Shell with process control; VM/UNIX VAX Makefile 15# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria 16# 17 18CSH_PROG = csh 19PROG = $(CSH_PROG) 20PFCSH_PROG= pfcsh 21ROOTPFCSH= $(ROOTBIN)/$(PFCSH_PROG) 22 23include ../../Makefile.cmd 24 25MBCHAR = -DMBCHAR # Define this line to include multibyte input support 26DEFS = -DVFORK -DFILEC -DBSD_COMP -DFIVE # No TELL when MBCHAR 27CPPFLAGS= -I. $(DEFS) $(MBCHAR) $(CPPFLAGS.master) 28CPPFLAGS += -I../../sh 29CPPFLAGS += -D_FILE_OFFSET_BITS=64 30LAZYLIBS = $(ZLAZYLOAD) -lsecdb $(ZNOLAZYLOAD) 31lint := LAZYLIBS = -lsecdb 32LDLIBS += -lcurses $(LAZYLIBS) 33 34PFOBJS = sh_policy.o 35 36HDDEP = sh.o sh.dir.o sh.dol.o sh.err.o sh.exec.o sh.exp.o sh.file.o \ 37 sh.func.o sh.glob.o sh.hist.o sh.init.o sh.lex.o sh.misc.o \ 38 sh.parse.o sh.proc.o sh.sem.o sh.set.o sh.time.o 39 40COMMONOBJS= printf.o sh.char.o sh.dir.o sh.dol.o sh.err.o \ 41 sh.exec.o sh.exp.o sh.file.o sh.func.o sh.glob.o sh.hist.o sh.init.o \ 42 sh.lex.o sh.misc.o sh.parse.o sh.print.o sh.proc.o sh.sem.o sh.set.o \ 43 sh.time.o sh.tchar.o sh.tconst.o sh.o \ 44 wait3.o 45 46LOCALOBJS= signal.o 47 48COMMONSRCS= $(COMMONOBJS:%.o=../%.c) 49PFSRCS= ../../sh/sh_policy.c 50 51.KEEP_STATE: 52 53.PARALLEL: $(COMMONOBJS) $(LOCALOBJS) 54 55all: $(PROG) 56 57# build rule for common source above 58%.o: ../%.c 59 $(COMPILE.c) $< 60 $(POST_PROCESS_O) 61 62%.o: ../../sh/%.c 63 $(COMPILE.c) $< 64 $(POST_PROCESS_O) 65 66$(CSH_PROG): sh.tconst.h .WAIT $(COMMONOBJS) $(PFOBJS) $(LOCALOBJS) 67 $(LINK.c) $(COMMONOBJS) $(PFOBJS) $(LOCALOBJS) -o $@ $(LDLIBS) 68 $(POST_PROCESS) 69 70$(ROOTPFCSH): $(ROOTPROG) 71 $(RM) $@ 72 $(LN) $(ROOTPROG) $@ 73 74sh.tconst.h: ../sh.tconst.c ../make.sh.tconst.h.ed 75 $(RM) $@ 76 ed ../sh.tconst.c < ../make.sh.tconst.h.ed 77 78$(HDDEP): sh.tconst.h 79 80install: all $(ROOTBINPROG) $(ROOTPROG) $(ROOTPFCSH) 81 82lint: sh.tconst.h 83 $(LINT.c) $(COMMONSRCS) $(PFSRCS) signal.c $(LDLIBS) 84 85clean: 86 $(RM) $(LOCALOBJS) $(COMMONOBJS) $(PFOBJS) sh.tconst.h 87 88clobber: clean 89 $(RM) $(PROG) 90