You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

41 lines
808 B

obj-m += rkkern.o
rkkern-objs += src/main.o src/hooks.o src/utils.o
default:
@echo
@echo "Build:"
@echo " make all"
@echo
@echo "Clean:"
@echo " make clean"
@echo
###########################################
# Compilation and Linking process
###########################################
.PHONY: .PREPARE all
.PREPARE:
@mkdir -p ../bin/
all: .PREPARE
@echo
@echo "Compiling rkkern!"
@$(MAKE) modules \
-C /lib/modules/$(shell uname -r)/build M=$(PWD)
@cp *.ko ../bin/
###########################################
# Clean up process
###########################################
.PHONY: clean .cleanbin
clean: .cleanbin
@rm -f .*.o.cmd
@rm -f rkkern.*
@rm -f .rkkern.*
@rm -rf *odule*
@rm -rf .tmp_versions/
@echo "Cleanup complete!"
.cleanbin:
@rm -f ../bin/*.ko
@echo "ELFs Removed!"