xref: /titanic_50/usr/src/cmd/sh/Makefile (revision 29e83d4b25fd82feb8e0e0fbe89f7e2a8438533d)
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 2007 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%)
52LAZYLIBS = $(ZLAZYLOAD) -lgen -lsecdb $(ZNOLAZYLOAD)
53lint := LAZYLIBS = -lgen -lsecdb
54LDLIBS += $(LAZYLIBS)
55GROUP =	root
56
57.KEEP_STATE:
58
59.PARALLEL:	$(OBJS)
60
61all: $(ROOTFS_PROG)
62
63$(PROG): $(OBJS) $(MAPFILES)
64	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
65	$(POST_PROCESS)
66
67$(POFILE): $(POFILES)
68	$(RM) $@
69	$(CAT)     $(POFILES) > $@
70
71install: all $(ROOTSBINPROG)
72	$(RM) $(ROOTSBIN)/jsh
73	$(SYMLINK) sh $(ROOTSBIN)/jsh
74	$(RM) $(ROOTSBIN)/pfsh
75	$(SYMLINK) sh $(ROOTSBIN)/pfsh
76	$(RM) $(ROOTBIN)/sh
77	$(SYMLINK) ../../sbin/sh $(ROOTBIN)/sh
78	$(RM) $(ROOTBIN)/jsh
79	$(SYMLINK) ../../sbin/sh $(ROOTBIN)/jsh
80	$(RM) $(ROOTBIN)/pfsh
81	$(SYMLINK) ../../sbin/sh $(ROOTBIN)/pfsh
82	$(RM) $(ROOTLIB)/rsh
83	$(SYMLINK) ../../sbin/sh $(ROOTLIB)/rsh
84
85clean:
86	$(RM) $(OBJS)
87
88lint: lint_SRCS
89
90include ../Makefile.targ
91