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 # Copyright 2015 Gary Mills
22 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2014, Joyent, Inc.
25 #
26 #
27 # Definitions common to libraries.
28 #
29 # include global definitions; SRC should be defined in the shell.
30 # SRC is needed until RFE 1026993 is implemented.
31
32 include $(SRC)/Makefile.master
33
34 LORDER= lorder
35 TSORT= tsort
36
37 #
38 # By default, we define the source directory for libraries to be
39 # one level up from the ISA-specific directory, where the code is
40 # actually built. Many libraries define a 'common' directory to
41 # contain the source. These libraries must redefine SRCDIR as:
42 # SRCDIR = ../common
43 # Other variations are possible (../port, ../src, etc).
44 #
159 $(MAPFILES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
160
161 LDLIBS= $(LDLIBS.lib)
162
163 OBJS= $(OBJECTS:%=objs/%)
164 PICS= $(OBJECTS:%=pics/%)
165
166 # Declare that all library .o's can all be made in parallel.
167 # The DUMMY target is for those instances where OBJS and PICS
168 # are empty (to avoid an unconditional .PARALLEL declaration).
169 .PARALLEL: $(OBJS) $(PICS) DUMMY
170
171 # default value for "portable" source
172 SRCS= $(OBJECTS:%.o=$(SRCDIR)/%.c)
173
174 # default build of an archive and a shared object,
175 # overridden locally when extra processing is needed
176 BUILD.AR= $(AR) $(ARFLAGS) $@ $(AROBJS)
177 BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \
178 $(PICS) $(EXTPICS) $(USDT_PICS) $(LDLIBS)
179 BUILDCCC.SO= $(CCC) $(CCFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \
180 $(PICS) $(EXTPICS) $(LDLIBS)
181
182 # default dynamic library symlink
183 INS.liblink= -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@
184 INS.liblinkccc= -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKSCCC)$(VERS) $@
185
186 # default 64-bit dynamic library symlink
187 INS.liblink64= -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@
188 INS.liblinkccc64= -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKSCCC)$(VERS) $@
189
190 #
191 # If appropriate, augment POST_PROCESS_O and POST_PROCESS_SO to do CTF
192 # processing. We'd like to just conditionally append to POST_PROCESS_O and
193 # POST_PROCESS_SO, but ParallelMake has a bug which causes the same value to
194 # sometimes get appended more than once, which will cause ctfconvert to fail.
195 # So, instead we introduce CTFCONVERT_POST and CTFMERGE_POST, which are always
196 # appended to POST_PROCESS_O and POST_PROCESS_SO but are no-ops unless CTF
197 # processing should be done.
198 #
199 CTFCONVERT_POST = :
200 CTFMERGE_POST = :
|
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 # Copyright 2015 Gary Mills
22 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2014, Joyent, Inc.
25 # Copyright 2016 RackTop Systems.
26 #
27 #
28 # Definitions common to libraries.
29 #
30 # include global definitions; SRC should be defined in the shell.
31 # SRC is needed until RFE 1026993 is implemented.
32
33 include $(SRC)/Makefile.master
34
35 LORDER= lorder
36 TSORT= tsort
37
38 #
39 # By default, we define the source directory for libraries to be
40 # one level up from the ISA-specific directory, where the code is
41 # actually built. Many libraries define a 'common' directory to
42 # contain the source. These libraries must redefine SRCDIR as:
43 # SRCDIR = ../common
44 # Other variations are possible (../port, ../src, etc).
45 #
160 $(MAPFILES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
161
162 LDLIBS= $(LDLIBS.lib)
163
164 OBJS= $(OBJECTS:%=objs/%)
165 PICS= $(OBJECTS:%=pics/%)
166
167 # Declare that all library .o's can all be made in parallel.
168 # The DUMMY target is for those instances where OBJS and PICS
169 # are empty (to avoid an unconditional .PARALLEL declaration).
170 .PARALLEL: $(OBJS) $(PICS) DUMMY
171
172 # default value for "portable" source
173 SRCS= $(OBJECTS:%.o=$(SRCDIR)/%.c)
174
175 # default build of an archive and a shared object,
176 # overridden locally when extra processing is needed
177 BUILD.AR= $(AR) $(ARFLAGS) $@ $(AROBJS)
178 BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \
179 $(PICS) $(EXTPICS) $(USDT_PICS) $(LDLIBS)
180 BUILD64.SO= $(CC64) $(CFLAGS64) -o $@ $(GSHARED) $(DYNFLAGS) \
181 $(PICS) $(EXTPICS) $(USDT_PICS) -L $(ROOTLIBDIR64) $(LDLIBS)
182 BUILDCCC.SO= $(CCC) $(CCFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \
183 $(PICS) $(EXTPICS) $(LDLIBS)
184 BUILDCCC64.SO= $(CCC64) $(CCFLAGS64) -o $@ $(GSHARED) $(DYNFLAGS) \
185 $(PICS) $(EXTPICS) $(LDLIBS) $(CCNEEDED64)
186
187 # default dynamic library symlink
188 INS.liblink= -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@
189 INS.liblinkccc= -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKSCCC)$(VERS) $@
190
191 # default 64-bit dynamic library symlink
192 INS.liblink64= -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@
193 INS.liblinkccc64= -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKSCCC)$(VERS) $@
194
195 #
196 # If appropriate, augment POST_PROCESS_O and POST_PROCESS_SO to do CTF
197 # processing. We'd like to just conditionally append to POST_PROCESS_O and
198 # POST_PROCESS_SO, but ParallelMake has a bug which causes the same value to
199 # sometimes get appended more than once, which will cause ctfconvert to fail.
200 # So, instead we introduce CTFCONVERT_POST and CTFMERGE_POST, which are always
201 # appended to POST_PROCESS_O and POST_PROCESS_SO but are no-ops unless CTF
202 # processing should be done.
203 #
204 CTFCONVERT_POST = :
205 CTFMERGE_POST = :
|