Print this page
7612 SGSPROTO lacks structure
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/sgs/Makefile.com
+++ new/usr/src/cmd/sgs/Makefile.com
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21
22 22 #
23 23 # Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 # Copyright 2016 RackTop Systems.
25 25 #
26 26
27 27 .KEEP_STATE:
28 28 .KEEP_STATE_FILE: .make.state.$(MACH)
29 29
30 30
31 31 include $(SRC)/cmd/sgs/Makefile.var
32 32
33 33 SRCBASE = ../../../..
34 34
35 35 i386_ARCH = intel
36 36 sparc_ARCH = sparc
37 37
38 38 ARCH = $($(MACH)_ARCH)
39 39
40 40 # Establish any global flags.
41 41
42 42 # Setting DEBUG = -DDEBUG (or "make DEBUG=-DDEBUG ...") enables ASSERT()
43 43 # checking. This is automatically enabled for DEBUG builds, not for non-debug
44 44 # builds. Unset the global C99_DISABLE flag to insure we uncover all compiler
45 45 # warnings/errors.
46 46 DEBUG =
47 47 $(NOT_RELEASE_BUILD)DEBUG = -DDEBUG
48 48
49 49 C99_DISABLE = $(C99_ENABLE)
50 50
51 51 CFLAGS += $(CCVERBOSE) $(DEBUG) $(XFFLAG)
52 52 CFLAGS64 += $(CCVERBOSE) $(DEBUG) $(XFFLAG)
53 53
54 54 CERRWARN += -_gcc=-Wno-type-limits
55 55 CERRWARN += -_gcc=-Wno-parentheses
56 56 CERRWARN += -_gcc=-Wno-unused-value
57 57
58 58 #
59 59 # Location of the shared elfcap code
60 60 #
61 61 ELFCAP= $(SRC)/common/elfcap
62 62
63 63 # Reassign CPPFLAGS so that local search paths are used before any parent
64 64 # $ROOT paths.
65 65 CPPFLAGS = -I. -I../common -I../../include -I../../include/$(MACH) \
66 66 $(CPPFLAGS.master) -I$(ELFCAP)
67 67
68 68 # PICS64 is unique to our environment
69 69 $(PICS64) := sparc_CFLAGS += -xregs=no%appl -K pic
70 70 $(PICS64) := sparcv9_CFLAGS += -xregs=no%appl -K pic
71 71 $(PICS64) := CPPFLAGS += -DPIC -D_REENTRANT
72 72
73 73 LDFLAGS += $(ZIGNORE)
74 74 DYNFLAGS += $(ZIGNORE)
75 75
76 76 # Establish the local tools, proto and package area.
↓ open down ↓ |
76 lines elided |
↑ open up ↑ |
77 77
78 78 SGSHOME = $(SRC)/cmd/sgs
79 79 SGSPROTO = $(SGSHOME)/proto/$(MACH)
80 80 SGSTOOLS = $(SGSHOME)/tools
81 81 SGSMSGID = $(SGSHOME)/messages
82 82 SGSMSGDIR = $(SGSHOME)/messages/$(MACH)
83 83 SGSONLD = $(ROOT)/opt/SUNWonld
84 84 SGSRPATH = /usr/lib
85 85 SGSRPATH64 = $(SGSRPATH)/$(MACH64)
86 86
87 +# Mimic the structure of an installed system.
88 +
89 +SGSLIBDIR = $(SGSPROTO)/lib
90 +SGSPREFIX = $(SGSPROTO)/usr
91 +SGSBINDIR = $(SGSPREFIX)/bin
92 +
87 93 #
88 94 # Macros to be used to include link against libconv and include vernote.o
89 95 #
90 96 VERSREF = -ulink_ver_string
91 97
92 98 LDLIBDIR = -L$(SGSHOME)/libld/$(MACH)
93 99 LDLIBDIR64 = -L$(SGSHOME)/libld/$(MACH64)
94 100
95 101 CONVLIBDIR = -L$(SGSHOME)/libconv/$(MACH)
96 102 CONVLIBDIR64 = -L$(SGSHOME)/libconv/$(MACH64)
97 103
98 104 ELFLIBDIR = -L$(SGSHOME)/libelf/$(MACH)
99 105 ELFLIBDIR64 = -L$(SGSHOME)/libelf/$(MACH64)
100 106
101 107 LDDBGLIBDIR = -L$(SGSHOME)/liblddbg/$(MACH)
102 108 LDDBGLIBDIR64 = -L$(SGSHOME)/liblddbg/$(MACH64)
103 109
104 110
105 111 # The cmd/Makefile.com and lib/Makefile.com define TEXT_DOMAIN. We don't need
106 112 # this definition as the sgs utilities obtain their domain via sgsmsg(1l).
107 113
108 114 DTEXTDOM =
109 115
110 116 # Define any generic sgsmsg(1l) flags. The default message generation system
111 117 # is to use gettext(3i), add the -C flag to switch to catgets(3c).
112 118
113 119 SGSMSG = $(SGSTOOLS)/$(MACH)/sgsmsg
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
114 120 SGSMSG_PIGLATIN_NL = perl $(SGSTOOLS)/common/sgsmsg_piglatin_nl.pl
115 121 CHKMSG = $(SGSTOOLS)/chkmsg.sh
116 122
117 123 SGSMSGVFLAG =
118 124 SGSMSGFLAGS = $(SGSMSGVFLAG) -i $(SGSMSGID)/sgs.ident
119 125 CHKMSGFLAGS = $(SGSMSGTARG:%=-m %) $(SGSMSGCHK:%=-m %)
120 126
121 127 # Native targets should use the minimum of ld(1) flags to allow building on
122 128 # previous releases. We use mapfiles to scope, but don't bother versioning.
123 129
124 -native := DYNFLAGS = -R$(SGSPROTO) -L$(SGSPROTO) $(ZNOVERSION) $(HSONAME)
130 +native := DYNFLAGS = -R$(SGSLIBDIR) -L$(SGSLIBDIR) $(ZNOVERSION) \
131 + $(HSONAME)
125 132
126 133 # Comment out the following two lines to have the sgs built from the system
127 134 # link-editor, rather than the local proto link-editor.
128 -CC_USE_PROTO = -Yl,$(SGSPROTO)
129 -LD_USE_PROTO = $(SGSPROTO)/
135 +CC_USE_PROTO = -Yl,$(SGSBINDIR)
136 +LD_USE_PROTO = $(SGSBINDIR)/
130 137
131 138 #
132 139 # lint-related stuff
133 140 #
134 141 LIBNAME32 = $(LIBNAME:%=%32)
135 142 LIBNAME64 = $(LIBNAME:%=%64)
136 143 LIBNAMES = $(LIBNAME32) $(LIBNAME64)
137 144
138 145 SGSLINTOUT = lint.out
139 146 LINTOUT1 = lint.out.1
140 147 LINTOUT32 = lint.out.32
141 148 LINTOUT64 = lint.out.64
142 149 LINTOUTS = $(SGSLINTOUT) $(LINTOUT1) $(LINTOUT32) $(LINTOUT64)
143 150
144 151 LINTLIBSRC = $(LINTLIB:%.ln=%)
145 152 LINTLIB32 = $(LINTLIB:%.ln=%32.ln)
146 153 LINTLIB64 = $(LINTLIB:%.ln=%64.ln)
147 154 LINTLIBS = $(LINTLIB32) $(LINTLIB64)
148 155
149 156 LINTFLAGS = -m -errtags=yes -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
150 157 LINTFLAGS64 = -m -errtags=yes -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED \
151 158 $(VAR_LINTFLAGS64)
152 159
153 160 #
154 161 # When building a lint library, no other lint libraries are verified as
155 162 # dependencies, nor is the stardard C lint library processed. All dependency
156 163 # verification is carried out through linting the sources themselves.
157 164 #
158 165 $(LINTLIB) := LINTFLAGS += -n
159 166 $(LINTLIB) := LINTFLAGS64 += -n
160 167
161 168 $(LINTLIB32) := LINTFLAGS += -n
162 169 $(LINTLIB32) := LINTFLAGS64 += -n
163 170 $(LINTLIB64) := LINTFLAGS += -n
164 171 $(LINTLIB64) := LINTFLAGS64 += -n
165 172
166 173 #
167 174 # These libraries have two resulting lint libraries. If a dependency is
168 175 # declared using these variables, the substitution for the 32/64 versions at
169 176 # lint time happens automatically (see Makefile.targ).
170 177 #
171 178 LD_LIB = -lld
172 179 LD_LIB32 = -lld32
173 180 LD_LIB64 = -lld64
174 181
175 182 LDDBG_LIB = -llddbg
176 183 LDDBG_LIB32 = -llddbg32
177 184 LDDBG_LIB64 = -llddbg64
178 185
179 186 CONV_LIB = -lconv
180 187 CONV_LIB32 = -lconv32
181 188 CONV_LIB64 = -lconv64
↓ open down ↓ |
42 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX