summaryrefslogtreecommitdiffstats
path: root/kernel/tests/Makefile
blob: 56c819aae3ac5860713afcd83e5826cd10bc0adf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
obj-m += gsp_emulation_test.o

ccflags-y := -I$(PWD)/../ -I$(PWD)/../include

# Resolve open-iov-vfio.ko exports (gsp_emu_process_rpc,
# gsp_client_init_emulation, gsp_rpc_emulation_set, ...).
# Requires 'make kernel' (or 'make -C kernel') to have run first.
KBUILD_EXTRA_SYMBOLS := $(abspath $(PWD)/../Module.symvers)

KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)

all:
	$(MAKE) -C $(KDIR) M=$(PWD) modules

clean:
	$(MAKE) -C $(KDIR) M=$(PWD) clean

# Requires open-iov-vfio.ko loaded first (symbol dependency)
install:
	sudo insmod gsp_emulation_test.ko

uninstall:
	sudo rmmod gsp_emulation_test