On Tue, Nov 10, 2020 at 8:46 AM Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx> wrote: > > Enable out-of-tree build for runqslower. Only set OUTPUT=.output if it > wasn't already set by the user. > > Signed-off-by: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx> > --- > v3: > * Drop clean recipe for bpftool and libbpf, since the whole output > directories are removed by the clean recipe. > * Use ?= for $(OUTPUT) > --- > tools/bpf/runqslower/Makefile | 32 ++++++++++++++++++-------------- > 1 file changed, 18 insertions(+), 14 deletions(-) > [...] > clean: > $(call QUIET_CLEAN, runqslower) > - $(Q)rm -rf $(OUTPUT) runqslower > + $(Q)$(RM) -r $(BPFOBJ_OUTPUT) $(BPFTOOL_OUTPUT) > + $(Q)$(RM) $(OUTPUT)*.o $(OUTPUT)*.d > + $(Q)$(RM) $(OUTPUT)*.skel.h $(OUTPUT)vmlinux.h > + $(Q)$(RM) $(OUTPUT)runqslower > + $(Q)$(RM) -r .output hard-coding .output here doesn't seem right, didn't all the other lines clean up everything already? > > $(OUTPUT)/runqslower: $(OUTPUT)/runqslower.o $(BPFOBJ) > $(QUIET_LINK)$(CC) $(CFLAGS) $^ -lelf -lz -o $@ > @@ -59,8 +65,8 @@ $(OUTPUT)/%.bpf.o: %.bpf.c $(BPFOBJ) | $(OUTPUT) > $(OUTPUT)/%.o: %.c | $(OUTPUT) > $(QUIET_CC)$(CC) $(CFLAGS) $(INCLUDES) -c $(filter %.c,$^) -o $@ > [...]