-
Notifications
You must be signed in to change notification settings - Fork 579
/
Makefile
52 lines (39 loc) · 1.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
ifeq ("$(origin V)", "command line")
VERBOSE = $(V)
endif
ifndef VERBOSE
VERBOSE = 0
endif
ifeq ($(VERBOSE),0)
MAKEFLAGS += --no-print-directory
Q = @
endif
LESSONS = $(wildcard basic*) $(wildcard packet*) $(wildcard tracing??-*)
# LESSONS += advanced03-AF_XDP
LESSONS_CLEAN = $(addsuffix _clean,$(LESSONS))
.PHONY: clean clobber distclean $(LESSONS) $(LESSONS_CLEAN)
all: lib $(LESSONS)
clean: $(LESSONS_CLEAN)
@echo; echo common; $(MAKE) -C common clean
@echo; echo lib; $(MAKE) -C lib clean
lib: config.mk check_submodule
@echo; echo $@; $(MAKE) -C $@
$(LESSONS):
@echo; echo $@; $(MAKE) -C $@
$(LESSONS_CLEAN):
@echo; echo $@; $(MAKE) -C $(subst _clean,,$@) clean
config.mk: configure
@sh configure
clobber:
@touch config.mk
$(Q)$(MAKE) clean
$(Q)rm -f config.mk
distclean: clobber
check_submodule:
@if [ -d .git ] && `git submodule status lib/libbpf | grep -q '^+'`; then \
echo "" ;\
echo "** WARNING **: git submodule SHA-1 out-of-sync" ;\
echo " consider running: git submodule update" ;\
echo "" ;\
fi\