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