I try to compile a package on a fresh debian wheezy inside a VM (32bit Kernel):cd /tmp/wget https://github.com/freifunk-gluon/batman-adv-legacy/archive/master.ziprm -Rf batman-adv-legacy-masterunzip master.zipcd /tmp/batman-adv-legacy-master/makemake installBut I get the error/bin/sh: 1: cd: can't cd to /lib/modules/3.2.0-4-686-pae/buildMakefile:35: /lib/modules/3.2.0-4-686-pae/build is missing, please set KERNELPATH/tmp/batman-adv-legacy-master/gen-compat-autoconf.sh /tmp/batman-adv-legacy-master/compat-autoconf.hmake -C /lib/modules/3.2.0-4-686-pae/build M=/tmp/batman-adv-legacy-master PWD=/tmp/batman-adv-legacy-master modulesmake: *** /lib/modules/3.2.0-4-686-pae/build: No such file or directory.  Stop.I also tried:cd /lib/modules/$(uname -r)/ln -s /usr/src/batman-adv-2013.4.0/ buildcd -But then I get the errorgen-compat-autoconf.sh /tmp/batman-adv-legacy-master/compat-autoconf.hmake -C /lib/modules/3.2.0-4-686-pae/build M=/tmp/batman-adv-legacy-master PWD=/tmp/batman-adv-legacy-master modulesmake[1]: Entering directory `/usr/src/batman-adv-2013.4.0'make[1]: *** No rule to make target `modules'.  Stop.make[1]: Leaving directory `/usr/src/batman-adv-2013.4.0'I guess I have some packages missing, but which?
which packages are required to use make?
networking;make
You must install the linux headers package for your kernel version. Try something like the following for the metapackage:# apt-get install linux-headers-686-paeOn my system (amd64), you can see how the installed header package brings in the build directory you're missing:$ dpkg -L linux-headers-3.2.0-4-amd64 | grep ^/lib/modules/lib/modules/lib/modules/3.2.0-4-amd64/lib/modules/3.2.0-4-amd64/source/lib/modules/3.2.0-4-amd64/buildI should add that this is in particular to your case because you are trying to compile a kernel module. In general, you will need (besides make itself and the compilers for appropriate languages) the header packages for dependencies of the program. In Debian, these are generally found in packages with names like <project>-dev.