Makefile revision 24da5b34f49324ed742a340010ed5bd3d4e06625
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# CDDL HEADER START
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# The contents of this file are subject to the terms of the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Common Development and Distribution License (the "License").
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# You may not use this file except in compliance with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# or http://www.opensolaris.org/os/licensing.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# See the License for the specific language governing permissions
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# When distributing Covered Code, include this CDDL HEADER in each
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# If applicable, add the following below this CDDL HEADER, with the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# fields enclosed by brackets "[]" replaced with your own identifying
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# information: Portions Copyright [yyyy] [name of copyright owner]
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# CDDL HEADER END
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Use is subject to license terms.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# ident "%Z%%M% %I% %E% SMI"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterPROG = sh
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterROOTFS_PROG = $(PROG)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterOBJS= args.o blok.o cmd.o defs.o error.o fault.o hash.o hashserv.o \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster io.o msg.o print.o stak.o string.o word.o xec.o \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster ctype.o echo.o expand.o func.o macro.o pwd.o setbrk.o test.o \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster bltin.o jobs.o ulimit.o sh_policy.o main.o name.o service.o
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterSRCS= $(OBJS:%.o=%.c)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterinclude ../Makefile.cmd
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# This flag is being added only for SCO (x86) compatibility
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterCFLAGS += $(iBCS2FLAG)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# for message cataloge
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterPOFILE= sh.po
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterPOFILES= $(SRCS:%.c=%.po)
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterXGETFLAGS += -a -x sh.xcl
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterCPPFLAGS += -D_FILE_OFFSET_BITS=64 -DACCT
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterMAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterLDFLAGS += $(MAPFILES:%=-M%)
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterLAZYLIBS = $(ZLAZYLOAD) -lgen -lsecdb $(ZNOLAZYLOAD)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterlint := LAZYLIBS = -lgen -lsecdb
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterLDLIBS += $(LAZYLIBS)
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterGROUP = root
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster.KEEP_STATE:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster.PARALLEL: $(OBJS)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterall: $(ROOTFS_PROG)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster$(PROG): $(OBJS) $(MAPFILES)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(POST_PROCESS)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster$(POFILE): $(POFILES)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(RM) $@
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(CAT) $(POFILES) > $@
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterinstall: all $(ROOTSBINPROG)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(RM) $(ROOTSBIN)/jsh
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(SYMLINK) sh $(ROOTSBIN)/jsh
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(RM) $(ROOTSBIN)/pfsh
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(SYMLINK) sh $(ROOTSBIN)/pfsh
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(RM) $(ROOTBIN)/sh
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(SYMLINK) ../../sbin/sh $(ROOTBIN)/sh
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(RM) $(ROOTBIN)/jsh
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(SYMLINK) ../../sbin/sh $(ROOTBIN)/jsh
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(RM) $(ROOTBIN)/pfsh
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(SYMLINK) ../../sbin/sh $(ROOTBIN)/pfsh
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(RM) $(ROOTLIB)/rsh
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(SYMLINK) ../../sbin/sh $(ROOTLIB)/rsh
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterclean:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(RM) $(OBJS)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterlint: lint_SRCS
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterinclude ../Makefile.targ
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster