xref: /titanic_44/usr/src/cmd/csh/i386/Makefile (revision 33649781048a478eaa5fa15460fc764530f86c8c)
1# Copyright 2008 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
30LDLIBS += -lcurses -lsecdb
31
32MAPFILES =	../mapfile-intf $(MAPFILE.NGB)
33LDFLAGS +=	$(MAPFILES:%=-M%)
34
35PFOBJS = sh_policy.o
36
37HDDEP = sh.o sh.dir.o sh.dol.o sh.err.o sh.exec.o sh.exp.o sh.file.o \
38	sh.func.o sh.glob.o sh.hist.o sh.init.o sh.lex.o sh.misc.o \
39	sh.parse.o sh.proc.o sh.sem.o sh.set.o sh.time.o
40
41COMMONOBJS=	printf.o sh.char.o sh.dir.o sh.dol.o sh.err.o \
42	sh.exec.o sh.exp.o sh.file.o sh.func.o sh.glob.o sh.hist.o sh.init.o \
43	sh.lex.o sh.misc.o sh.parse.o sh.print.o sh.proc.o sh.sem.o sh.set.o \
44	sh.time.o sh.tchar.o sh.tconst.o sh.o \
45        wait3.o
46
47LOCALOBJS= signal.o
48
49COMMONSRCS=	$(COMMONOBJS:%.o=../%.c)
50PFSRCS=		$(PFOBJS:%=pfcsh_objs/%)
51
52.KEEP_STATE:
53
54.PARALLEL: $(COMMONOBJS) $(LOCALOBJS)
55
56all: $(PROG)
57
58# build rule for common source above
59%.o:	../%.c
60	$(COMPILE.c) $<
61	$(POST_PROCESS_O)
62
63%.o:	../../sh/%.c
64	$(COMPILE.c) $<
65	$(POST_PROCESS_O)
66
67$(CSH_PROG): $(COMMONOBJS) $(PFOBJS) $(LOCALOBJS) $(MAPFILES)
68	$(LINK.c) $(COMMONOBJS) $(PFOBJS) $(LOCALOBJS) -o $@ $(LDLIBS)
69	$(POST_PROCESS)
70
71$(ROOTPFCSH): $(ROOTPROG)
72	$(RM) $@
73	$(LN) $(ROOTPROG) $@
74
75$(HDDEP): ../sh.tconst.h
76
77install: all $(ROOTBINPROG)  $(ROOTPROG) $(ROOTPFCSH)
78
79lint:	../sh.tconst.h
80	$(LINT.c) $(COMMONSRCS) $(PFSRCS) signal.c
81
82clean:
83	$(RM) $(LOCALOBJS) $(COMMONOBJS) $(PFOBJS)
84
85clobber:	clean
86	$(RM)  $(PROG)
87