From: Mathieu Desnoyers Date: Wed, 18 Apr 2012 20:17:56 +0000 (-0400) Subject: Fix: examples Makefiles should pass $(LIBS) at last X-Git-Tag: v2.0.2~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ec1adbb8cbf77babf59853b24460840e9895cf91;p=lttng-ust.git Fix: examples Makefiles should pass $(LIBS) at last 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 --- diff --git a/doc/examples/easy-ust/Makefile b/doc/examples/easy-ust/Makefile index 597071b5..319db79f 100644 --- a/doc/examples/easy-ust/Makefile +++ b/doc/examples/easy-ust/Makefile @@ -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 $@ $< diff --git a/doc/examples/gen-tp/Makefile b/doc/examples/gen-tp/Makefile index b29eed4c..c03859b7 100644 --- a/doc/examples/gen-tp/Makefile +++ b/doc/examples/gen-tp/Makefile @@ -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 $@ $<