tools/Makefile
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 08 Jul 2013 17:52:57 -0700
changeset 1383 41b331c5dc97
parent 1352 1358a1e1ff4c
child 1394 5f86498eee95
permissions -rw-r--r--
Close of build 26.
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
#
1188
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    21
# Copyright (c) 2010, 2013, 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 \
1188
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
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
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    33
links:
1188
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    34
	@$(MKDIR) parfait
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    35
	@for i in cc CC gcc g++ ld ; do \
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    36
		$(MKDIR) parfait ; \
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    37
		$(RM) parfait/$$i ; \
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    38
		echo "#!/bin/ksh" > parfait/$$i ; \
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    39
		echo "IFS=" >> parfait/$$i ; \
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    40
		echo "export PARFAIT_NATIVESUNCC=$(SPRO_VROOT)/bin/cc" >> parfait/$$i ; \
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    41
		echo "export PARFAIT_NATIVESUNCXX=$(SPRO_VROOT)/bin/CC" >> parfait/$$i ; \
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    42
		echo "export PARFAIT_NATIVEGCC=$(GCC_ROOT)/bin/gcc" >> parfait/$$i ; \
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    43
		echo "export PARFAIT_NATIVEGXX=$(GCC_ROOT)/bin/g++" >> parfait/$$i ; \
1352
1358a1e1ff4c 16921386 move to parfait 1.2.0.1
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 1188
diff changeset
    44
		echo "export PARFAIT_NATIVELD=/usr/bin/ld" >> parfait/$$i ; \
1358a1e1ff4c 16921386 move to parfait 1.2.0.1
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 1188
diff changeset
    45
		echo "exec" $(PARFAIT_ROOT)/$(MACH)/parfait-$$i '$$*' >> parfait/$$i ; \
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    46
		chmod +x parfait/$$i ; \
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    47
	done
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    48
1188
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    49
pkglint:
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    50
	@rm -f pkglint
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    51
	@sed -e "s,WS_TOP_XXX,$(WS_TOP)/$(MACH)," \
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    52
	    < pkglint.sh \
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    53
	    > pkglint
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    54
	@chmod +x pkglint
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    55
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    56
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    57
time-$(MACH64).o:			BITS=64
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    58
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
    59
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    60
time-$(MACH32).o time-$(MACH64).o:	time.c
1188
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    61
	@$(CC) $(CFLAGS) -c -o [email protected] $<
9
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    62
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    63
time-%.so:	time-%.o
1188
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    64
	@$(LD) -G -o [email protected] $<
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    65
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    66
clean:
1188
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    67
	@$(RM) time-*.o time*.bc
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    68
	@$(RM) pkglint
16
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
clobber:	clean
1188
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    71
	@$(RM) time-*.so python/pkglint/*.pyc
d563dccb5adb 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 975
diff changeset
    72
	@$(RM) -r parfait
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    73