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