-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·84 lines (68 loc) · 1.8 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
CONFIG_MODULE_SIG=y
CONFIG_MODULE_SIG_ALL=y
GIT_COMMIT := $(shell git log -1 --pretty=format:"%h")
ifeq ($(KDIR),)
KDIR := $(KERNEL_SRC)
endif
ifeq ($(KDIR),)
KDIR := /lib/modules/$(shell uname -r)/build
endif
ifndef target
target := platform
$(info Defaulting to PLATFORM host interface driver)
endif
ifeq ($(target),pcie_c10)
edge_lkm_mod := edgx_lkm_c10
else
edge_lkm_mod := edgx_lkm
endif
obj-m += $(edge_lkm_mod).o
EXTRA_CFLAGS=-I$(PWD)
$(edge_lkm_mod)-objs := \
edge_ac.o \
edge_br_fdb.o \
edge_br_vlan.o \
edge_bridge.o \
edge_com.o \
edge_com_dma.o \
edge_com_xmii.o \
edge_com_ts.o \
edge_link.o \
edge_preempt.o \
edge_psfp.o \
edge_sched.o \
edge_sched_hw.o \
edge_stat.o \
edge_fqtss.o \
edge_br_sid.o \
edge_frer.o \
edge_mdio.o \
edge_port.o \
edge_time.o \
tsnic_vpd.o \
ifeq ($(target),platform)
$(edge_lkm_mod)-objs += edge_platform.o
endif
ifeq ($(target),pcie)
$(edge_lkm_mod)-objs += edge_pcie.o
endif
ifdef CONFIG_GPIOLIB
$(edge_lkm_mod)-objs += altera_pio.o
endif
ifeq ($(target),pcie_c10)
$(edge_lkm_mod)-objs += edge_pcie_c10.o
endif
all :
@echo Building via $(KDIR)
KCPPFLAGS="-D_EDGX_GIT="$(GIT_COMMIT) $(MAKE) -C $(KDIR) M=$(PWD) modules
modules_install :
@echo Building via $(KDIR)
$(MAKE) -C $(KDIR) M=$(PWD) modules_install
coccicheck:
@echo Coccichecking via $(KDIR)
$(MAKE) -C $(KDIR) M=$(PWD) MODE=report coccicheck
rebuild : clean all
clean :
@echo Cleaning
$(MAKE) -C $(KDIR) M=$(PWD) clean