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.1.0-rc1~92 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fe09e87939cd73206aab807b5d729ff4a28a6ad6;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 3d043df4..1e3c9412 100644 --- a/doc/examples/easy-ust/Makefile +++ b/doc/examples/easy-ust/Makefile @@ -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 $@ $< diff --git a/doc/examples/gen-tp/Makefile b/doc/examples/gen-tp/Makefile index 518f0174..127fb95f 100644 --- a/doc/examples/gen-tp/Makefile +++ b/doc/examples/gen-tp/Makefile @@ -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 $@ $<