Print this page
8411 Build should warn when linking against libraries outside proto area

@@ -21,11 +21,11 @@
 #
 #
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#pragma ident   "%Z%%M% %I%     %E% SMI"
+# Copyright 2017 RackTop Systems.
 #
 
 PROG =          hald-addon-cpufreq
 OBJS =          addon-cpufreq.o logger.o adt_data.o
 SRCS =          addon-cpufreq.c ../../hald/logger.c ../../utils/adt_data.c

@@ -35,10 +35,15 @@
 
 ROOTCMDDIR =    $(ROOTLIB_HAL)
 
 LDLIBS +=       -lc -ldbus-1 -lhal -lglib-2.0 -ldbus-glib-1 -lpolkit -lbsm
 
+# Allow HAL to take some of its dependencies from outside the proto area.
+$(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libdbus-1.so
+$(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libglib-2.0.so
+$(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libdbus-glib-1.so
+
 CPPFLAGS +=     $(HAL_DBUS_CPPFLAGS) $(HAL_GLIB_CPPFLAGS) $(HAL_CONFIG_CPPFLAGS)
 CPPFLAGS +=     -I$(ROOT)/usr/include/hal -I../../hald
 CPPFLAGS +=     -I$(ROOT)/usr/include/libpolkit -g
 C99MODE =       $(C99_ENABLE)