]> code.delx.au - spectrwm/commitdiff
Fixes to the FreeBSD Makefile.
authorNiclas Zeising <zeising@daemonic.se>
Mon, 23 Jan 2012 11:59:47 +0000 (12:59 +0100)
committerLawrence Teo <lteo@lteo.net>
Tue, 24 Jan 2012 02:00:56 +0000 (21:00 -0500)
- 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

freebsd/Makefile

index 2d97974dd6fe225d902a0fb35abc6c4908d8c1b5..8b23a4df7c47a8c79a43af76e0f8b157baa16062 100644 (file)
@@ -1,6 +1,11 @@
+.sinclude <bsd.port.pre.mk>
+
+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 <bsd.port.mk>
+.sinclude <bsd.port.post.mk>