forked from sbates130272/io_peer_mem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (26 loc) · 709 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
#
# By default, the build is done against the running linux kernel source.
# To build against a different kernel source tree, set SYSSRC:
#
# make SYSSRC=/path/to/kernel/source
ifdef SYSSRC
KERNEL_SOURCES = $(SYSSRC)
else
KERNEL_UNAME := $(shell uname -r)
KERNEL_SOURCES = /lib/modules/$(KERNEL_UNAME)/build
endif
ifdef MOFEDSRC
MOFED_SOURCE = $(MOFEDSRC)
else
MOFED_SOURCE = /usr/src/ofa_kernel/default
endif
export KBUILD_EXTRA_SYMBOLS=$(MOFED_SOURCE)/Module.symvers
build: modules
.PHONY: build
install: modules_install
.PHONY: install
%::
$(MAKE) -C $(KERNEL_SOURCES) M=$$PWD MOFED_SOURCE=$(MOFED_SOURCE) $@
insmod: build
-sudo rmmod io_peer_mem
sudo insmod $$PWD/io_peer_mem.ko