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>
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 $@ $<
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 $@ $<