X-Git-Url: https://code.delx.au/spectrwm/blobdiff_plain/d8a7afac8a15aaf0796162ac2d949552e3ca035c..HEAD:/osx/Makefile diff --git a/osx/Makefile b/osx/Makefile index db7d3d9..898a1ac 100644 --- a/osx/Makefile +++ b/osx/Makefile @@ -1,27 +1,36 @@ -# To use homebrew instead of macports, uncomment the following three lines. +PREFIX?= /usr/local +BINDIR?= $(PREFIX)/bin +LIBDIR?= $(PREFIX)/lib +MANDIR?= $(PREFIX)/share/man + +BUILDVERSION = $(shell sh $(CURDIR)/../buildver.sh) + +# To use xquartz, uncomment the following three lines. +INCFLAGS+= -I/opt/X11/include -I/opt/X11/include/freetype2/ +LDADD+= -L/opt/X11/lib -lX11 -lXcursor -lXft + +# To use homebrew, uncomment the following three lines. #INCFLAGS+= -I/opt/X11/include #LDADD+= -lX11 -lXcursor -lXft -L/opt/X11/lib -#INCFLAGS+= -I/usr/local/Cellar/freetype/2.4.10/include/freetype2 +#INCFLAGS+= -I/usr/local/Cellar/freetype/2.5.0.1/include/freetype2 -# To use homebrew instead of macports, comment out the following two lines. -INCFLAGS+= -I/opt/local/include/freetype2 -I/opt/local/include -LDADD+= -L/opt/local/lib -lX11 -lXcursor -lXft +# To use homebrew , comment out the following two lines. +#INCFLAGS+= -I/opt/local/include/freetype2 -I/opt/local/include +#LDADD+= -L/opt/local/lib -lX11 -lXcursor -lXft LDADD+= -lxcb-keysyms -lxcb-util -lxcb-randr -lX11-xcb -lxcb-xtest -lxcb -lxcb-icccm +LVERS= $(shell . ../lib/shlib_version; echo $$major.$$minor) + CFLAGS+= -std=c99 -Wmissing-prototypes -Wall -Wextra -Wshadow -Wno-uninitialized -g CFLAGS+= -O2 -D_GNU_SOURCE -D__OSX__ -I. -I.. ${INCFLAGS} CFLAGS+= -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LVERS)\" - -PREFIX?= /usr/local -BINDIR?= $(PREFIX)/bin -LIBDIR?= $(PREFIX)/lib -MANDIR?= $(PREFIX)/share/man +ifneq ("${BUILDVERSION}", "") +CFLAGS+= -DSPECTRWM_BUILDSTR=\"$(BUILDVERSION)\" +endif CC?= cc -LVERS= $(shell . ../lib/shlib_version; echo $$major.$$minor) - all: spectrwm libswmhack.so.$(LVERS) spectrwm.c: @@ -50,10 +59,6 @@ install: all install -m 755 spectrwm $(DESTDIR)$(BINDIR) install -m 755 libswmhack.so.$(LVERS) $(DESTDIR)$(LIBDIR) install -m 644 ../spectrwm.1 $(DESTDIR)$(MANDIR)/man1/spectrwm.1 - install -m 644 ../spectrwm_es.1 $(DESTDIR)$(MANDIR)/man1/spectrwm_es.1 - 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 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