1 CFLAGS+= -O2 -Wall -g -D_GNU_SOURCE -D__OSX__ -I. -I..
2 CFLAGS+= -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LVERS)\"
3 LDADD+= -L/usr/X11/lib/ -lX11 -lXrandr -lXtst
8 MANDIR?= $(PREFIX)/share/man
12 LVERS= $(shell . ../lib/shlib_version; echo $$major.$$minor)
14 all: spectrwm libswmhack.so.$(LVERS)
20 ln -sf ../lib/swm_hack.c
22 spectrwm: spectrwm.o osx.o
23 $(CC) $(LDFLAGS) -o $@ $+ $(LDADD)
26 $(CC) $(CFLAGS) -c -fpic -DPIC $+ -o $@
28 libswmhack.so.$(LVERS): swm_hack.so
29 $(CC) -shared -fpic -o libswmhack.so.$(LVERS) $(LDADD) swm_hack.so
30 # replace above line with this for OSX 10.5
31 # $(CC) -shared -bundle -fpic -o libswmhack.so.$(LVERS) $(LDADD) swm_hack.so
34 install -m 755 -d $(DESTDIR)$(BINDIR)
35 install -m 755 -d $(DESTDIR)$(LIBDIR)
36 install -m 755 -d $(DESTDIR)$(MANDIR)/man1
37 install -m 755 spectrwm $(DESTDIR)$(BINDIR)
38 install -m 755 libswmhack.so.$(LVERS) $(DESTDIR)$(LIBDIR)
39 install -m 644 ../spectrwm.1 $(DESTDIR)$(MANDIR)/man1/spectrwm.1
40 install -m 644 ../spectrwm_es.1 $(DESTDIR)$(MANDIR)/man1/spectrwm_es.1
41 install -m 644 ../spectrwm_it.1 $(DESTDIR)$(MANDIR)/man1/spectrwm_it.1
42 install -m 644 ../spectrwm_pt.1 $(DESTDIR)$(MANDIR)/man1/spectrwm_pt.1
43 install -m 644 ../spectrwm_ru.1 $(DESTDIR)$(MANDIR)/man1/spectrwm_ru.1
44 ln -sf $(DESTDIR)$(BINDIR)/spectrwm $(DESTDIR)$(BINDIR)/scrotwm
47 rm -f spectrwm *.o *.so libswmhack.so.* spectrwm.c swm_hack.c
49 .PHONY: all install clean