xref: /illumos-gate/usr/src/cmd/csh/sparc/Makefile (revision f6da83d4178694e7113b71d1e452f15b296f73d8)
1# Copyright (c) 1992, 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
30PFOBJS = sh_policy.o
31
32HDDEP = sh.o sh.dir.o sh.dol.o sh.err.o sh.exec.o sh.exp.o sh.file.o \
33	sh.func.o sh.glob.o sh.hist.o sh.init.o sh.lex.o sh.misc.o \
34	sh.parse.o sh.proc.o sh.sem.o sh.set.o sh.time.o
35
36COMMONOBJS=	printf.o sh.char.o sh.dir.o sh.dol.o sh.err.o \
37	sh.exec.o sh.exp.o sh.file.o sh.func.o sh.glob.o sh.hist.o sh.init.o \
38	sh.lex.o sh.misc.o sh.parse.o sh.print.o sh.proc.o sh.sem.o sh.set.o \
39	sh.time.o sh.tchar.o sh.tconst.o sh.o \
40        wait3.o
41
42LOCALOBJS= signal.o
43
44COMMONSRCS=	$(COMMONOBJS:%.o=../%.c)
45
46.KEEP_STATE:
47
48.PARALLEL: $(COMMONOBJS) $(LOCALOBJS)
49
50all: $(PROG)
51
52# build rule for common source above
53%.o:	../%.c
54	$(COMPILE.c) $<
55	$(POST_PROCESS_O)
56
57%.o:	../../sh/%.c
58	$(COMPILE.c) $<
59	$(POST_PROCESS_O)
60
61$(CSH_PROG): $(COMMONOBJS) $(LOCALOBJS) $(MAPFILES)
62	$(LINK.c) $(COMMONOBJS) $(LOCALOBJS) -o $@ $(LDLIBS)
63	$(POST_PROCESS)
64
65$(HDDEP): ../sh.tconst.h
66
67install: all $(ROOTBINPROG)  $(ROOTPROG)
68
69lint:	../sh.tconst.h
70	$(LINT.c) $(COMMONSRCS) signal.c $(LDLIBS)
71
72clean:
73	$(RM) $(LOCALOBJS) $(COMMONOBJS)
74
75clobber:	clean
76	$(RM)  $(PROG)
77