xref: /titanic_51/usr/src/cmd/sh/Makefile (revision dcda19f50b2b80bfc622fff718ac04fb0e1cb670)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28PROG =		sh
29ROOTFS_PROG =	$(PROG)
30
31OBJS=	args.o blok.o cmd.o defs.o error.o fault.o hash.o hashserv.o \
32	io.o msg.o print.o stak.o string.o word.o xec.o \
33	ctype.o echo.o expand.o func.o macro.o pwd.o setbrk.o test.o \
34	bltin.o jobs.o ulimit.o sh_policy.o main.o name.o service.o
35SRCS=	$(OBJS:%.o=%.c)
36
37include ../Makefile.cmd
38
39# This flag is being added only for SCO (x86) compatibility
40CFLAGS += $(iBCS2FLAG)
41
42#
43# for message cataloge
44#
45POFILE= sh.po
46POFILES= $(SRCS:%.c=%.po)
47XGETFLAGS += -a -x sh.xcl
48
49CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DACCT
50MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
51LDFLAGS += $(MAPFILES:%=-M%)
52LDLIBS += -lgen -lsecdb
53GROUP =	root
54
55.KEEP_STATE:
56
57.PARALLEL:	$(OBJS)
58
59all: $(ROOTFS_PROG)
60
61$(PROG): $(OBJS) $(MAPFILES)
62	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
63	$(POST_PROCESS)
64
65$(POFILE): $(POFILES)
66	$(RM) $@
67	$(CAT)     $(POFILES) > $@
68
69install: all $(ROOTSBINPROG)
70	$(RM) $(ROOTSBIN)/jsh
71	$(SYMLINK) sh $(ROOTSBIN)/jsh
72	$(RM) $(ROOTSBIN)/pfsh
73	$(SYMLINK) sh $(ROOTSBIN)/pfsh
74	$(RM) $(ROOTBIN)/sh
75	$(SYMLINK) ../../sbin/sh $(ROOTBIN)/sh
76	$(RM) $(ROOTBIN)/jsh
77	$(SYMLINK) ../../sbin/sh $(ROOTBIN)/jsh
78	$(RM) $(ROOTBIN)/pfsh
79	$(SYMLINK) ../../sbin/sh $(ROOTBIN)/pfsh
80	$(RM) $(ROOTLIB)/rsh
81	$(SYMLINK) ../../sbin/sh $(ROOTLIB)/rsh
82
83clean:
84	$(RM) $(OBJS)
85
86lint: lint_SRCS
87
88include ../Makefile.targ
89