diff --git a/src/Makefile b/src/Makefile
index dd65769a321c70e4883df53b2e981f74936ee568..2cf1ace502a7e2e4b08d327cf0842c2af1407917 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -8,10 +8,12 @@ ifndef BUILDDIR_NPTM
 override BUILDDIR_NPTM=$(BUILDDIR)/libnptm
 endif
 ifndef LIBNPTM
-# choose one of the two following lines, depending on whether a static or dynamic libnptm is wanted
-#override LIBNPTM=$(BUILDDIR_NPTM)/libnptm.a
+ifdef STATIC_NPTM
+override LIBNPTM=$(BUILDDIR_NPTM)/libnptm.a
+else
 override LIBNPTM=$(BUILDDIR_NPTM)/libnptm.so
 endif
+endif
 DOCSDIR=$(SRCDIR)/../doc
 
 all: $(BUILDDIR) $(SUBDIRS)