From a76be731a5e5262abf0c8deadf8f4f541559b9f8 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Fri, 6 Dec 2013 11:23:34 +0100 Subject: Fix build with '-Wl,--as-needed' The libraries need to be specified correctly to get '--as-needed' to work. Signed-off-by: Hannes Reinecke --- Makefile.am | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index e93aa8f..ba08924 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,21 +9,18 @@ AM_CFLAGS = -Wall -Wformat=2 -Werror -Wmissing-prototypes -Wstrict-prototypes ## rules for building fcoeadm fcoeadm_SOURCES = fcoeadm.c fcoeadm_display.c -fcoeadm_LDADD = lib/libutil.a libopenfcoe.a +fcoeadm_LDADD = lib/libutil.a libopenfcoe.a $(HBAAPI_LIBS) fcoeadm_CFLAGS = $(AM_CFLAGS) $(HBAAPI_CFLAGS) -fcoeadm_LDFLAGS = $(AM_LDFLAGS) $(HBAAPI_LIBS) ## rules for building fcoemon fcoemon_SOURCES = fcoemon.c -fcoemon_LDADD = lib/libutil.a +fcoemon_LDADD = lib/libutil.a -lrt fcoemon_CFLAGS = $(AM_CFLAGS) $(DCBD_CFLAGS) -fcoemon_LDFLAGS = $(AM_LDFLAGS) -lrt ## rules for building fcping fcping_SOURCES = fcping.c -fcping_LDADD = lib/libutil.a +fcping_LDADD = lib/libutil.a $(HBAAPI_LIBS) -lrt fcping_CFLAGS = $(AM_CFLAGS) $(HBAAPI_CFLAGS) -fcping_LDFLAGS = $(AM_LDFLAGS) $(HBAAPI_LIBS) -lrt ## rules for building fipvlan fipvlan_SOURCES = fipvlan.c -- 1.8.1.4