xref: /illumos-gate/usr/src/cmd/sgs/Makefile.com (revision 0250c53ad267726f2438e3c6556199a0bbf588a2)
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/OPENSOLARIS.LICENSE
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/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) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
24# Copyright 2016 RackTop Systems.
25# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
26#
27
28.KEEP_STATE:
29.KEEP_STATE_FILE: .make.state.$(MACH)
30
31
32i386_ARCH =	intel
33sparc_ARCH =	sparc
34
35ARCH =		$($(MACH)_ARCH)
36
37# Establish any global flags.
38
39# Setting DEBUG = -DDEBUG (or "make DEBUG=-DDEBUG ...") enables ASSERT()
40# checking.  This is automatically enabled for DEBUG builds, not for non-debug
41# builds.  Unset the global CSTD_GNU89 flag to insure we uncover all compiler
42# warnings/errors.
43DEBUG =
44$(NOT_RELEASE_BUILD)DEBUG = -DDEBUG
45
46CSTD_GNU89 =	$(CSTD_GNU99)
47
48CFLAGS +=	$(CCVERBOSE) $(DEBUG)
49CFLAGS64 +=	$(CCVERBOSE) $(DEBUG)
50
51NATIVE_CFLAGS +=	$(CCVERBOSE) $(DEBUG)
52
53CERRWARN +=	-_gcc=-Wno-unused-value
54
55#
56# Location of the shared elfcap code
57#
58ELFCAP=		$(SRC)/common/elfcap
59
60# Reassign CPPFLAGS so that local search paths are used before any parent
61# $ROOT paths.
62CPPFLAGS =	-I. -I../common -I$(SGSHOME)/include -I$(SGSHOME)/include/$(MACH) \
63		$(CPPFLAGS.master) -I$(ELFCAP)
64
65# PICS64 is unique to our environment
66$(PICS64) :=	sparc_CFLAGS += $(C_PICFLAGS)
67$(PICS64) :=	sparcv9_CFLAGS += $(C_PICFLAGS)
68$(PICS64) :=	CPPFLAGS += -DPIC -D_REENTRANT
69
70LDFLAGS +=	$(ZIGNORE)
71DYNFLAGS +=	$(ZIGNORE)
72
73# Establish the local tools, proto and package area.
74
75SGSHOME =	$(SRC)/cmd/sgs
76SGSCOMMON =	$(SGSHOME)/common
77SGSTOOLS =	$(SGSHOME)/tools
78SGSMSGID =	$(SGSHOME)/messages
79SGSMSGDIR =	$(SGSHOME)/messages/$(MACH)
80SGSONLD =	$(ROOT)/opt/SUNWonld
81SGSRPATH =	/usr/lib
82SGSRPATH64 =	$(SGSRPATH)/$(MACH64)
83
84#
85# Macros to be used to include link against libconv and include vernote.o
86#
87VERSREF =	-ulink_ver_string
88
89LDLIBDIR =	-L$(SGSHOME)/libld/$(MACH)
90LDLIBDIR64 =	-L$(SGSHOME)/libld/$(MACH64)
91
92CONVLIBDIR =	-L$(SGSHOME)/libconv/$(MACH)
93CONVLIBDIR64 =	-L$(SGSHOME)/libconv/$(MACH64)
94
95ELFLIBDIR =	-L$(SGSHOME)/libelf/$(MACH)
96ELFLIBDIR64 =	-L$(SGSHOME)/libelf/$(MACH64)
97
98LDDBGLIBDIR =	-L$(SGSHOME)/liblddbg/$(MACH)
99LDDBGLIBDIR64 =	-L$(SGSHOME)/liblddbg/$(MACH64)
100
101
102# The cmd/Makefile.com and lib/Makefile.com define TEXT_DOMAIN.  We don't need
103# this definition as the sgs utilities obtain their domain via sgsmsg(1l).
104
105DTEXTDOM =
106
107# Define any generic sgsmsg(1l) flags.  The default message generation system
108# is to use gettext(3i), add the -C flag to switch to catgets(3c).
109
110SGSMSG =		$(ONBLD_TOOLS)/bin/$(MACH)/sgsmsg
111SGSMSG_PIGLATIN_NL =	perl $(SGSTOOLS)/common/sgsmsg_piglatin_nl.pl
112CHKMSG =		$(SGSHOME)/tools/chkmsg.sh
113
114SGSMSGVFLAG =
115SGSMSGFLAGS =	$(SGSMSGVFLAG) -i $(SGSMSGID)/sgs.ident
116CHKMSGFLAGS =	$(SGSMSGTARG:%=-m %) $(SGSMSGCHK:%=-m %)
117