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