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