-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (30 loc) · 862 Bytes
/
Makefile
File metadata and controls
37 lines (30 loc) · 862 Bytes
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
obj-m += hvisor.o
obj-m += ivc.o
ccflags-y += -I$(src)/../include
ccflags-y += -Wno-unused-variable
ccflags-y += -Wno-unused-function
ccflags-y += -fno-stack-protector
ccflags-y += -Wno-declaration-after-statement
ifndef CROSS_COMPILE
ifeq ($(ARCH), arm64)
CROSS_COMPILE := aarch64-none-linux-gnu-
else ifeq ($(ARCH), riscv)
CROSS_COMPILE := riscv64-unknown-linux-gnu-
else ifeq ($(ARCH), loongarch)
CROSS_COMPILE := loongarch64-unknown-linux-gnu-
else ifeq ($(ARCH), x86_64)
CROSS_COMPILE := x86_64-linux-gnu-
endif
endif
ifeq ($(ARCH), loongarch)
ccflags-y += -DLOONGARCH64
endif
ivc-y := ivc_driver.o
.SECONDARY: \
$(obj)/hivc_template.dtb.S \
$(obj)/hivc_template.dtb
.PHONY: all clean
all:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KDIR) M=$(shell pwd) modules
clean:
make -C $(KDIR) M=$(shell pwd) clean