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