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, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# 23# ident "%Z%%M% %I% %E% SMI" 24# 25# Copyright 2004 Sun Microsystems, Inc. All rights reserved. 26# Use is subject to license terms. 27# 28# cmd/sgs/Makefile.com 29 30.KEEP_STATE: 31 32include $(SRC)/cmd/sgs/Makefile.var 33 34SRCBASE= ../../../.. 35 36i386_ARCH= $(VAR_I386_ARCH) 37sparc_ARCH= sparc 38 39ARCH= $($(MACH)_ARCH) 40 41ROOTCCSBIN64= $(ROOTCCSBIN)/$(MACH64) 42ROOTCCSBINPROG64= $(PROG:%=$(ROOTCCSBIN64)/%) 43 44# Establish any global flags. 45 46# Setting DEBUG = -DDEBUG (or "make DEBUG=-DDEBUG ...") 47# enables ASSERT() checking in the library 48# This is automatically enabled for DEBUG builds, not for non debug builds. 49DEBUG= 50$(NOT_RELEASE_BUILD)DEBUG = -DDEBUG 51 52CFLAGS += $(CCVERBOSE) $(DEBUG) $(XFFLAG) 53CFLAGS64 += $(CCVERBOSE) $(DEBUG) $(XFFLAG) 54 55# Reassign CPPFLAGS so that local search paths are used before any parent 56# $ROOT paths. 57CPPFLAGS= -I. -I../common -I../../include -I../../include/$(MACH) \ 58 $(VAR_CPPFLAGS) $(CPPFLAGS.master) 59 60# PICS64 is unique to our environment 61$(PICS64) := sparc_CFLAGS += -xregs=no%appl -K pic 62$(PICS64) := sparcv9_CFLAGS += -xregs=no%appl -K pic 63$(PICS64) := CPPFLAGS += -DPIC -D_REENTRANT 64 65LDZIGNORE= -zignore 66LDFLAGS += $(LDZIGNORE) 67DYNFLAGS += $(LDZIGNORE) 68 69# Establish the local tools, proto and package area. 70 71SGSHOME= $(SRC)/cmd/sgs 72SGSPROTO= $(SGSHOME)/proto/$(MACH) 73SGSTOOLS= $(SGSHOME)/tools 74SGSMSGID= $(SGSHOME)/messages 75SGSMSGDIR= $(SGSHOME)/messages/$(MACH) 76SGSONLD= $(ROOT)/opt/SUNWonld 77SGSRPATH= /usr/lib 78SGSRPATH64= $(SGSRPATH)/$(MACH64) 79 80# 81# Macros to be used to include link against libconv and include 82# vernote.o 83# 84VERSREF= -ulink_ver_string 85CONVLIBDIR= -L$(SGSHOME)/libconv/$(MACH) 86CONVLIBDIR64= -L$(SGSHOME)/libconv/$(MACH64) 87 88ELFLIBDIR= -L$(SGSHOME)/libelf/$(MACH) 89ELFLIBDIR64= -L$(SGSHOME)/libelf/$(MACH64) 90 91LDDBGLIBDIR= -L$(SGSHOME)/liblddbg/$(MACH) 92LDDBGLIBDIR64= -L$(SGSHOME)/liblddbg/$(MACH64) 93 94 95 96# The cmd/Makefile.com and lib/Makefile.com define TEXT_DOMAIN. We don't need 97# this definition as the sgs utilities obtain their domain via sgsmsg(1l). 98 99DTEXTDOM= 100 101 102# Define any generic sgsmsg(1l) flags. The default message generation system 103# is to use gettext(3i), add the -C flag to switch to catgets(3c). 104 105SGSMSG= $(SGSTOOLS)/$(MACH)/sgsmsg 106CHKMSG= $(SGSTOOLS)/chkmsg.sh 107 108SGSMSGVFLAG = 109SGSMSGFLAGS = $(SGSMSGVFLAG) -i $(SGSMSGID)/sgs.ident 110CHKMSGFLAGS= $(SGSMSGTARG:%=-m %) $(SGSMSGCHK:%=-m %) 111 112 113# Native targets should use the minimum of ld(1) flags to allow building on 114# previous releases. We use mapfiles to scope, but don't bother versioning. 115 116native:= DYNFLAGS = $(MAPOPTS) -R$(SGSPROTO) -L$(SGSPROTO) $(ZNOVERSION) 117 118USE_PROTO= -Yl,$(SGSPROTO) 119 120.KEEP_STATE_FILE: .make.state.$(MACH) 121 122# 123# lint-related stuff 124# 125 126DASHES= "------------------------------------------------------------" 127 128LIBNAME32 = $(LIBNAME:%=%32) 129LIBNAME64 = $(LIBNAME:%=%64) 130LIBNAMES = $(LIBNAME32) $(LIBNAME64) 131 132SGSLINTOUT = lint.out 133LINTOUT1 = lint.out.1 134LINTOUT32 = lint.out.32 135LINTOUT64 = lint.out.64 136LINTOUTS = $(SGSLINTOUT) $(LINTOUT1) $(LINTOUT32) $(LINTOUT64) 137 138LINTLIBSRC = $(LINTLIB:%.ln=%) 139LINTLIB32 = $(LINTLIB:%.ln=%32.ln) 140LINTLIB64 = $(LINTLIB:%.ln=%64.ln) 141LINTLIBS = $(LINTLIB32) $(LINTLIB64) 142 143LINTFLAGS = -m -errtags=yes -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED 144LINTFLAGS64 = -m -errtags=yes -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED \ 145 -errchk=longptr64 $(VAR_LINTFLAGS64) 146 147# 148# These libraries have two resulting lint libraries. 149# If a dependency is declared using these variables, 150# the substitution for the 32/64 versions at lint time 151# will happen automatically (see Makefile.targ). 152# 153LDDBG_LIB= -llddbg 154LDDBG_LIB32= -llddbg32 155LDDBG_LIB64= -llddbg64 156 157LD_LIB= -lld 158LD_LIB32= -lld32 159LD_LIB64= -lld64 160