| obj-m := pf_ring.o |
| |
| EXTRA_CFLAGS += -I$(PWD) -I$(PWD)/linux |
| |
| HERE=$(PWD) |
| |
| # set the install path |
| INSTDIR := $(DESTDIR)/lib/modules/$(BUILD_KERNEL)/kernel/net/pf_ring |
| TARGETDIR := $(DESTDIR)/usr/src/$(BUILD_KERNEL)/include/linux/ |
| |
| all: pf_ring_dd install |
| |
| pf_ring_dd: Makefile pf_ring.c linux/pf_ring.h |
| @if test "$(USER)" = "root"; then \ |
| echo "********** WARNING WARNING WARNING **********"; \ |
| echo "*"; \ |
| echo "* Compiling PF_RING as root might lead you to compile errors"; \ |
| echo "* Please compile PF_RING as unpriviliged user"; \ |
| echo "*"; \ |
| echo "*********************************************"; \ |
| fi |
| make -C $(LINUX_DIR) SUBDIRS=$(PWD) EXTRA_CFLAGS='$(EXTRA_CFLAGS)' M=`pwd` modules |
| cd plugins; make |
| |
| clean: |
| make -C $(LINUX_DIR) SUBDIRS=$(PWD) clean |
| \rm -f *~ Module.symvers Module.markers modules.order *# |
| |
| install: |
| mkdir -p $(INSTDIR) |
| cp *.ko $(INSTDIR) |
| cp linux/pf_ring.h $(DESTDIR)/usr/include/linux |
| @if test -d ${TARGETDIR}; then \ |
| cp linux/pf_ring.h ${TARGETDIR}; \ |
| fi |