Home | History | Annotate | Download | only in src
      1 #
      2 # CDDL HEADER START
      3 #
      4 # The contents of this file are subject to the terms of the
      5 # Common Development and Distribution License (the License).
      6 # You may not use this file except in compliance with the License.
      7 #
      8 # You can obtain a copy of the license at usr/src/CDDL.txt
      9 # or http://www.opensolaris.org/os/licensing.
     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/CDDL.txt.
     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 2006 Sun Microsystems, Inc.  All rights reserved.
     24 # Use is subject to license terms.
     25 #
     26 # ident	"@(#)Makefile.master.Linux	1.12	08/05/20 SMI"
     27 #
     28 # Makefile.master.Linux
     29 #
     30 # SunCluster/Linux additions to Makefile.master
     31 #
     32 
     33 .KEEP_STATE:
     34 
     35 VERSION=	EUROPA
     36 SOLARIS_CM=	RedHat 4.0 AS
     37 TARGET_ROOT_NAME=$(OSNAME)
     38 
     39 INS.file=       $(RM) $@; $(INS) -m $(FILEMODE) $< $(@D)
     40 INS.dir=        $(INS) -d -m $(DIRMODE) $@
     41 
     42 #
     43 # C compiler mode. Future compilers may change the default on us,
     44 # so force transition mode globally. Lower level makefiles can
     45 # override this by setting CCMODE.
     46 #
     47 CCMODE=
     48 CCMODE64=
     49 
     50 # set this to the secret flag "-Wc,-Qiselect-regsym=0" to disable register
     51 # symbols (used to detect conflicts between objects that use global registers)
     52 # we disable this now for safety, and because genunix doesn't link with
     53 # this feature (the v9 default) enabled.
     54 #
     55 # REGSYM is separate since the C++ driver syntax is different.
     56 CCREGSYM=
     57 CCCREGSYM=
     58 
     59 # generate 32-bit addresses in the v9 kernel. Saves memory.
     60 CCABS32=
     61 
     62 #
     63 # disable the incremental linker
     64 ILDOFF=
     65 
     66 #
     67 # turn warnings into errors (C)
     68 CERRWARN=       -Werror
     69 
     70 #
     71 # turn warnings into errors (C++)
     72 CCERRWARN=      -Werror
     73 
     74 #
     75 # Ignore anachronisms and constant string messages
     76 CCNOCONSTSTRINGS= -fno-const-strings
     77 CCNOANACHRONISMS=
     78 
     79 #
     80 # Set compiler compatibility mode
     81 i386_CC_COMPAT=
     82 
     83 #
     84 # tradeoff time for space (smaller is better)
     85 #
     86 i386_SPACEFLAG	=
     87 
     88 NOINLINEFLAG	= -fno-default-inline
     89 i386_CFLAGS	+= -D_GNU_SOURCE
     90 
     91 #
     92 # Link time macros
     93 #
     94 RUN_PATH_LINK=	-Wl,-rpath-link $(VROOT)/usr/cluster/lib
     95 LINK.c=		$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(RUN_PATH_LINK)
     96 LINK.cc=	$(CCC) $(CCFLAGS) $(CPPFLAGS) -z nodefaultlib $(LDFLAGS) \
     97 		$(RUN_PATH_LINK) $(CCNEEDED)
     98 
     99 LINUX_ROOT=		/usr
    100 
    101 i386_CC=	$(LINUX_ROOT)/bin/gcc
    102 i386_CCC=	$(LINUX_ROOT)/bin/g++
    103 i386_AS=	$(LINUX_ROOT)/bin/as
    104 i386_LD=	$(LINUX_ROOT)/bin/ld
    105 
    106 LIBCC		=
    107 
    108 i386_LINT=
    109 
    110 PROCESS_COMMENT= /bin/true
    111 
    112 SYMLINK=	/bin/ln -s
    113 LN=		/bin/ln
    114 CHMOD=		$(TRUE)
    115 MV=		/bin/mv -f
    116 RM=		/bin/rm -f
    117 GREP=		/bin/grep
    118 XPG4GREP=	/bin/grep
    119 SED=		/bin/sed
    120 CP=		/bin/cp
    121 CAT=            /bin/cat
    122 RPCGEN=		/usr/bin/rpcgen
    123 
    124 $(NOT_RELEASE_BUILD)CL_CPPFLAGS	= $(FI_CPPFLAGS) -DDEBUG -DFAULT_ALL
    125 
    126 XAR=
    127 
    128 RPCGENMT= -M
    129 
    130 NORUNPATH=
    131 NOLIB=
    132 CCYFLAG=-I
    133 CCYLIBS=-L
    134 DEFAULT_RUNPATH= -Wl,-R/usr/cluster/lib -Wl,-R/lib -Wl,-R/usr/lib
    135 
    136 #
    137 # Some additions to support building in with a reference proto area.
    138 # This is the location for reference proto area containing
    139 # libs and headers for version of OS we're building against.
    140 # We use REFERENCE_PROTO_BASE to build the IDL compiler.
    141 #
    142 REFERENCE_PROTO=$(OSNAME)/$(OS_PLATFORM)
    143 REFERENCE_PROTO_BASE=$(OSNAME)/$(OS_PLATFORM)
    144 
    145 #
    146 # The following names the reference proto area, as well as the name
    147 # of compatibility header files and libraries that interface the
    148 # build to the OS platform.
    149 #
    150 # Make sure to create an os_compat.$(OS_PLATFORM) file that matches
    151 # the platform name.
    152 #
    153 # 2.4.9-31e		== 20409310 RedHat 7.2 (LX50 release?)
    154 # 2.4.21-4.ELsmp	== 20421040 RedHat 3.0 Advanced Server
    155 #
    156 
    157 #OS_PLATFORM = RH40AS
    158 
    159 RH40AS	= 20609011
    160 RH30AS	= 20421040
    161 RH72	= 20409310
    162 
    163 DOS_PLATFORM	= -DOS_PLATFORM=$(OS_PLATFORM)
    164 DOS_VERSION	= -DOS_VERSION=$($(OS_PLATFORM))
    165 
    166 #
    167 # Optimization flag overrides
    168 #
    169 COPTFLAG= -g
    170 COPTFLAG64= -g
    171 $(RELEASE_BUILD)COPTFLAG= -O3
    172 $(RELEASE_BUILD)COPTFLAG64= -O3
    173 CCOPTFLAG= -g
    174 CCOPTFLAG64= -g
    175 $(RELEASE_BUILD)CCOPTFLAG= -O
    176 $(RELEASE_BUILD)CCOPTFLAG64= -O
    177 
    178 #
    179 # Template file cleanup
    180 #
    181 PTCLEAN=	/bin/true
    182