Print this page
5468 Missing dependencies in lib/Makefile

@@ -19,10 +19,11 @@
 # CDDL HEADER END
 #
 #
 # Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright (c) 2012 by Delphix. All rights reserved.
+# Copyright 2015 RackTop Systems.
 #
 
 LIBRARY = libdtrace.a
 VERS = .1
 

@@ -130,12 +131,11 @@
 CERRWARN += -_gcc=-Wno-parentheses
 CERRWARN += -_gcc=-Wno-uninitialized
 CERRWARN += -_gcc=-Wno-switch
 
 YYCFLAGS =
-LDLIBS += -lgen -lproc -lrtld_db -lnsl -lsocket -lctf -lelf -lc
-DRTILDLIBS = $(LDLIBS.lib) -lc
+$(LIBS) := LDLIBS += -lgen -lproc -lrtld_db -lnsl -lsocket -lctf -lelf -lc
 
 yydebug := YYCFLAGS += -DYYDEBUG
 
 $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
 

@@ -160,11 +160,11 @@
 all: $(LIBS) $(DRTIOBJ) $(LIBDAUDIT)
 
 lint: lintdlink lintcheck
 
 lintdlink: $(DLINKSRCS:%.c=../common/%.c)
-        $(LINT.c) $(DLINKSRCS:%.c=../common/%.c) $(DRTILDLIBS)
+        $(LINT.c) $(DLINKSRCS:%.c=../common/%.c) $(LDLIBS) -lc
 
 dt_lex.c: $(SRCDIR)/dt_lex.l dt_grammar.h
         $(LEX) $(LFLAGS) $(SRCDIR)/dt_lex.l > $@
 
 dt_grammar.c dt_grammar.h: $(SRCDIR)/dt_grammar.y

@@ -227,11 +227,11 @@
         $(LD) -o $@ -r -Blocal -Breduce $(DRTIOBJS)
         $(POST_PROCESS_O)
 
 $(LIBDAUDIT): $(LIBDAUDITOBJS)
         $(LINK.c) -o $@ $(GSHARED) -h$(LIBDAUDIT) $(ZTEXT) $(ZDEFS) $(BDIRECT) \
-            $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(LIBDAUDITOBJS) \
+            $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(LIBDAUDITOBJS) $(LDLIBS) \
             -lmapmalloc -lc -lproc
         $(POST_PROCESS_SO)
 
 $(ROOTDLIBDIR):
         $(INS.dir)