tools/Makefile
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Wed, 18 Dec 2013 10:04:53 -0800
branchs11-update
changeset 2855 576d5a7857b7
parent 774 d0cbca26a17c
child 2914 4f1967424876
permissions -rw-r--r--
16404201 serialize pkglinting of components 16666374 userland misses opensolaris.org very much, but must move on to java.net's love 16703472 more userland components could benefit from resolve.deps files 16921386 move to parfait 1.2.0.1 16991973 some things ain't parfait'n 17361780 LD_Z_TEXT should, ya know, contain -z text not -z direct 17389915 default userland gcc should be gcc4 17621943 move to build 32 breaks userland-incorporation 17785723 gdb shouldn't override CC/CXX 17852021 userland-incorporator should detect duplicate packages 17899000 libtool doesn't build properly in non-C locale
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
#
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
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 \
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
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    33
links:
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    34
	@$(MKDIR) $(PARFAIT_TOOLS)
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 \
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    36
		$(RM) $(PARFAIT_TOOLS)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    37
		echo "#!/bin/ksh" > $(PARFAIT_TOOLS)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    38
		echo "IFS=" >> $(PARFAIT_TOOLS)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    39
		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
    40
		echo "export PARFAIT_NATIVESUNCXX=$(SPRO_VROOT)/bin/CC" >> $(PARFAIT_TOOLS)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    41
		echo "export PARFAIT_NATIVEGCC=$(GCC_ROOT)/bin/gcc" >> $(PARFAIT_TOOLS)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    42
		echo "export PARFAIT_NATIVEGXX=$(GCC_ROOT)/bin/g++" >> $(PARFAIT_TOOLS)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    43
		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
    44
		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
    45
		chmod +x $(PARFAIT_TOOLS)/$$i ; \
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    46
	done
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    47
	@$(MKDIR) $(PARFAIT_TOOLS_GCC3)
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    48
	@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
    49
		$(RM) $(PARFAIT_TOOLS_GCC3)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    50
		sed \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    51
		    -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
    52
		    > $(PARFAIT_TOOLS_GCC3)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    53
		chmod +x $(PARFAIT_TOOLS_GCC3)/$$i ; \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    54
	done
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    55
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    56
pkglint:
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    57
	@rm -f pkglint
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    58
	@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
    59
	    < pkglint.sh \
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    60
	    > pkglint
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    61
	@chmod +x pkglint
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 16
diff changeset
    62
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    63
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    64
time-$(MACH64).o:			BITS=64
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    65
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
    66
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    67
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
    68
	@$(CC) $(CFLAGS) -c -o [email protected] $<
9
97fb557d9979 lcms download link has changed
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
diff changeset
    69
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    70
time-%.so:	time-%.o
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    71
	@$(LD) -G -o [email protected] $<
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    72
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    73
clean:
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    74
	@$(RM) time-*.o time*.bc
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    75
	@$(RM) pkglint
16
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    76
33aaaec59991 update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 9
diff changeset
    77
clobber:	clean
2855
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    78
	@$(RM) time-*.so python/pkglint/*.pyc
576d5a7857b7 16404201 serialize pkglinting of components
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    79
	@$(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
    80