fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSHELL=/usr/bin/ksh93
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude ../Makefile.cmd
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte$(SPARC_BLD)include ../Makefile.cmd.64
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte.KEEP_STATE:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Set common AST build flags (e.g., needed to support the math stuff).
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude ../../Makefile.ast
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteOBJECTS= \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte shcomp.o
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLIBSHELLMACH=$(MACH)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLIBSHELLBASE=../../lib/libshell
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLIBSHELLSRC=$(LIBSHELLBASE)/common/sh
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSRCS= $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLDLIBS += -lshell -last
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# 1. Make sure that the -D/-U defines in CFLAGS below are in sync
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# with usr/src/lib/libshell/Makefile.com
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# 2. We use "=" here since using $(CPPFLAGS.master) is very tricky in our
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# case - it MUST come as the last element but future changes in -D options
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# may then cause silent breakage in the AST sources because the last -D
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# option specified overrides previous -D options so we prefer the current
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# way to explicitly list each single flag.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCPPFLAGS = \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(DTEXTDOM) $(DTS_ERRNO) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(LIBSHELLCPPFLAGS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCFLAGS += \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(ASTCFLAGS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCFLAGS64 += \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(ASTCFLAGS64)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCERRWARN += -_gcc=-Wno-parentheses
ROOTCMDDIR=$(ROOT)/usr/bin
PROG= shcomp
%.o: $(LIBSHELLSRC)/%.c
$(COMPILE.c) -c -o $@ $<
$(POST_PROCESS_O)
all: $(PROG)
# dummy file since AST/ksh/shcomp doesn't use *.po files
# (and "shcomp" is just a frontend which calls directly into libshell,
# e.g. there are no l10n strings here)
$(PROG).po:
$(RM) $(PROG).po ; \
$(TOUCH) $(PROG).po
install: all $(ROOTCMD)
$(PROG): $(OBJECTS)
$(RM) shcomp
$(LINK.c) $(OBJECTS) -o $@ $(LDLIBS)
$(POST_PROCESS)
clean:
$(RM) $(OBJECTS)
lint:
include ../Makefile.targ