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