Skip to content

Commit c28843f

Browse files
committed
common.mk: Make sure $OBJDIR is not overridden for libbpf compile
If $OBJDIR is set in the environment, that will be pulled in by the libbpf Makefile, which will result in objects ending up in the wrong directory where the tutorial bits can't find them. Make sure this doesn't happen by explicitly setting OBJDIR=. as a 'make' parameter when building libbpf. Reported-by: Steve Dickson <steved@redhat.com> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
1 parent 0a2894e commit c28843f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

common/common.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ $(OBJECT_LIBBPF):
9090
echo "May need to run git submodule update --init"; \
9191
exit 1; \
9292
else \
93-
cd $(LIBBPF_DIR) && $(MAKE) all; \
94-
mkdir -p build; DESTDIR=build $(MAKE) install_headers; \
93+
cd $(LIBBPF_DIR) && $(MAKE) all OBJDIR=.; \
94+
mkdir -p build; $(MAKE) install_headers DESTDIR=build OBJDIR=.; \
9595
fi
9696

9797
# Create dependency: detect if C-file change and touch H-file, to trigger

0 commit comments

Comments
 (0)