--- linux/Makefile.old 2011-10-08 12:02:29.917207139 +0200 +++ linux/Makefile 2011-10-08 12:05:42.244203200 +0200 @@ -1,7 +1,7 @@ # $scrotwm: Makefile,v 1.6 2011/08/10 13:44:36 marco Exp $ -CFLAGS+= -Wall -ggdb -D_GNU_SOURCE -I. -CFLAGS+= -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LVERS)\" +CFLAGS+= -D_GNU_SOURCE -I. +CFLAGS+= -DSWM_LIB=\"libswmhack.so.$(LVERS)\" LDADD+= -lX11 -lXrandr -lXtst PREFIX?= /usr/local @@ -9,7 +9,7 @@ LIBDIR?= $(PREFIX)/lib MANDIR?= $(PREFIX)/share/man -CC= gcc +CC?= gcc LVERS= $(shell . ../lib/shlib_version; echo $$major.$$minor) @@ -25,10 +25,10 @@ $(CC) $(LDFLAGS) -o $@ $+ $(LDADD) %.so: %.c - $(CC) $(CFLAGS) -c -fpic -DPIC $+ -o $@ + $(CC) $(LDFLAGS) $(CFLAGS) -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)