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
32 include $(SRC)/cmd/sgs/Makefile.var
33
34 SRCBASE = ../../../..
35
36 i386_ARCH = intel
37 sparc_ARCH = sparc
38
39 ARCH = $($(MACH)_ARCH)
40
41 # Establish any global flags.
42
43 # Setting DEBUG = -DDEBUG (or "make DEBUG=-DDEBUG ...") enables ASSERT()
44 # checking. This is automatically enabled for DEBUG builds, not for non-debug
45 # builds. Unset the global CSTD_GNU89 flag to insure we uncover all compiler
46 # warnings/errors.
47 DEBUG =
48 $(NOT_RELEASE_BUILD)DEBUG = -DDEBUG
49
50 CSTD_GNU89 = $(CSTD_GNU99)
51
52 CFLAGS += $(CCVERBOSE) $(DEBUG) $(XFFLAG)
53 CFLAGS64 += $(CCVERBOSE) $(DEBUG) $(XFFLAG)
54
55 CERRWARN += -_gcc=-Wno-type-limits
56 CERRWARN += -_gcc=-Wno-parentheses
57 CERRWARN += -_gcc=-Wno-unused-value
58
59 #
60 # Location of the shared elfcap code
61 #
62 ELFCAP= $(SRC)/common/elfcap
63
64 # Reassign CPPFLAGS so that local search paths are used before any parent
65 # $ROOT paths.
66 CPPFLAGS = -I. -I../common -I../../include -I../../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
74 LDFLAGS += $(ZIGNORE)
75 DYNFLAGS += $(ZIGNORE)
76
77 # Establish the local tools, proto and package area.
78
79 SGSHOME = $(SRC)/cmd/sgs
80 SGSPROTO = $(SGSHOME)/proto/$(MACH)
81 SGSTOOLS = $(SGSHOME)/tools
82 SGSMSGID = $(SGSHOME)/messages
83 SGSMSGDIR = $(SGSHOME)/messages/$(MACH)
84 SGSONLD = $(ROOT)/opt/SUNWonld
85 SGSRPATH = /usr/lib
86 SGSRPATH64 = $(SGSRPATH)/$(MACH64)
87
88 # Mimic the structure of an installed system.
89
90 SGSLIBDIR = $(SGSPROTO)/lib
91 SGSPREFIX = $(SGSPROTO)/usr
92 SGSBINDIR = $(SGSPREFIX)/bin
93
94 #
95 # Macros to be used to include link against libconv and include vernote.o
96 #
97 VERSREF = -ulink_ver_string
98
99 LDLIBDIR = -L$(SGSHOME)/libld/$(MACH)
100 LDLIBDIR64 = -L$(SGSHOME)/libld/$(MACH64)
101
102 CONVLIBDIR = -L$(SGSHOME)/libconv/$(MACH)
103 CONVLIBDIR64 = -L$(SGSHOME)/libconv/$(MACH64)
104
105 ELFLIBDIR = -L$(SGSHOME)/libelf/$(MACH)
106 ELFLIBDIR64 = -L$(SGSHOME)/libelf/$(MACH64)
107
108 LDDBGLIBDIR = -L$(SGSHOME)/liblddbg/$(MACH)
109 LDDBGLIBDIR64 = -L$(SGSHOME)/liblddbg/$(MACH64)
110
111
112 # The cmd/Makefile.com and lib/Makefile.com define TEXT_DOMAIN. We don't need
113 # this definition as the sgs utilities obtain their domain via sgsmsg(1l).
114
115 DTEXTDOM =
116
117 # Define any generic sgsmsg(1l) flags. The default message generation system
118 # is to use gettext(3i), add the -C flag to switch to catgets(3c).
119
120 SGSMSG = $(SGSTOOLS)/$(MACH)/sgsmsg
121 SGSMSG_PIGLATIN_NL = perl $(SGSTOOLS)/common/sgsmsg_piglatin_nl.pl
122 CHKMSG = $(SGSTOOLS)/chkmsg.sh
123
124 SGSMSGVFLAG =
125 SGSMSGFLAGS = $(SGSMSGVFLAG) -i $(SGSMSGID)/sgs.ident
126 CHKMSGFLAGS = $(SGSMSGTARG:%=-m %) $(SGSMSGCHK:%=-m %)
127
128 # Native targets should use the minimum of ld(1) flags to allow building on
129 # previous releases. We use mapfiles to scope, but don't bother versioning.
130
131 native := DYNFLAGS = -R$(SGSLIBDIR) -L$(SGSLIBDIR) $(ZNOVERSION) \
132 $(HSONAME)
133
134 # Comment out the following two lines to have the sgs built from the system
135 # link-editor, rather than the local proto link-editor.
136 CC_USE_PROTO = -Yl,$(SGSBINDIR)
137 LD_USE_PROTO = $(SGSBINDIR)/
138
139 LD_LIB = -lld
140 LD_LIB32 = -lld32
141 LD_LIB64 = -lld64
142
143 LDDBG_LIB = -llddbg
144 LDDBG_LIB32 = -llddbg32
145 LDDBG_LIB64 = -llddbg64
146
147 CONV_LIB = -lconv
148 CONV_LIB32 = -lconv32
149 CONV_LIB64 = -lconv64
|
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
32 include $(SRC)/cmd/sgs/Makefile.var
33
34 i386_ARCH = intel
35 sparc_ARCH = sparc
36
37 ARCH = $($(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.
45 DEBUG =
46 $(NOT_RELEASE_BUILD)DEBUG = -DDEBUG
47
48 CSTD_GNU89 = $(CSTD_GNU99)
49
50 CFLAGS += $(CCVERBOSE) $(DEBUG) $(XFFLAG)
51 CFLAGS64 += $(CCVERBOSE) $(DEBUG) $(XFFLAG)
52
53 NATIVE_CFLAGS += $(CCVERBOSE) $(DEBUG) $(XFFLAG)
54
55 CERRWARN += -_gcc=-Wno-type-limits
56 CERRWARN += -_gcc=-Wno-parentheses
57 CERRWARN += -_gcc=-Wno-unused-value
58
59 #
60 # Location of the shared elfcap code
61 #
62 ELFCAP= $(SRC)/common/elfcap
63
64 # Reassign CPPFLAGS so that local search paths are used before any parent
65 # $ROOT paths.
66 CPPFLAGS = -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
74 LDFLAGS += $(ZIGNORE)
75 DYNFLAGS += $(ZIGNORE)
76
77 # Establish the local tools, proto and package area.
78
79 SGSHOME = $(SRC)/cmd/sgs
80 SGSCOMMON = $(SGSHOME)/common
81 SGSTOOLS = $(SGSHOME)/tools
82 SGSMSGID = $(SGSHOME)/messages
83 SGSMSGDIR = $(SGSHOME)/messages/$(MACH)
84 SGSONLD = $(ROOT)/opt/SUNWonld
85 SGSRPATH = /usr/lib
86 SGSRPATH64 = $(SGSRPATH)/$(MACH64)
87
88 #
89 # Macros to be used to include link against libconv and include vernote.o
90 #
91 VERSREF = -ulink_ver_string
92
93 LDLIBDIR = -L$(SGSHOME)/libld/$(MACH)
94 LDLIBDIR64 = -L$(SGSHOME)/libld/$(MACH64)
95
96 CONVLIBDIR = -L$(SGSHOME)/libconv/$(MACH)
97 CONVLIBDIR64 = -L$(SGSHOME)/libconv/$(MACH64)
98
99 ELFLIBDIR = -L$(SGSHOME)/libelf/$(MACH)
100 ELFLIBDIR64 = -L$(SGSHOME)/libelf/$(MACH64)
101
102 LDDBGLIBDIR = -L$(SGSHOME)/liblddbg/$(MACH)
103 LDDBGLIBDIR64 = -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
109 DTEXTDOM =
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
114 SGSMSG = $(ONBLD_TOOLS)/bin/$(MACH)/sgsmsg
115 SGSMSG_PIGLATIN_NL = perl $(SGSTOOLS)/common/sgsmsg_piglatin_nl.pl
116 CHKMSG = $(SGSHOME)/tools/chkmsg.sh
117
118 SGSMSGVFLAG =
119 SGSMSGFLAGS = $(SGSMSGVFLAG) -i $(SGSMSGID)/sgs.ident
120 CHKMSGFLAGS = $(SGSMSGTARG:%=-m %) $(SGSMSGCHK:%=-m %)
|