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:21:07 +0000 (16:21 -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 597071b58621f9e2c5bbc033a5d130dec4b588e5..319db79f11f3eb074d972552295615266408f484 100644 (file)
@@ -22,7 +22,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 b29eed4cf707821d8d695274d7387f2a72399150..c03859b7cbc9e36efdb60a4bff36421302c50f01 100644 (file)
@@ -21,7 +21,7 @@ LIBS = -ldl -llttng-ust
 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.026279 seconds and 4 git commands to generate.