-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (34 loc) · 1017 Bytes
/
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
KDIR ?= /lib/modules/$(KVER)/build
ifeq ($(findstring 6.1.,$(KVER)),6.1.)
SRC_VERSION := v6.1
else ifeq ($(findstring 6.2.,$(KVER)),6.2.)
SRC_VERSION := v6.2
else ifeq ($(findstring 6.3.,$(KVER)),6.3.)
SRC_VERSION := v6.3
else ifeq ($(findstring 6.4.,$(KVER)),6.4.)
SRC_VERSION := v6.4
else ifeq ($(findstring 6.5.,$(KVER)),6.5.)
SRC_VERSION := v6.5
else ifeq ($(findstring 6.6.,$(KVER)),6.6.)
SRC_VERSION := v6.6
else ifeq ($(findstring 6.7.,$(KVER)),6.7.)
SRC_VERSION := v6.7
else ifeq ($(findstring 6.8.,$(KVER)),6.8.)
SRC_VERSION := v6.8
else
$(error not implemented for KVER=$(KVER))
endif
default:
@echo "KVER=$(KVER)"
@echo "KDIR=$(KDIR)"
@echo "PWD=$(PWD)"
@echo "SRC_VERSION=$(SRC_VERSION)"
$(MAKE) -C $(KDIR) M=$$PWD/src/$(SRC_VERSION) CONFIG_VXLAN=m
@mkdir -p ./vxlan2
@cp $$PWD/src/$(SRC_VERSION)/vxlan2.ko ./vxlan2/vxlan2.ko
clean:
@echo "KVER=$(KVER)"
@echo "KDIR=$(KDIR)"
@echo "PWD=$(PWD)"
@echo "SRC_VERSION=$(SRC_VERSION)"
$(MAKE) -C $(KDIR) M=$$PWD/src/$(SRC_VERSION) clean