summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2014-03-21 18:47:05 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2014-03-21 18:47:05 +0100
commit110187730599c95c65717161bd6decd309064527 (patch)
treecc24820bd84dd7a47819e454e534b49f6bbb5839
parent4935bb73c0172609b44bcdd4d70fb362e98f48b3 (diff)
downloadcwm-110187730599c95c65717161bd6decd309064527.tar.gz
cwm-110187730599c95c65717161bd6decd309064527.tar.xz
cwm-110187730599c95c65717161bd6decd309064527.zip
Make PREFIX, MANPATH and CFLAGS optional variables
This change will make it possible to override PREFIX, MANPATH and
CFLAGS using environment variables. This makes the Makefile a little
more flexible, benefiting both endusers and those porting to package
systems like FreeBSD Ports and pkgsrc.

By braakvaak@aol.com.
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f30d339..6d2929f 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
 
 PROG=		cwm
 
-PREFIX=         /usr/local
+PREFIX?=	/usr/local
 
 SRCS=		calmwm.c screen.c xmalloc.c client.c menu.c \
 		search.c util.c xutil.c conf.c xevents.c group.c \
@@ -16,11 +16,11 @@ OBJS=		calmwm.o screen.o xmalloc.o client.o menu.o \
 
 CPPFLAGS+=	`pkg-config --cflags fontconfig x11 xft xinerama xrandr`
 
-CFLAGS=		-Wall -O2 -g -D_GNU_SOURCE
+CFLAGS?=	-Wall -O2 -g -D_GNU_SOURCE
 
 LDFLAGS+=	`pkg-config --libs fontconfig x11 xft xinerama xrandr`
 
-MANPREFIX=	${PREFIX}/share/man
+MANPREFIX?=	${PREFIX}/share/man
 
 all: ${PROG}