Add Makefile for debian linux (#10)
* Add Makefile for debian linux * Update Makefile remove the "\" brought from my shell script * add uninstall for the modules --------- Co-authored-by: root <root@wireguard.wireguard.local>
This commit is contained in:
parent
5a21ca29b7
commit
47adf5d36e
28
debian/Makefile
vendored
Normal file
28
debian/Makefile
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#
|
||||||
|
# apt update -y
|
||||||
|
# apt upgrade -y
|
||||||
|
# apt install --reinstall linux-headers-$(uname -r) -y
|
||||||
|
# apt install build-essential autoconf autogen libtool pkg-config libgmp3-dev bison flex libreadline-dev git libedit-dev libmnl-dev make dkms -y
|
||||||
|
# apt autoremove -y
|
||||||
|
#
|
||||||
|
|
||||||
|
obj-m += nft_fullcone.o
|
||||||
|
|
||||||
|
nft_fullcone-y := ../src/nft_ext_fullcone.o ../src/nf_nat_fullcone.o
|
||||||
|
|
||||||
|
KVERSION = $(shell uname -r)
|
||||||
|
|
||||||
|
all:
|
||||||
|
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
|
||||||
|
|
||||||
|
install:
|
||||||
|
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules_install
|
||||||
|
depmod -A
|
||||||
|
modprobe nft_fullcone
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rmmod nft_fullcone || echo "Please remove all nft rules with fullcone and run [rmmod nft_fullcone] manually"
|
||||||
|
rm -f /lib/modules/$(KVERSION)/extra/nft_fullcone.ko && depmod -A
|
||||||
|
|
||||||
|
clean:
|
||||||
|
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
|
Loading…
x
Reference in New Issue
Block a user