In some environments, libm.so may not be available, so
only link those executables (in this case, just rtop) which
require libm with libm.

Signed-off-by: Corey Ashford <cjash...@linux.vnet.ibm.com>
---
 perf_examples/Makefile |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/perf_examples/Makefile b/perf_examples/Makefile
index 1949d5a..3066a88 100644
--- a/perf_examples/Makefile
+++ b/perf_examples/Makefile
@@ -44,7 +44,6 @@ CFLAGS += -DCONFIG_PFMLIB_ARCH_CRAYXT
 endif
 
 CFLAGS+= -I. -D_GNU_SOURCE
-LIBS += -lm
 
 ifeq ($(SYS),Linux)
 CFLAGS+= -pthread
@@ -69,7 +68,7 @@ all: $(TARGETS) $(XTRA)
 # Many systems don't have ncurses-devel installed
 #
 rtop: rtop.o $(PFMLIB)
-       -$(CC) $(CFLAGS) $(LDFLAGS) -D_GNU_SOURCE -o $@ $^ $(LIBS)  -lpthread 
-lncurses
+       -$(CC) $(CFLAGS) $(LDFLAGS) -D_GNU_SOURCE -o $@ $^ $(LIBS)  -lpthread 
-lncurses -lm
 
 $(TARGETS):  %:%.o $(LPC_UTILS) $(PFMLIB) $(PERF_EVENT_HDR)
        $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $^ $(LIBS) 
-- 
1.7.0.4


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to