10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21
22 #
23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2012 by Delphix. All rights reserved.
25 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
26 # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
27 # Copyright 2015 Gary Mills
28 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
29 # Copyright 2016 Toomas Soome <tsoome@me.com>
30 #
31
32 #
33 # Makefile.master, global definitions for system source
34 #
35 ROOT= /proto
36
37 #
38 # Adjunct root, containing an additional proto area to be used for headers
39 # and libraries.
40 #
41 ADJUNCT_PROTO=
42
43 #
44 # Adjunct for building things that run on the build machine.
45 #
46 NATIVE_ADJUNCT= /usr
47
48 #
49 # RELEASE_BUILD should be cleared for final release builds.
82 # The variables below control the compilers used during the build.
83 # There are a number of permutations.
84 #
85 # __GNUC and __SUNC control (and indicate) the primary compiler. Whichever
86 # one is not POUND_SIGN is the primary, with the other as the shadow. They
87 # may also be used to control entirely compiler-specific Makefile assignments.
88 # __GNUC and GCC are the default.
89 #
90 # __GNUC64 indicates that the 64bit build should use the GNU C compiler.
91 # There is no Sun C analogue.
92 #
93 # The following version-specific options are operative regardless of which
94 # compiler is primary, and control the versions of the given compilers to be
95 # used. They also allow compiler-version specific Makefile fragments.
96 #
97
98 __SUNC= $(POUND_SIGN)
99 $(__SUNC)__GNUC= $(POUND_SIGN)
100 __GNUC64= $(__GNUC)
101
102 # Allow build-time "configuration" to enable or disable some things.
103 # The default is POUND_SIGN, meaning "not enabled". If the environment
104 # passes in an override like ENABLE_SMB_PRINTING= (empty) that will
105 # uncomment things in the lower Makefiles to enable the feature.
106 ENABLE_SMB_PRINTING= $(POUND_SIGN)
107
108 # CLOSED is the root of the tree that contains source which isn't released
109 # as open source
110 CLOSED= $(SRC)/../closed
111
112 # BUILD_TOOLS is the root of all tools including compilers.
113 # ONBLD_TOOLS is the root of all the tools that are part of SUNWonbld.
114
115 BUILD_TOOLS= /ws/onnv-tools
116 ONBLD_TOOLS= $(BUILD_TOOLS)/onbld
117
118 # define runtime JAVA_HOME, primarily for cmd/pools/poold
119 JAVA_HOME= /usr/java
120 # define buildtime JAVA_ROOT
121 JAVA_ROOT= /usr/java
655 $(__GNUC64)MAPFILE.NGB_sparcv9= \
656 $(SRC)/common/mapfiles/gen/sparcv9_gcc_map.noexeglobs
657 MAPFILE.NGB_i386= $(SRC)/common/mapfiles/gen/i386_cc_map.noexeglobs
658 $(__GNUC64)MAPFILE.NGB_i386= \
659 $(SRC)/common/mapfiles/gen/i386_gcc_map.noexeglobs
660 MAPFILE.NGB_amd64= $(SRC)/common/mapfiles/gen/amd64_cc_map.noexeglobs
661 $(__GNUC64)MAPFILE.NGB_amd64= \
662 $(SRC)/common/mapfiles/gen/amd64_gcc_map.noexeglobs
663 MAPFILE.NGB = $(MAPFILE.NGB_$(MACH))
664
665 #
666 # A generic interface mapfile name, used by various dynamic objects to define
667 # the interfaces and interposers the object must export.
668 #
669 MAPFILE.INT = mapfile-intf
670
671 #
672 # LDLIBS32 and LDLIBS64 can be set in the environment to override the following
673 # assignments.
674 #
675 # These environment settings make sure that no libraries are searched outside
676 # of the local workspace proto area:
677 # LDLIBS32=-YP,$ROOT/lib:$ROOT/usr/lib
678 # LDLIBS64=-YP,$ROOT/lib/$MACH64:$ROOT/usr/lib/$MACH64
679 #
680 LDLIBS32 = $(ENVLDLIBS1) $(ENVLDLIBS2) $(ENVLDLIBS3)
681 LDLIBS32 += $(ADJUNCT_PROTO:%=-L%/usr/lib -L%/lib)
682 LDLIBS.cmd = $(LDLIBS32)
683 LDLIBS.lib = $(LDLIBS32)
684
685 LDLIBS64 = $(ENVLDLIBS1:%=%/$(MACH64)) \
686 $(ENVLDLIBS2:%=%/$(MACH64)) \
687 $(ENVLDLIBS3:%=%/$(MACH64))
688 LDLIBS64 += $(ADJUNCT_PROTO:%=-L%/usr/lib/$(MACH64) -L%/lib/$(MACH64))
689
690 #
691 # Define compilation macros.
692 #
693 COMPILE.c= $(CC) $(CFLAGS) $(CPPFLAGS) -c
694 COMPILE64.c= $(CC) $(CFLAGS64) $(CPPFLAGS) -c
695 COMPILE.cc= $(CCC) $(CCFLAGS) $(CPPFLAGS) -c
696 COMPILE64.cc= $(CCC) $(CCFLAGS64) $(CPPFLAGS) -c
697 COMPILE.s= $(AS) $(ASFLAGS) $(AS_CPPFLAGS)
698 COMPILE64.s= $(AS) $(ASFLAGS) $($(MACH64)_AS_XARCH) $(AS_CPPFLAGS)
699 COMPILE.d= $(DTRACE) -G -32
700 COMPILE64.d= $(DTRACE) -G -64
701 COMPILE.b= $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
702 COMPILE64.b= $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
703
704 CLASSPATH= .
705 COMPILE.java= $(JAVAC) $(JAVAFLAGS) -classpath $(CLASSPATH)
706
707 #
708 # Link time macros
709 #
710 CCNEEDED = -lC
856 ZDIRECT= -zdirect
857 ZIGNORE= -zignore
858 ZINITFIRST= -zinitfirst
859 ZINTERPOSE= -zinterpose
860 ZLAZYLOAD= -zlazyload
861 ZLOADFLTR= -zloadfltr
862 ZMULDEFS= -zmuldefs
863 ZNODEFAULTLIB= -znodefaultlib
864 ZNODEFS= -znodefs
865 ZNODELETE= -znodelete
866 ZNODLOPEN= -znodlopen
867 ZNODUMP= -znodump
868 ZNOLAZYLOAD= -znolazyload
869 ZNOLDYNSYM= -znoldynsym
870 ZNORELOC= -znoreloc
871 ZNOVERSION= -znoversion
872 ZRECORD= -zrecord
873 ZREDLOCSYM= -zredlocsym
874 ZTEXT= -ztext
875 ZVERBOSE= -zverbose
876
877 GSHARED= -G
878 CCMT= -mt
879
880 # Handle different PIC models on different ISAs
881 # (May be overridden by lower-level Makefiles)
882
883 sparc_C_PICFLAGS = -K pic
884 sparcv9_C_PICFLAGS = -K pic
885 i386_C_PICFLAGS = -K pic
886 amd64_C_PICFLAGS = -K pic
887 C_PICFLAGS = $($(MACH)_C_PICFLAGS)
888 C_PICFLAGS64 = $($(MACH64)_C_PICFLAGS)
889
890 sparc_C_BIGPICFLAGS = -K PIC
891 sparcv9_C_BIGPICFLAGS = -K PIC
892 i386_C_BIGPICFLAGS = -K PIC
893 amd64_C_BIGPICFLAGS = -K PIC
894 C_BIGPICFLAGS = $($(MACH)_C_BIGPICFLAGS)
895 C_BIGPICFLAGS64 = $($(MACH64)_C_BIGPICFLAGS)
|
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21
22 #
23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2012 by Delphix. All rights reserved.
25 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
26 # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
27 # Copyright 2015 Gary Mills
28 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
29 # Copyright 2016 Toomas Soome <tsoome@me.com>
30 # Copyright 2017 RackTop Systems.
31 #
32
33 #
34 # Makefile.master, global definitions for system source
35 #
36 ROOT= /proto
37
38 #
39 # Adjunct root, containing an additional proto area to be used for headers
40 # and libraries.
41 #
42 ADJUNCT_PROTO=
43
44 #
45 # Adjunct for building things that run on the build machine.
46 #
47 NATIVE_ADJUNCT= /usr
48
49 #
50 # RELEASE_BUILD should be cleared for final release builds.
83 # The variables below control the compilers used during the build.
84 # There are a number of permutations.
85 #
86 # __GNUC and __SUNC control (and indicate) the primary compiler. Whichever
87 # one is not POUND_SIGN is the primary, with the other as the shadow. They
88 # may also be used to control entirely compiler-specific Makefile assignments.
89 # __GNUC and GCC are the default.
90 #
91 # __GNUC64 indicates that the 64bit build should use the GNU C compiler.
92 # There is no Sun C analogue.
93 #
94 # The following version-specific options are operative regardless of which
95 # compiler is primary, and control the versions of the given compilers to be
96 # used. They also allow compiler-version specific Makefile fragments.
97 #
98
99 __SUNC= $(POUND_SIGN)
100 $(__SUNC)__GNUC= $(POUND_SIGN)
101 __GNUC64= $(__GNUC)
102
103 # If ADJUNCT_PROTO was set we set ADJUNCT_PROTO_NOT_SET to POUND_SIGN so
104 # we can use it to turn off the -zassert-deflib exceptions that allow
105 # linking against host libraries.
106 ADJUNCT_PROTO_NOT_SET= $(ADJUNCT_PROTO:%=$(POUND_SIGN))
107 $(ADJUNCT_PROTO_NOT_SET)ADJUNCT_PROTO_SET= $(POUND_SIGN)
108
109 # Allow build-time "configuration" to enable or disable some things.
110 # The default is POUND_SIGN, meaning "not enabled". If the environment
111 # passes in an override like ENABLE_SMB_PRINTING= (empty) that will
112 # uncomment things in the lower Makefiles to enable the feature.
113 ENABLE_SMB_PRINTING= $(POUND_SIGN)
114
115 # CLOSED is the root of the tree that contains source which isn't released
116 # as open source
117 CLOSED= $(SRC)/../closed
118
119 # BUILD_TOOLS is the root of all tools including compilers.
120 # ONBLD_TOOLS is the root of all the tools that are part of SUNWonbld.
121
122 BUILD_TOOLS= /ws/onnv-tools
123 ONBLD_TOOLS= $(BUILD_TOOLS)/onbld
124
125 # define runtime JAVA_HOME, primarily for cmd/pools/poold
126 JAVA_HOME= /usr/java
127 # define buildtime JAVA_ROOT
128 JAVA_ROOT= /usr/java
662 $(__GNUC64)MAPFILE.NGB_sparcv9= \
663 $(SRC)/common/mapfiles/gen/sparcv9_gcc_map.noexeglobs
664 MAPFILE.NGB_i386= $(SRC)/common/mapfiles/gen/i386_cc_map.noexeglobs
665 $(__GNUC64)MAPFILE.NGB_i386= \
666 $(SRC)/common/mapfiles/gen/i386_gcc_map.noexeglobs
667 MAPFILE.NGB_amd64= $(SRC)/common/mapfiles/gen/amd64_cc_map.noexeglobs
668 $(__GNUC64)MAPFILE.NGB_amd64= \
669 $(SRC)/common/mapfiles/gen/amd64_gcc_map.noexeglobs
670 MAPFILE.NGB = $(MAPFILE.NGB_$(MACH))
671
672 #
673 # A generic interface mapfile name, used by various dynamic objects to define
674 # the interfaces and interposers the object must export.
675 #
676 MAPFILE.INT = mapfile-intf
677
678 #
679 # LDLIBS32 and LDLIBS64 can be set in the environment to override the following
680 # assignments.
681 #
682 LDLIBS32 = $(ENVLDLIBS1) $(ENVLDLIBS2) $(ENVLDLIBS3)
683 LDLIBS32 += $(ADJUNCT_PROTO:%=-L%/usr/lib -L%/lib)
684 LDLIBS.cmd = $(LDLIBS32)
685 LDLIBS.lib = $(LDLIBS32)
686
687 LDLIBS64 = $(ENVLDLIBS1:%=%/$(MACH64)) \
688 $(ENVLDLIBS2:%=%/$(MACH64)) \
689 $(ENVLDLIBS3:%=%/$(MACH64))
690 LDLIBS64 += $(ADJUNCT_PROTO:%=-L%/usr/lib/$(MACH64) -L%/lib/$(MACH64))
691
692 #
693 # Defines to be used when overriding the default search path with -YP.
694 #
695 DEFLDPATH = /lib:/usr/lib
696 DEFLDPATH64 = /lib/64:/usr/lib/64
697
698 #
699 # Define compilation macros.
700 #
701 COMPILE.c= $(CC) $(CFLAGS) $(CPPFLAGS) -c
702 COMPILE64.c= $(CC) $(CFLAGS64) $(CPPFLAGS) -c
703 COMPILE.cc= $(CCC) $(CCFLAGS) $(CPPFLAGS) -c
704 COMPILE64.cc= $(CCC) $(CCFLAGS64) $(CPPFLAGS) -c
705 COMPILE.s= $(AS) $(ASFLAGS) $(AS_CPPFLAGS)
706 COMPILE64.s= $(AS) $(ASFLAGS) $($(MACH64)_AS_XARCH) $(AS_CPPFLAGS)
707 COMPILE.d= $(DTRACE) -G -32
708 COMPILE64.d= $(DTRACE) -G -64
709 COMPILE.b= $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
710 COMPILE64.b= $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
711
712 CLASSPATH= .
713 COMPILE.java= $(JAVAC) $(JAVAFLAGS) -classpath $(CLASSPATH)
714
715 #
716 # Link time macros
717 #
718 CCNEEDED = -lC
864 ZDIRECT= -zdirect
865 ZIGNORE= -zignore
866 ZINITFIRST= -zinitfirst
867 ZINTERPOSE= -zinterpose
868 ZLAZYLOAD= -zlazyload
869 ZLOADFLTR= -zloadfltr
870 ZMULDEFS= -zmuldefs
871 ZNODEFAULTLIB= -znodefaultlib
872 ZNODEFS= -znodefs
873 ZNODELETE= -znodelete
874 ZNODLOPEN= -znodlopen
875 ZNODUMP= -znodump
876 ZNOLAZYLOAD= -znolazyload
877 ZNOLDYNSYM= -znoldynsym
878 ZNORELOC= -znoreloc
879 ZNOVERSION= -znoversion
880 ZRECORD= -zrecord
881 ZREDLOCSYM= -zredlocsym
882 ZTEXT= -ztext
883 ZVERBOSE= -zverbose
884 ZASSERTDEFLIB= -zassert-deflib
885
886 GSHARED= -G
887 CCMT= -mt
888
889 # Handle different PIC models on different ISAs
890 # (May be overridden by lower-level Makefiles)
891
892 sparc_C_PICFLAGS = -K pic
893 sparcv9_C_PICFLAGS = -K pic
894 i386_C_PICFLAGS = -K pic
895 amd64_C_PICFLAGS = -K pic
896 C_PICFLAGS = $($(MACH)_C_PICFLAGS)
897 C_PICFLAGS64 = $($(MACH64)_C_PICFLAGS)
898
899 sparc_C_BIGPICFLAGS = -K PIC
900 sparcv9_C_BIGPICFLAGS = -K PIC
901 i386_C_BIGPICFLAGS = -K PIC
902 amd64_C_BIGPICFLAGS = -K PIC
903 C_BIGPICFLAGS = $($(MACH)_C_BIGPICFLAGS)
904 C_BIGPICFLAGS64 = $($(MACH64)_C_BIGPICFLAGS)
|