Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaozhangchannel committed Jun 18, 2024
1 parent c2865d0 commit ba0b6d6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions eBPF_Supermarket/Network_Subsystem/net_manager/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ P:= >/dev/null
endif

# Detect submodule libbpf source file changes
LIBBPF_SOURCES := $(wildcard libbpf/src/*.[ch])
LIB := ../../../lib
LIBBPF_ROOT := $(abspath $(LIB)/libbpf)
LIBBPF_SOURCES := $(wildcard $(LIBBPF_ROOT)/src*.[ch])

$(LIB_INSTALL)/lib/libbpf.a: $(LIBBPF_SOURCES)
@echo ; echo " libbpf"
$(QUIET_CC)$(MAKE) -C libbpf/src CFLAGS="$(LIBBPF_CFLAGS)" $P
$(QUIET_INSTALL)$(MAKE) -C libbpf/src DESTDIR=../../$(LIB_INSTALL) PREFIX= install_headers $P
$(Q)cp -fp libbpf/src/libbpf.a install/lib/
$(QUIET_CC)$(MAKE) -C $(LIBBPF_ROOT)/src CFLAGS="$(LIBBPF_CFLAGS)" $P
$(QUIET_INSTALL)$(MAKE) -C $(LIBBPF_ROOT)/src DESTDIR=../../$(LIB_INSTALL) PREFIX= install_headers $P
$(Q)cp -fp $(LIBBPF_ROOT)/src/libbpf.a install/lib/

.PHONY: libbpf_clean
libbpf_clean:
Expand Down

0 comments on commit ba0b6d6

Please sign in to comment.