summaryrefslogtreecommitdiff
blob: 2b04953ea9c4fad0dbfae86aaa439492985101c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--- spectrwm-2.3.0/linux/Makefile
+++ spectrwm-2.3.0/linux/Makefile
@@ -1,5 +1,5 @@
-CFLAGS+= -std=c99 -Wall -Wextra -Wmissing-prototypes -Wshadow -g -D_GNU_SOURCE -I. -I/usr/include/freetype2
-CFLAGS+= -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LVERS)\"
+CFLAGS+= -std=c99 -Wall -Wextra -Wmissing-prototypes -Wshadow -D_GNU_SOURCE -I. -I/usr/include/freetype2
+CFLAGS+= -DSWM_LIB=\"libswmhack.so.$(LVERS)\"
 LDADD+= -lX11 -lX11-xcb -lxcb -lxcb-icccm -lxcb-randr -lxcb-keysyms -lxcb-util -lxcb-xtest -lXft -lXcursor
 
 PREFIX?= /usr/local
@@ -29,10 +29,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)
@@ -45,9 +45,9 @@
 	install -m 644 ../spectrwm_it.1 $(DESTDIR)$(MANDIR)/man1/spectrwm_it.1
 	install -m 644 ../spectrwm_pt.1 $(DESTDIR)$(MANDIR)/man1/spectrwm_pt.1
 	install -m 644 ../spectrwm_ru.1 $(DESTDIR)$(MANDIR)/man1/spectrwm_ru.1
-	ln -sf $(BINDIR)/spectrwm $(DESTDIR)$(BINDIR)/scrotwm
-	ln -sf $(LIBDIR)/libswmhack.so.0.0 $(DESTDIR)$(LIBDIR)/libswmhack.so.0
-	ln -sf $(LIBDIR)/libswmhack.so.0.0 $(DESTDIR)$(LIBDIR)/libswmhack.so
+	ln -sf spectrwm $(DESTDIR)$(BINDIR)/scrotwm
+	ln -sf libswmhack.so.0.0 $(DESTDIR)$(LIBDIR)/libswmhack.so.0
+	ln -sf libswmhack.so.0.0 $(DESTDIR)$(LIBDIR)/libswmhack.so
 
 clean:
 	rm -f spectrwm *.o *.so libswmhack.so.* spectrwm.c swm_hack.c version.h