Makefile revision 6047
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee#
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# CDDL HEADER START
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee#
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# The contents of this file are subject to the terms of the
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# Common Development and Distribution License (the "License").
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# You may not use this file except in compliance with the License.
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee#
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# or http://www.opensolaris.org/os/licensing.
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# See the License for the specific language governing permissions
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# and limitations under the License.
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee#
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# When distributing Covered Code, include this CDDL HEADER in each
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# If applicable, add the following below this CDDL HEADER, with the
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# fields enclosed by brackets "[]" replaced with your own identifying
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# information: Portions Copyright [yyyy] [name of copyright owner]
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee#
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# CDDL HEADER END
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee#
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee#
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee#
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlcleeinclude ../make-rules/shared-macros.mk
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlcleedownload setup prep build install publish \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlcleevalidate: links pkglint time-$(MACH32).so time-$(MACH64).so
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# generate wrappers for parfait. we need to generate them
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# with the correct compiler variables from the common makefiles because
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# some things reset the environment which causes lovely infinite
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee# loops
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlcleelinks:
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee @$(MKDIR) $(PARFAIT_TOOLS)
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee @for i in cc CC gcc g++ ld ; do \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee $(RM) $(PARFAIT_TOOLS)/$$i ; \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee echo "#!/bin/ksh" > $(PARFAIT_TOOLS)/$$i ; \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee echo "IFS=" >> $(PARFAIT_TOOLS)/$$i ; \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee echo "export PARFAIT_NATIVESUNCC=$(SPRO_VROOT)/bin/cc" >> $(PARFAIT_TOOLS)/$$i ; \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee echo "export PARFAIT_NATIVESUNCXX=$(SPRO_VROOT)/bin/CC" >> $(PARFAIT_TOOLS)/$$i ; \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee echo "export PARFAIT_NATIVEGCC=$(GCC_ROOT)/bin/gcc" >> $(PARFAIT_TOOLS)/$$i ; \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee echo "export PARFAIT_NATIVEGXX=$(GCC_ROOT)/bin/g++" >> $(PARFAIT_TOOLS)/$$i ; \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee echo "export PARFAIT_NATIVELD=/usr/bin/ld" >> $(PARFAIT_TOOLS)/$$i ; \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee echo "exec" $(PARFAIT_ROOT)/$(MACH)/parfait-$$i '$$*' >> $(PARFAIT_TOOLS)/$$i ; \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee chmod +x $(PARFAIT_TOOLS)/$$i ; \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee done
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlcleepkglint:
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee @rm -f pkglint
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee @sed -e "s,WS_TOP_XXX,$(WS_TOP)/$(MACH)," \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee < pkglint.sh \
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee > pkglint
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee @chmod +x pkglint
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlcleetime-$(MACH64).o: BITS=64
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlcleetime-$(MACH32).o time-$(MACH64).o: CFLAGS += -Kpic
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlcleetime-$(MACH32).o time-$(MACH64).o: time.c
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee @$(CC) $(CFLAGS) -c -o $@ $<
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlcleetime-%.so: time-%.o
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee @$(LD) -G -o $@ $<
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlcleeclean:
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee @$(RM) time-*.o time*.bc
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee @$(RM) pkglint
3ccda6479cf240cd732ac4b7a8a82fcc1716496dlclee
clobber: clean
@$(RM) time-*.so python/pkglint/*.pyc
@$(RM) -r $(PARFAIT_TOOLS) $(MACH)