tools/Makefile
author Jan Kohoutek <Jan.Kohoutek@Oracle.COM>
Thu, 19 Mar 2015 03:17:48 -0700
branchs11u2-sru
changeset 3972 8ac0f2a51fb0
parent 2914 4f1967424876
child 3464 57f7ad288af9
permissions -rw-r--r--
ips-buildinfo.mk
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     1
#
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     2
# CDDL HEADER START
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     3
#
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     7
#
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    11
# and limitations under the License.
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    12
#
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    18
#
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    19
# CDDL HEADER END
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    20
#
2914
4f1967424876 18065425 parfait gcc wrappers should force gcc3 for now
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 2855
diff changeset
    21
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
9
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    22
#
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    23
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    24
include ../make-rules/shared-macros.mk
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    25
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    26
download setup prep build install publish \
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    27
validate:	links pkglint time-$(MACH32).so time-$(MACH64).so
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    28
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    29
# generate wrappers for parfait. we need to generate them
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    30
# with the correct compiler variables from the common makefiles because
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    31
# some things reset the environment which causes lovely infinite
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    32
# loops
2914
4f1967424876 18065425 parfait gcc wrappers should force gcc3 for now
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 2855
diff changeset
    33
#
4f1967424876 18065425 parfait gcc wrappers should force gcc3 for now
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 2855
diff changeset
    34
# currently, parfait doesn't support gcc4.7+, so we force the use
4f1967424876 18065425 parfait gcc wrappers should force gcc3 for now
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 2855
diff changeset
    35
# of gcc3 in both sets of wrappers.
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    36
links:
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    37
	@$(MKDIR) $(PARFAIT_TOOLS)
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    38
	@for i in cc CC gcc g++ ld ; do \
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    39
		$(RM) $(PARFAIT_TOOLS)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    40
		echo "#!/bin/ksh" > $(PARFAIT_TOOLS)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    41
		echo "IFS=" >> $(PARFAIT_TOOLS)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    42
		echo "export PARFAIT_NATIVESUNCC=$(SPRO_VROOT)/bin/cc" >> $(PARFAIT_TOOLS)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    43
		echo "export PARFAIT_NATIVESUNCXX=$(SPRO_VROOT)/bin/CC" >> $(PARFAIT_TOOLS)/$$i ; \
2914
4f1967424876 18065425 parfait gcc wrappers should force gcc3 for now
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 2855
diff changeset
    44
		echo "export PARFAIT_NATIVEGCC=$(GCC3_ROOT)/bin/gcc" >> $(PARFAIT_TOOLS)/$$i ; \
4f1967424876 18065425 parfait gcc wrappers should force gcc3 for now
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 2855
diff changeset
    45
		echo "export PARFAIT_NATIVEGXX=$(GCC3_ROOT)/bin/g++" >> $(PARFAIT_TOOLS)/$$i ; \
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    46
		echo "export PARFAIT_NATIVELD=/usr/bin/ld" >> $(PARFAIT_TOOLS)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    47
		echo "exec" $(PARFAIT_ROOT)/$(MACH)/parfait-$$i '$$*' >> $(PARFAIT_TOOLS)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    48
		chmod +x $(PARFAIT_TOOLS)/$$i ; \
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    49
	done
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    50
	@$(MKDIR) $(PARFAIT_TOOLS_GCC3)
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    51
	@for i in cc CC gcc g++ ld ; do \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    52
		$(RM) $(PARFAIT_TOOLS_GCC3)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    53
		sed \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    54
		    -e "s,$(GCC_ROOT),$(GCC3_ROOT)," < $(PARFAIT_TOOLS)/$$i \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    55
		    > $(PARFAIT_TOOLS_GCC3)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    56
		chmod +x $(PARFAIT_TOOLS_GCC3)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    57
	done
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    58
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    59
pkglint:
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    60
	@rm -f pkglint
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    61
	@sed -e "s,WS_TOP_XXX,$(WS_TOP)/$(MACH)," \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    62
	    < pkglint.sh \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    63
	    > pkglint
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    64
	@chmod +x pkglint
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    65
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    66
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    67
time-$(MACH64).o:			BITS=64
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    68
time-$(MACH32).o time-$(MACH64).o:	CFLAGS += -Kpic
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    69
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    70
time-$(MACH32).o time-$(MACH64).o:	time.c
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    71
	@$(CC) $(CFLAGS) -c -o [email protected] $<
9
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    72
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    73
time-%.so:	time-%.o
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    74
	@$(LD) -G -o [email protected] $<
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    75
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    76
clean:
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    77
	@$(RM) time-*.o time*.bc
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    78
	@$(RM) pkglint
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    79
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    80
clobber:	clean
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    81
	@$(RM) time-*.so python/pkglint/*.pyc
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    82
	@$(RM) -r $(PARFAIT_TOOLS) $(PARFAIT_TOOLS_GCC3) $(MACH)
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    83