Fix: examples Makefiles should pass $(LIBS) at last
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 18 Apr 2012 20:17:56 +0000 (16:17 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 18 Apr 2012 20:17:56 +0000 (16:17 -0400)
Fixes #210

Description

Since Ubuntu 11.10, the "--as-needed" option is given by default to ld
(linker). This option breaks the makefiles given with the userspace
tracing examples. Therefore the libraries against which the program
should be linked should be passed at last:
$(CC) -o $@ $^ $(LIBS)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/examples/easy-ust/Makefile
doc/examples/gen-tp/Makefile

index 3d043df428f51f02e1c9c05cfbb8be082f0b8924..1e3c941268f5aad546509faa466fccebbfdfbd64 100644 (file)
@@ -23,7 +23,7 @@ CFLAGS = -I.
 all: sample
 
 sample: sample.o tp.o
-       $(CC) $(LIBS) -o $@ $^
+       $(CC) -o $@ $^ $(LIBS)
 
 sample.o: sample.c sample_component_provider.h
        $(CC) $(CFLAGS) -c -o $@ $<
index 518f017498b279814aa992c10d03133cc2b6fb45..127fb95f2ddbf37e0c10268b82d44faf29b81521 100644 (file)
@@ -23,7 +23,7 @@ LIBS = -ldl -llttng-ust               #On Linux
 all: sample
 
 sample: sample.o sample_tracepoint.o
-       $(CC) $(LIBS) -o $@ $^
+       $(CC) -o $@ $^ $(LIBS)
 
 sample.o: sample.c sample_tracepoint.h
        $(CC) $(CFLAGS) -c -o $@ $<
This page took 0.027544 seconds and 4 git commands to generate.