File tree 3 files changed +12
-6
lines changed
3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ clean: clean-in-container clean-images ## Remove bpflock docker images including
51
51
# #@ Inside container targets
52
52
53
53
# This builds inside container
54
- .PHONY : container- bpf-tools
55
- container- bpf-tools : pre-build | defined-BASE_IMAGE # # Builds bpf tools using libbpf inside container.
56
- $(info MAKE: start building cbpf tools inside container )
54
+ .PHONY : bpf-programs
55
+ bpf-programs : pre-build # # Builds bpf programs using libbpf (will run inside container) .
56
+ $(info MAKE: start building bpf programs )
57
57
$(info MAKE -C bpf all)
58
58
@$(MAKE ) -C $(shell pwd) /bpf all
59
59
@@ -64,8 +64,9 @@ bpflock-daemon: pre-build | defined-BASE_IMAGE ## Build bpflock daemon inside co
64
64
@$(MAKE ) -C $(shell pwd) /cmd all
65
65
66
66
.PHONY : clean-in-container
67
- clean-in-container : # # Clean bpf-tools build directories.
67
+ clean-in-container : # # Clean bpf programs build directories.
68
68
@$(RM ) -R $(BUILD )
69
+ @$(MAKE ) -C $(shell pwd) /bpf clean
69
70
$(info Clean bpf-tools build directories)
70
71
71
72
# #@ Code checks and tests
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ $(BUILDLIB) $(BUILDLIB)/libbpf:
46
46
$(Q ) mkdir -p $@
47
47
48
48
$(LIBBPF_SRC ) :
49
- test -d $(LIBBPF_SRC ) || (echo " Error: libbpf sources are missing - please do: 'git submodule update --init'" ; false)
49
+ test -d $(LIBBPF_SRC ) || (echo " Error: libbpf sources are missing - please do: 'git submodule update --init --recursive '" ; false)
50
50
51
51
# Build libbpf.a
52
52
$(LIBBPF_OBJ ) : $(LIBBPF_SRC ) $(wildcard $(LIBBPF_SRC ) /* .[ch]) | $(BUILDLIB ) $(BUILDLIB ) /libbpf
@@ -75,6 +75,11 @@ $(BUILD)/%.skel.h: $(BUILD)/%.bpf.o | $(BUILD)
75
75
$(call msg,GEN-SKEL,$@ )
76
76
$(Q )$(BPFTOOL ) gen skeleton $< > $@
77
77
78
+ .PHONY : clean
79
+ clean :
80
+ @$(RM ) -R $(BUILD )
81
+
82
+ .PHONY : install
78
83
install : $(TARGETS )
79
84
$(call msg, INSTALL bpf programs)
80
85
$(Q )$(INSTALL ) -m 0755 -d $(DESTDIR )$(BINDIR )
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ WORKDIR /go/src/github.com/linux-lock/bpflock
36
36
COPY . .
37
37
38
38
# Make bpf tools and bpflock daemon
39
- RUN make container- bpf-tools
39
+ RUN make bpf-programs
40
40
RUN make bpflock-daemon
41
41
42
42
# Generate runtime image
You can’t perform that action at this time.
0 commit comments