export CSTD=-std=gnu99 -pedantic
endif
+export TOPDIR=$(shell dirname $(CURDIR))
+ifeq (,$(VERSION))
+export VERSION=$(shell cat $(TOPDIR)/version)
+endif
+
+ifeq (,$(DESTDIR))
+export DESTDIR=/
+endif
+
bindir=/usr/bin/
libdir=/usr/lib/
pythondir=/usr/lib/python2.7/
moduledir=/lib/modules/`uname -r`/extra/
-srcdir=/usr/src/archipelago-kernel-dkms-VERSION/
+srcdir=/usr/src/archipelago-kernel-dkms-$(VERSION)/
ganetidir=/usr/share/ganeti/extstorage/vlmc/
INC=-I$(BASE)