From: Niclas Zeising Date: Mon, 23 Jan 2012 11:59:47 +0000 (+0100) Subject: Fixes to the FreeBSD Makefile. X-Git-Tag: SCROTWM_0_11_0~26 X-Git-Url: https://code.delx.au/spectrwm/commitdiff_plain/4b0b728c4d2984c36d37339512e7695e7c791778 Fixes to the FreeBSD Makefile. - Remove X11BASE and replace it with LOCALBASE, since the former is deprecated. - Silently ignore if included files are not found. This way we do not depend on the FreeBSD ports tree being installed. - Add definitions for LOCALBASE and PREFIX in case they are not given from the included files. - Change MANDIR to ${PREFIX}/man instead of ${PREFIX}/share/man, to better match reality. ok marco --- diff --git a/freebsd/Makefile b/freebsd/Makefile index 2d97974..8b23a4d 100644 --- a/freebsd/Makefile +++ b/freebsd/Makefile @@ -1,6 +1,11 @@ +.sinclude + +PREFIX?= /usr/local +LOCALBASE?= /usr/local + BINDIR?= $(PREFIX)/bin LIBDIR?= $(PREFIX)/lib -MANDIR?= $(PREFIX)/share/man +MANDIR?= $(PREFIX)/man LVERS!= awk -F = '/major/ { printf( "%s.", $$2 ) } /minor/ { printf( "%s", $$2 ) }' ${.CURDIR}/../lib/shlib_version BUILDVERSION!= sh "${.CURDIR}/../buildver.sh" @@ -8,9 +13,9 @@ BUILDVERSION!= sh "${.CURDIR}/../buildver.sh" CFLAGS+= -DSCROTWM_BUILDSTR=\"$(BUILDVERSION)\" .endif -CFLAGS+= -Wall -Wno-uninitialized -I. -I${X11BASE}/include +CFLAGS+= -Wall -Wno-uninitialized -I. -I${LOCALBASE}/include CFLAGS+= -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LVERS)\" -LDADD+= -lutil -L${X11BASE}/lib -lX11 -lXrandr -lXtst +LDADD+= -lutil -L${LOCALBASE}/lib -lX11 -lXrandr -lXtst all: scrotwm libswmhack.so.$(LVERS) @@ -46,4 +51,4 @@ install: all clean: rm -f scrotwm *.o *.so libswmhack.so.* scrotwm.c swm_hack.c version.h -.include +.sinclude