From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> The target for compiling from *.c to *.o in the samples directory had: $(bdir)/%.o: %.c But since the *.c files were extracted, they already included the $(bdir) in the name, so the above was really matching: $(bdir)/$(bdir)/*.c and not being used. Remove the extra $(bdir) from the target. This also exposed a bug that $(CFLAGS) was not included, and the stream.c failed to build because of the lacking -D_GNU_SOURCE. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- samples/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/Makefile b/samples/Makefile index 6ee57fecacbd..2d0d2397c5b4 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -60,10 +60,10 @@ $(EXAMPLES): $(patsubst %,$(bdir)/%,$(TARGETS)) ## name, and the file will not be discarded by make. # # $(bdir)/XX.o: $(bdir)/XX.c -# $(CC) -g -Wall -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) +# $(CC) -g -Wall $(CFLAGS) -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) -$(bdir)/%.o: %.c - $(CC) -g -Wall -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) +%.o: %.c + $(CC) -g -Wall $(CFLAGS) -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) clean: $(RM) $(bdir)/* -- 2.33.0