updates
This commit is contained in:
31
pcie_driver/Makefile
Executable file
31
pcie_driver/Makefile
Executable file
@@ -0,0 +1,31 @@
|
||||
BINARY := drexpcie_module
|
||||
KERNEL := /lib/modules/$(shell uname -r)/build
|
||||
ARCH := x86
|
||||
C_FLAGS := -Wall
|
||||
KMOD_DIR := $(shell pwd)
|
||||
TARGET_PATH := /lib/modules/$(shell uname -r)/kernel/drivers/char
|
||||
|
||||
OBJECTS := \
|
||||
drexpcie.o \
|
||||
drexdma.o \
|
||||
drexchar.o \
|
||||
|
||||
ccflags-y += $(C_FLAGS)
|
||||
|
||||
obj-m += $(BINARY).o
|
||||
|
||||
$(BINARY)-y := $(OBJECTS)
|
||||
|
||||
$(BINARY).ko:
|
||||
make -C $(KERNEL) M=$(KMOD_DIR) modules
|
||||
|
||||
install:
|
||||
cp $(BINARY).ko $(TARGET_PATH)
|
||||
depmod -a
|
||||
|
||||
uninstall:
|
||||
rm $(TARGET_PATH)/$(BINARY).ko
|
||||
depmod -a
|
||||
|
||||
clean:
|
||||
make -C $(KERNEL) M=$(KMOD_DIR) clean
|
||||
Reference in New Issue
Block a user