--- scrotwm-0.10.0/work/scrotwm-0.10.0/linux/Makefile.orig 2012-01-27 16:30:23.673422152 +0100 +++ scrotwm-0.10.0/work/scrotwm-0.10.0/linux/Makefile 2012-01-27 16:32:12.309064021 +0100 @@ -1,5 +1,5 @@ -CFLAGS+= -Wall -ggdb -D_GNU_SOURCE -I. -CFLAGS+= -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LVERS)\" +CFLAGS+= -Wall -D_GNU_SOURCE -I. +CFLAGS+= -DSWM_LIB=\"libswmhack.so.$(LVERS)\" LDADD+= -lX11 -lXrandr -lXtst PREFIX?= /usr/local @@ -7,7 +7,7 @@ LIBDIR?= $(PREFIX)/lib MANDIR?= $(PREFIX)/share/man -CC= gcc +CC ?= gcc LVERS= $(shell . ../lib/shlib_version; echo $$major.$$minor) @@ -24,10 +24,10 @@ $(CC) $(LDFLAGS) -o $@ $+ $(LDADD) %.so: %.c - $(CC) $(CFLAGS) -c -fpic -DPIC $+ -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) -c -fpic -DPIC $+ -o $@ libswmhack.so.$(LVERS): swm_hack.so - $(CC) -shared -fpic -o libswmhack.so.$(LVERS) swm_hack.so $(LDADD) + $(CC) $(LDFLAGS) -Wl,-soname,$@ -shared -fpic -o libswmhack.so.$(LVERS) swm_hack.so $(LDADD) install: all install -m 755 -d $(DESTDIR)$(BINDIR)