diff options
Diffstat (limited to 'usr/src/lib/Makefile.lib')
-rw-r--r-- | usr/src/lib/Makefile.lib | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/usr/src/lib/Makefile.lib b/usr/src/lib/Makefile.lib index 2dab9d92c6..c1cb2513f3 100644 --- a/usr/src/lib/Makefile.lib +++ b/usr/src/lib/Makefile.lib @@ -124,6 +124,25 @@ SONAME= $(DYNLIB) # either within the library or as dependencies, all text should be pure, and # combining relocations into one relocation table reduces startup costs. # All options are tunable to allow overload/omission from lower makefiles. + +# +# DTrace related rules +# +# These allow for multiple USDT providers to be specified by a library. +# If a library needs to break up the set of objects that are passed to +# the dtrace -G invocation, then they can place the following in heir +# Makefile.com: +# +# pics/<provider>.o := USDT_G_PICS = <files> +# +# <provider> should be replaced with the basename of one of the USDT +# providers specified in USDT_PROVIDERS in their Makefile.com. +# +USDT_HEADERS= $(USDT_PROVIDERS:%.d=%_impl.h) +USDT_PICS= $(USDT_PROVIDERS:%.d=pics/%.o) +USDT_G_PICS= $(PICS) + + HSONAME= -h$(SONAME) DYNFLAGS= $(HSONAME) $(ZTEXT) $(ZDEFS) $(BDIRECT) \ $(MAPFILES:%=-Wl,-M%) $(MAPFILE.PGA:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%) \ @@ -146,7 +165,7 @@ SRCS= $(OBJECTS:%.o=$(SRCDIR)/%.c) # overridden locally when extra processing is needed BUILD.AR= $(AR) $(ARFLAGS) $@ $(AROBJS) BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \ - $(PICS) $(EXTPICS) $(LDLIBS) + $(PICS) $(EXTPICS) $(USDT_PICS) $(LDLIBS) BUILD64.SO= $(CC64) $(CFLAGS64) -o $@ $(GSHARED) $(DYNFLAGS) \ $(PICS) $(EXTPICS) -L $(ROOTLIBDIR64) $(LDLIBS) BUILDCCC.SO= $(CCC) $(CCFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \ |