Added rule to install the package out of the Makefile
[transforward.git] / Makefile
index 2065adc..7df2c24 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,9 @@ obj-m += transforward.o
 
 KVER=$(shell uname -r)
 ARCH=$(shell uname -m)
-DIST=fc18 # Is there an easy way of fetching this automatically, short of mapping /etc/redhat-release
+
+# Is there an easy way of fetching this automatically, short of mapping /etc/redhat-release
+DIST=fc18
 
 ifeq ($(wildcard /lib/modules/$(KVER)/build),) 
        KVER=3.10.6-100.$(DIST).$(ARCH)
@@ -13,3 +15,8 @@ all:
 
 clean:
        make -C /lib/modules/$(KVER)/build M=$(PWD) clean
+
+install:
+       install -D -m 755 transforward.ko /lib/modules/$(KVER)/net/transforward/transforward.ko
+       mkdir -p /etc/modules-load.d
+       install -m 644 transforward.conf /etc/modules-load.d/transforward.conf