Print this page
5468 Missing dependencies in lib/Makefile
5709 Add binary compatibility with Solaris 10 update 10.


   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 # Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright (c) 2012 by Delphix. All rights reserved.

  24 #
  25 
  26 LIBRARY = libdtrace.a
  27 VERS = .1
  28 
  29 LIBSRCS = \
  30         dt_aggregate.c \
  31         dt_as.c \
  32         dt_buf.c \
  33         dt_cc.c \
  34         dt_cg.c \
  35         dt_consume.c \
  36         dt_decl.c \
  37         dt_dis.c \
  38         dt_dof.c \
  39         dt_error.c \
  40         dt_errtags.c \
  41         dt_handle.c \
  42         dt_ident.c \
  43         dt_inttab.c \


 115 CLEANFILES += ../common/errno.d ../common/signal.d
 116 CLEANFILES += ../common/dt_errtags.c ../common/dt_names.c
 117 CLEANFILES += ../common/sysevent.sed ../common/sysevent.d
 118 CLEANFILES += ../common/tcp.sed ../common/tcp.d
 119 CLEANFILES += ../common/udp.sed ../common/udp.d
 120 CLEANFILES += $(LIBDAUDITOBJS) $(DRTIOBJS)
 121 
 122 CLOBBERFILES += $(LIBDAUDIT) drti.o
 123 
 124 CPPFLAGS += -I../common -I.
 125 CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
 126 CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
 127 
 128 CERRWARN += -_gcc=-Wno-unused-label
 129 CERRWARN += -_gcc=-Wno-unused-variable
 130 CERRWARN += -_gcc=-Wno-parentheses
 131 CERRWARN += -_gcc=-Wno-uninitialized
 132 CERRWARN += -_gcc=-Wno-switch
 133 
 134 YYCFLAGS =
 135 LDLIBS += -lgen -lproc -lrtld_db -lnsl -lsocket -lctf -lelf -lc
 136 DRTILDLIBS = $(LDLIBS.lib) -lc
 137 
 138 yydebug := YYCFLAGS += -DYYDEBUG
 139 
 140 $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
 141 
 142 LFLAGS = -t -v
 143 YFLAGS = -d -v
 144 
 145 ROOTDLIBDIR = $(ROOT)/usr/lib/dtrace
 146 ROOTDLIBDIR64 = $(ROOT)/usr/lib/dtrace/64
 147 
 148 ROOTDLIBS = $(DLIBSRCS:%=$(ROOTDLIBDIR)/%)
 149 ROOTDOBJS = $(ROOTDLIBDIR)/$(DRTIOBJ) $(ROOTDLIBDIR)/$(LIBDAUDIT)
 150 ROOTDOBJS64 = $(ROOTDLIBDIR64)/$(DRTIOBJ) $(ROOTDLIBDIR64)/$(LIBDAUDIT)
 151 
 152 $(ROOTDLIBDIR)/%.d := FILEMODE=444
 153 $(ROOTDLIBDIR)/%.o := FILEMODE=444
 154 $(ROOTDLIBDIR64)/%.o := FILEMODE=444
 155 $(ROOTDLIBDIR)/%.so := FILEMODE=555
 156 $(ROOTDLIBDIR64)/%.so := FILEMODE=555
 157 
 158 .KEEP_STATE:
 159 
 160 all: $(LIBS) $(DRTIOBJ) $(LIBDAUDIT)
 161 
 162 lint: lintdlink lintcheck
 163 
 164 lintdlink: $(DLINKSRCS:%.c=../common/%.c)
 165         $(LINT.c) $(DLINKSRCS:%.c=../common/%.c) $(DRTILDLIBS)
 166 
 167 dt_lex.c: $(SRCDIR)/dt_lex.l dt_grammar.h
 168         $(LEX) $(LFLAGS) $(SRCDIR)/dt_lex.l > $@
 169 
 170 dt_grammar.c dt_grammar.h: $(SRCDIR)/dt_grammar.y
 171         $(YACC) $(YFLAGS) $(SRCDIR)/dt_grammar.y
 172         @mv y.tab.h dt_grammar.h
 173         @mv y.tab.c dt_grammar.c
 174 
 175 pics/dt_lex.o pics/dt_grammar.o := CFLAGS += $(YYCFLAGS)
 176 pics/dt_lex.o pics/dt_grammar.o := CFLAGS64 += $(YYCFLAGS)
 177 
 178 pics/dt_lex.o pics/dt_grammar.o := CERRWARN += -erroff=E_STATEMENT_NOT_REACHED
 179 pics/dt_lex.o pics/dt_grammar.o := CCVERBOSE =
 180 
 181 ../common/dt_errtags.c: ../common/mkerrtags.sh ../common/dt_errtags.h
 182         sh ../common/mkerrtags.sh < ../common/dt_errtags.h > $@
 183 
 184 ../common/dt_names.c: ../common/mknames.sh $(SRC)/uts/common/sys/dtrace.h
 185         sh ../common/mknames.sh < $(SRC)/uts/common/sys/dtrace.h > $@


 212 ../common/tcp.d: ..//common/tcp.sed ../common/tcp.d.in
 213         sed -f ../common/tcp.sed < ../common/tcp.d.in > $@
 214 
 215 ../common/udp.d: ../common/udp.sed ../common/udp.d.in
 216         sed -f ../common/udp.sed < ../common/udp.d.in > $@
 217 
 218 pics/%.o: ../$(MACH)/%.c
 219         $(COMPILE.c) -o $@ $<
 220         $(POST_PROCESS_O)
 221 
 222 pics/%.o: ../$(MACH)/%.s
 223         $(COMPILE.s) -o $@ $<
 224         $(POST_PROCESS_O)
 225 
 226 $(DRTIOBJ): $(DRTIOBJS)
 227         $(LD) -o $@ -r -Blocal -Breduce $(DRTIOBJS)
 228         $(POST_PROCESS_O)
 229 
 230 $(LIBDAUDIT): $(LIBDAUDITOBJS)
 231         $(LINK.c) -o $@ $(GSHARED) -h$(LIBDAUDIT) $(ZTEXT) $(ZDEFS) $(BDIRECT) \
 232             $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(LIBDAUDITOBJS) \
 233             -lmapmalloc -lc -lproc
 234         $(POST_PROCESS_SO)
 235 
 236 $(ROOTDLIBDIR):
 237         $(INS.dir)
 238 
 239 $(ROOTDLIBDIR64): $(ROOTDLIBDIR)
 240         $(INS.dir)
 241 
 242 $(ROOTDLIBDIR)/%.d: ../common/%.d
 243         $(INS.file)
 244 
 245 $(ROOTDLIBDIR)/%.d: ../$(MACH)/%.d
 246         $(INS.file)
 247 
 248 $(ROOTDLIBDIR)/%.d: %.d
 249         $(INS.file)
 250 
 251 $(ROOTDLIBDIR)/%.o: %.o
 252         $(INS.file)


   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 # Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright (c) 2012 by Delphix. All rights reserved.
  24 # Copyright 2015 RackTop Systems.
  25 #
  26 
  27 LIBRARY = libdtrace.a
  28 VERS = .1
  29 
  30 LIBSRCS = \
  31         dt_aggregate.c \
  32         dt_as.c \
  33         dt_buf.c \
  34         dt_cc.c \
  35         dt_cg.c \
  36         dt_consume.c \
  37         dt_decl.c \
  38         dt_dis.c \
  39         dt_dof.c \
  40         dt_error.c \
  41         dt_errtags.c \
  42         dt_handle.c \
  43         dt_ident.c \
  44         dt_inttab.c \


 116 CLEANFILES += ../common/errno.d ../common/signal.d
 117 CLEANFILES += ../common/dt_errtags.c ../common/dt_names.c
 118 CLEANFILES += ../common/sysevent.sed ../common/sysevent.d
 119 CLEANFILES += ../common/tcp.sed ../common/tcp.d
 120 CLEANFILES += ../common/udp.sed ../common/udp.d
 121 CLEANFILES += $(LIBDAUDITOBJS) $(DRTIOBJS)
 122 
 123 CLOBBERFILES += $(LIBDAUDIT) drti.o
 124 
 125 CPPFLAGS += -I../common -I.
 126 CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
 127 CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
 128 
 129 CERRWARN += -_gcc=-Wno-unused-label
 130 CERRWARN += -_gcc=-Wno-unused-variable
 131 CERRWARN += -_gcc=-Wno-parentheses
 132 CERRWARN += -_gcc=-Wno-uninitialized
 133 CERRWARN += -_gcc=-Wno-switch
 134 
 135 YYCFLAGS =
 136 $(LIBS) := LDLIBS += -lgen -lproc -lrtld_db -lnsl -lsocket -lctf -lelf -lc

 137 
 138 yydebug := YYCFLAGS += -DYYDEBUG
 139 
 140 $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
 141 
 142 LFLAGS = -t -v
 143 YFLAGS = -d -v
 144 
 145 ROOTDLIBDIR = $(ROOT)/usr/lib/dtrace
 146 ROOTDLIBDIR64 = $(ROOT)/usr/lib/dtrace/64
 147 
 148 ROOTDLIBS = $(DLIBSRCS:%=$(ROOTDLIBDIR)/%)
 149 ROOTDOBJS = $(ROOTDLIBDIR)/$(DRTIOBJ) $(ROOTDLIBDIR)/$(LIBDAUDIT)
 150 ROOTDOBJS64 = $(ROOTDLIBDIR64)/$(DRTIOBJ) $(ROOTDLIBDIR64)/$(LIBDAUDIT)
 151 
 152 $(ROOTDLIBDIR)/%.d := FILEMODE=444
 153 $(ROOTDLIBDIR)/%.o := FILEMODE=444
 154 $(ROOTDLIBDIR64)/%.o := FILEMODE=444
 155 $(ROOTDLIBDIR)/%.so := FILEMODE=555
 156 $(ROOTDLIBDIR64)/%.so := FILEMODE=555
 157 
 158 .KEEP_STATE:
 159 
 160 all: $(LIBS) $(DRTIOBJ) $(LIBDAUDIT)
 161 
 162 lint: lintdlink lintcheck
 163 
 164 lintdlink: $(DLINKSRCS:%.c=../common/%.c)
 165         $(LINT.c) $(DLINKSRCS:%.c=../common/%.c) $(LDLIBS) -lc
 166 
 167 dt_lex.c: $(SRCDIR)/dt_lex.l dt_grammar.h
 168         $(LEX) $(LFLAGS) $(SRCDIR)/dt_lex.l > $@
 169 
 170 dt_grammar.c dt_grammar.h: $(SRCDIR)/dt_grammar.y
 171         $(YACC) $(YFLAGS) $(SRCDIR)/dt_grammar.y
 172         @mv y.tab.h dt_grammar.h
 173         @mv y.tab.c dt_grammar.c
 174 
 175 pics/dt_lex.o pics/dt_grammar.o := CFLAGS += $(YYCFLAGS)
 176 pics/dt_lex.o pics/dt_grammar.o := CFLAGS64 += $(YYCFLAGS)
 177 
 178 pics/dt_lex.o pics/dt_grammar.o := CERRWARN += -erroff=E_STATEMENT_NOT_REACHED
 179 pics/dt_lex.o pics/dt_grammar.o := CCVERBOSE =
 180 
 181 ../common/dt_errtags.c: ../common/mkerrtags.sh ../common/dt_errtags.h
 182         sh ../common/mkerrtags.sh < ../common/dt_errtags.h > $@
 183 
 184 ../common/dt_names.c: ../common/mknames.sh $(SRC)/uts/common/sys/dtrace.h
 185         sh ../common/mknames.sh < $(SRC)/uts/common/sys/dtrace.h > $@


 212 ../common/tcp.d: ..//common/tcp.sed ../common/tcp.d.in
 213         sed -f ../common/tcp.sed < ../common/tcp.d.in > $@
 214 
 215 ../common/udp.d: ../common/udp.sed ../common/udp.d.in
 216         sed -f ../common/udp.sed < ../common/udp.d.in > $@
 217 
 218 pics/%.o: ../$(MACH)/%.c
 219         $(COMPILE.c) -o $@ $<
 220         $(POST_PROCESS_O)
 221 
 222 pics/%.o: ../$(MACH)/%.s
 223         $(COMPILE.s) -o $@ $<
 224         $(POST_PROCESS_O)
 225 
 226 $(DRTIOBJ): $(DRTIOBJS)
 227         $(LD) -o $@ -r -Blocal -Breduce $(DRTIOBJS)
 228         $(POST_PROCESS_O)
 229 
 230 $(LIBDAUDIT): $(LIBDAUDITOBJS)
 231         $(LINK.c) -o $@ $(GSHARED) -h$(LIBDAUDIT) $(ZTEXT) $(ZDEFS) $(BDIRECT) \
 232             $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(LIBDAUDITOBJS) $(LDLIBS) \
 233             -lmapmalloc -lc -lproc
 234         $(POST_PROCESS_SO)
 235 
 236 $(ROOTDLIBDIR):
 237         $(INS.dir)
 238 
 239 $(ROOTDLIBDIR64): $(ROOTDLIBDIR)
 240         $(INS.dir)
 241 
 242 $(ROOTDLIBDIR)/%.d: ../common/%.d
 243         $(INS.file)
 244 
 245 $(ROOTDLIBDIR)/%.d: ../$(MACH)/%.d
 246         $(INS.file)
 247 
 248 $(ROOTDLIBDIR)/%.d: %.d
 249         $(INS.file)
 250 
 251 $(ROOTDLIBDIR)/%.o: %.o
 252         $(INS.file)