diff -Nru spectrwm-3.1.0.orig/linux/Makefile spectrwm-3.1.0/linux/Makefile
--- spectrwm-3.1.0.orig/linux/Makefile	2017-10-04 14:09:54.457071082 +0200
+++ spectrwm-3.1.0/linux/Makefile	2017-10-04 14:14:40.116766035 +0200
@@ -11,7 +11,7 @@
 
 MAINT_CFLAGS   = -std=c99 -Wmissing-prototypes -Wall -Wextra -Wshadow -Wno-uninitialized -g
 MAINT_LDFLAGS  = -Wl,--as-needed
-MAINT_CPPFLAGS = -I. -D_GNU_SOURCE -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LIBVERSION)\"
+MAINT_CPPFLAGS = -I. -D_GNU_SOURCE
 
 ifneq ("${BUILDVERSION}", "")
 MAINT_CPPFLAGS += -DSPECTRWM_BUILDSTR=\"$(BUILDVERSION)\"
@@ -26,7 +26,7 @@
 LIB_CPPFLAGS = $(shell pkg-config --cflags x11)
 LIB_LDLIBS   = $(shell pkg-config --libs   x11) -ldl
 
-all: spectrwm libswmhack.so.$(LIBVERSION)
+all: spectrwm
 
 spectrwm: spectrwm.o linux.o
 	$(CC) $(MAINT_LDFLAGS) $(BIN_LDFLAGS) $(LDFLAGS) -o $@ $+ $(BIN_LDLIBS) $(LDLIBS)
diff -Nru spectrwm-3.1.0.orig/spectrwm.c spectrwm-3.1.0/spectrwm.c
--- spectrwm-3.1.0.orig/spectrwm.c	2017-10-04 14:09:54.457071082 +0200
+++ spectrwm-3.1.0/spectrwm.c	2017-10-04 14:13:46.335374611 +0200
@@ -274,9 +274,9 @@
 #define SWM_CONF_DEFAULT	(0)
 #define SWM_CONF_KEYMAPPING	(1)
 
-#ifndef SWM_LIB
+/* #ifndef SWM_LIB
 #define SWM_LIB			"/usr/local/lib/libswmhack.so"
-#endif
+#endif */
 
 char			**start_argv;
 xcb_atom_t		a_state;
@@ -3761,6 +3761,7 @@
 
 	close(xcb_get_file_descriptor(conn));
 
+	/*
 	if ((ret = getenv("LD_PRELOAD"))) {
 		if (asprintf(&ret, "%s:%s", SWM_LIB, ret) == -1) {
 			warn("spawn: asprintf LD_PRELOAD");
@@ -3771,6 +3772,7 @@
 	} else {
 		setenv("LD_PRELOAD", SWM_LIB, 1);
 	}
+	*/
 
 	if (asprintf(&ret, "%d", ws_idx) == -1) {
 		warn("spawn: asprintf SWM_WS");
