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.
8008135/Makefile

39 lines
700 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
# Includes for header files etc
ccflags-y := -I$(SRCS_H) -I$(LIBS_H) -I$(INCL_H)
all:
$(shell $(SRCS_S)/create_sysgen.sh)
$(MAKE) -C $(BUILDDIR) M=$(PWD) modules
load:
insmod $(MNAME).ko
unload:
rmmod $(MNAME)
clean:
-rm $(SRCS_H)/sysgen.h
$(MAKE) -C $(BUILDDIR) M=$(PWD) clean