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