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