Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
98N/A#
98N/A# CDDL HEADER START
98N/A#
98N/A# The contents of this file are subject to the terms of the
1124N/A# Common Development and Distribution License (the "License").
98N/A# You may not use this file except in compliance with the License.
98N/A#
919N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
919N/A# or http://www.opensolaris.org/os/licensing.
919N/A# See the License for the specific language governing permissions
919N/A# and limitations under the License.
919N/A#
919N/A# When distributing Covered Code, include this CDDL HEADER in each
919N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
919N/A# If applicable, add the following below this CDDL HEADER, with the
919N/A# fields enclosed by brackets "[]" replaced with your own identifying
919N/A# information: Portions Copyright [yyyy] [name of copyright owner]
919N/A#
919N/A# CDDL HEADER END
919N/A#
919N/A
919N/A#
919N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
919N/A# Use is subject to license terms.
98N/A#
98N/A
98N/ASHELL=/usr/bin/ksh93
98N/A
493N/Ainclude ../Makefile.cmd
98N/A$(SPARC_BLD)include ../Makefile.cmd.64
98N/A
1156N/A.KEEP_STATE:
98N/A
911N/A# Set common AST build flags (e.g., needed to support the math stuff).
1156N/Ainclude ../../Makefile.ast
1156N/A
911N/AOBJECTS= \
98N/A shcomp.o
1178N/A
1178N/ALIBSHELLMACH=$(MACH)
1124N/ALIBSHELLBASE=../../lib/libshell
817N/ALIBSHELLSRC=$(LIBSHELLBASE)/common/sh
98N/A
98N/ASRCS= $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c)
493N/A
98N/ALDLIBS += -lshell -last
98N/A
493N/A# 1. Make sure that the -D/-U defines in CFLAGS below are in sync
98N/A# with usr/src/lib/libshell/Makefile.com
910N/A# 2. We use "=" here since using $(CPPFLAGS.master) is very tricky in our
910N/A# case - it MUST come as the last element but future changes in -D options
910N/A# may then cause silent breakage in the AST sources because the last -D
98N/A# option specified overrides previous -D options so we prefer the current
98N/A# way to explicitly list each single flag.
998N/ACPPFLAGS = \
998N/A $(DTEXTDOM) $(DTS_ERRNO) \
998N/A $(LIBSHELLCPPFLAGS)
998N/A
998N/ACFLAGS += \
98N/A $(ASTCFLAGS)
998N/ACFLAGS64 += \
998N/A $(ASTCFLAGS64)
998N/A
CERRWARN += -_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 lint:
include ../Makefile.targ