xref: /illumos-gate/usr/src/cmd/csh/i386/Makefile (revision 134a1f4e)
1# Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
2#
3#	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
4#	  All Rights Reserved
5#
6# Copyright (c) 1980 Regents of the University of California.
7# All rights reserved.  The Berkeley Software License Agreement
8# specifies the terms and conditions for redistribution.
9
10#
11# C Shell with process control; VM/UNIX VAX Makefile
12# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
13#
14
15CSH_PROG =	csh
16PROG =		$(CSH_PROG)
17
18include ../../Makefile.cmd
19
20MBCHAR	= -DMBCHAR	# Define this line to include multibyte input support
21DEFS	=  -DVFORK -DFILEC -DBSD_COMP -DFIVE	# No TELL when MBCHAR
22CPPFLAGS= -I. $(DEFS) $(MBCHAR) $(CPPFLAGS.master)
23CPPFLAGS +=	-I../../sh
24CPPFLAGS += -D_FILE_OFFSET_BITS=64
25LDLIBS += -lcurses
26
27MAPFILES =	../mapfile-intf $(MAPFILE.NGB)
28LDFLAGS +=	$(MAPFILES:%=-M%)
29
30HDDEP = sh.o sh.dir.o sh.dol.o sh.err.o sh.exec.o sh.exp.o sh.file.o \
31	sh.func.o sh.glob.o sh.hist.o sh.init.o sh.lex.o sh.misc.o \
32	sh.parse.o sh.proc.o sh.sem.o sh.set.o sh.time.o
33
34COMMONOBJS=	printf.o sh.char.o sh.dir.o sh.dol.o sh.err.o \
35	sh.exec.o sh.exp.o sh.file.o sh.func.o sh.glob.o sh.hist.o sh.init.o \
36	sh.lex.o sh.misc.o sh.parse.o sh.print.o sh.proc.o sh.sem.o sh.set.o \
37	sh.time.o sh.tchar.o sh.tconst.o sh.o \
38        wait3.o
39
40LOCALOBJS= signal.o
41
42COMMONSRCS=	$(COMMONOBJS:%.o=../%.c)
43
44.KEEP_STATE:
45
46.PARALLEL: $(COMMONOBJS) $(LOCALOBJS)
47
48all: $(PROG)
49
50# build rule for common source above
51%.o:	../%.c
52	$(COMPILE.c) $<
53	$(POST_PROCESS_O)
54
55%.o:	../../sh/%.c
56	$(COMPILE.c) $<
57	$(POST_PROCESS_O)
58
59$(CSH_PROG): $(COMMONOBJS) $(LOCALOBJS) $(MAPFILES)
60	$(LINK.c) $(COMMONOBJS) $(LOCALOBJS) -o $@ $(LDLIBS)
61	$(POST_PROCESS)
62
63$(HDDEP): ../sh.tconst.h
64
65install: all $(ROOTBINPROG)  $(ROOTPROG)
66
67lint:	../sh.tconst.h
68	$(LINT.c) $(COMMONSRCS) signal.c $(LDLIBS)
69
70clean:
71	$(RM) $(LOCALOBJS) $(COMMONOBJS)
72
73clobber:	clean
74	$(RM)  $(PROG)
75