One common scenario of software installation is:
$ ./configure
$ make
$ sudo make install
So that configuring and compiling are made on behalf of unprivileged user, and installing is performed with root privileges.
In Makefile's minstall target the $(PWD) variable is used to determine current directory. But given to `man sudo` the $PWD environmental variable isn't propagated nor set by sudo, so $(PWD) is empty when user invokes `sudo make install` and hence installation of kernel module fails.
Given to "GNU make" manual [1], `make` provides the $(CURDIR) variable, which has the same value as $(PWD), but it is guaranteed
to be set.
So I suggest to change all using of $(PWD) variable to use $(CURDIR) variable to fix this issue and achieve more portability for ipt-netflow. Patch against current git HEAD is attached.
[1] http://www.gnu.org/software/make/manual/html_node/Recursion.html (last paragraph).
Replace all $(PWD)s in Makefile.in to $(CURDIR)
Thanks.