17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 55aefb655Srie# Common Development and Distribution License (the "License"). 65aefb655Srie# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 2108278a5eSRod Evans 227c478bd9Sstevel@tonic-gate# 2320c1c355SRod Evans# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. 2447ff90e9SAndrew Stormont# Copyright 2016 RackTop Systems. 25cf9a187cSAndy Fiddaman# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. 267c478bd9Sstevel@tonic-gate# 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate.KEEP_STATE: 295aefb655Srie.KEEP_STATE_FILE: .make.state.$(MACH) 305aefb655Srie 317c478bd9Sstevel@tonic-gate 3256deab07SRod Evansi386_ARCH = intel 335aefb655Sriesparc_ARCH = sparc 347c478bd9Sstevel@tonic-gate 355aefb655SrieARCH = $($(MACH)_ARCH) 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gate# Establish any global flags. 387c478bd9Sstevel@tonic-gate 39b3fbe5e6Sseizo# Setting DEBUG = -DDEBUG (or "make DEBUG=-DDEBUG ...") enables ASSERT() 40b3fbe5e6Sseizo# checking. This is automatically enabled for DEBUG builds, not for non-debug 41bd0ce624SYuri Pankov# builds. Unset the global CSTD_GNU89 flag to insure we uncover all compiler 42b3fbe5e6Sseizo# warnings/errors. 435aefb655SrieDEBUG = 447c478bd9Sstevel@tonic-gate$(NOT_RELEASE_BUILD)DEBUG = -DDEBUG 457c478bd9Sstevel@tonic-gate 46bd0ce624SYuri PankovCSTD_GNU89 = $(CSTD_GNU99) 47b3fbe5e6Sseizo 48*d17be682SRichard LoweCFLAGS += $(CCVERBOSE) $(DEBUG) 49*d17be682SRichard LoweCFLAGS64 += $(CCVERBOSE) $(DEBUG) 507c478bd9Sstevel@tonic-gate 51*d17be682SRichard LoweNATIVE_CFLAGS += $(CCVERBOSE) $(DEBUG) 5269b1fd3fSRichard Lowe 537014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-value 547014882cSRichard Lowe 5569112eddSAli Bahrami# 5669112eddSAli Bahrami# Location of the shared elfcap code 5769112eddSAli Bahrami# 5869112eddSAli BahramiELFCAP= $(SRC)/common/elfcap 5969112eddSAli Bahrami 607c478bd9Sstevel@tonic-gate# Reassign CPPFLAGS so that local search paths are used before any parent 617c478bd9Sstevel@tonic-gate# $ROOT paths. 6269b1fd3fSRichard LoweCPPFLAGS = -I. -I../common -I$(SGSHOME)/include -I$(SGSHOME)/include/$(MACH) \ 6320c1c355SRod Evans $(CPPFLAGS.master) -I$(ELFCAP) 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gate# PICS64 is unique to our environment 66*d17be682SRichard Lowe$(PICS64) := sparc_CFLAGS += $(C_PICFLAGS) 67*d17be682SRichard Lowe$(PICS64) := sparcv9_CFLAGS += $(C_PICFLAGS) 687c478bd9Sstevel@tonic-gate$(PICS64) := CPPFLAGS += -DPIC -D_REENTRANT 697c478bd9Sstevel@tonic-gate 70fb1354edSrieLDFLAGS += $(ZIGNORE) 71fb1354edSrieDYNFLAGS += $(ZIGNORE) 727c478bd9Sstevel@tonic-gate 737c478bd9Sstevel@tonic-gate# Establish the local tools, proto and package area. 747c478bd9Sstevel@tonic-gate 755aefb655SrieSGSHOME = $(SRC)/cmd/sgs 7669b1fd3fSRichard LoweSGSCOMMON = $(SGSHOME)/common 775aefb655SrieSGSTOOLS = $(SGSHOME)/tools 785aefb655SrieSGSMSGID = $(SGSHOME)/messages 795aefb655SrieSGSMSGDIR = $(SGSHOME)/messages/$(MACH) 805aefb655SrieSGSONLD = $(ROOT)/opt/SUNWonld 815aefb655SrieSGSRPATH = /usr/lib 825aefb655SrieSGSRPATH64 = $(SGSRPATH)/$(MACH64) 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gate# 855aefb655Srie# Macros to be used to include link against libconv and include vernote.o 867c478bd9Sstevel@tonic-gate# 875aefb655SrieVERSREF = -ulink_ver_string 887c478bd9Sstevel@tonic-gate 895aefb655SrieLDLIBDIR = -L$(SGSHOME)/libld/$(MACH) 905aefb655SrieLDLIBDIR64 = -L$(SGSHOME)/libld/$(MACH64) 917c478bd9Sstevel@tonic-gate 925aefb655SrieCONVLIBDIR = -L$(SGSHOME)/libconv/$(MACH) 935aefb655SrieCONVLIBDIR64 = -L$(SGSHOME)/libconv/$(MACH64) 947c478bd9Sstevel@tonic-gate 955aefb655SrieELFLIBDIR = -L$(SGSHOME)/libelf/$(MACH) 965aefb655SrieELFLIBDIR64 = -L$(SGSHOME)/libelf/$(MACH64) 977c478bd9Sstevel@tonic-gate 985aefb655SrieLDDBGLIBDIR = -L$(SGSHOME)/liblddbg/$(MACH) 995aefb655SrieLDDBGLIBDIR64 = -L$(SGSHOME)/liblddbg/$(MACH64) 1007c478bd9Sstevel@tonic-gate 10169112eddSAli Bahrami 1027c478bd9Sstevel@tonic-gate# The cmd/Makefile.com and lib/Makefile.com define TEXT_DOMAIN. We don't need 1037c478bd9Sstevel@tonic-gate# this definition as the sgs utilities obtain their domain via sgsmsg(1l). 1047c478bd9Sstevel@tonic-gate 1055aefb655SrieDTEXTDOM = 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gate# Define any generic sgsmsg(1l) flags. The default message generation system 1087c478bd9Sstevel@tonic-gate# is to use gettext(3i), add the -C flag to switch to catgets(3c). 1097c478bd9Sstevel@tonic-gate 11069b1fd3fSRichard LoweSGSMSG = $(ONBLD_TOOLS)/bin/$(MACH)/sgsmsg 111d29b2c44SabSGSMSG_PIGLATIN_NL = perl $(SGSTOOLS)/common/sgsmsg_piglatin_nl.pl 11269b1fd3fSRichard LoweCHKMSG = $(SGSHOME)/tools/chkmsg.sh 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gateSGSMSGVFLAG = 1157c478bd9Sstevel@tonic-gateSGSMSGFLAGS = $(SGSMSGVFLAG) -i $(SGSMSGID)/sgs.ident 1165aefb655SrieCHKMSGFLAGS = $(SGSMSGTARG:%=-m %) $(SGSMSGCHK:%=-m %) 117