]> git.lizzy.rs Git - bspwm.git/blobdiff - Makefile
Handle optional desktop name in 'list'
[bspwm.git] / Makefile
index fc508d997854e80280a8e7a03c93b64d09869469..ecfc7db16da678ff5b8050473c171ff6c555bd4b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,13 @@
-VERSION = 0.1
+VERSION = 0.2
 
 CC      = gcc
-LIBS    = -lm -lxcb -lxcb-icccm -lxcb-ewmh
-CFLAGS  = -std=c99 -pedantic -Wall -Wextra
+LIBS    = -lm -lxcb -lxcb-icccm -lxcb-ewmh -lxcb-xinerama
+CFLAGS  = -std=c99 -pedantic -Wall -Wextra -DVERSION=\"$(VERSION)\"
 LDFLAGS = $(LIBS)
 
 PREFIX    ?= /usr/local
 BINPREFIX = $(PREFIX)/bin
+MANPREFIX = $(PREFIX)/share/man
 
 WM_SRC = bspwm.c events.c messages.c ewmh.c settings.c helpers.c tree.c types.c rules.c window.c
 CL_SRC = bspc.c helpers.c
@@ -14,13 +15,13 @@ CL_SRC = bspc.c helpers.c
 WM_OBJ = $(WM_SRC:.c=.o)
 CL_OBJ = $(CL_SRC:.c=.o)
 
-debug: CFLAGS += -O0 -g -DDEBUG
-debug: options bspwm bspc
-
 all: CFLAGS += -Os
 all: LDFLAGS += -s
 all: options bspwm bspc
 
+debug: CFLAGS += -O0 -g -DDEBUG
+debug: options bspwm bspc
+
 options:
        @echo "bspwm build options:"
        @echo "CC      = $(CC)"
@@ -48,9 +49,13 @@ install:
        @echo "installing executable files to $(DESTDIR)$(BINPREFIX)"
        @install -D -m 755 bspwm $(DESTDIR)$(BINPREFIX)/bspwm
        @install -D -m 755 bspc $(DESTDIR)$(BINPREFIX)/bspc
+       @echo "installing manual page to $(DESTDIR)$(MANPREFIX)/man1"
+       @install -D -m 644 bspwm.1 $(DESTDIR)$(MANPREFIX)/man1/bspwm.1
 
 uninstall:
        @echo "removing executable files from $(DESTDIR)$(BINPREFIX)"
        @rm -f $(DESTDIR)$(BINPREFIX)/bsp{wm,c}
+       @echo "removing manual page from $(DESTDIR)$(MANPREFIX)/man1"
+       @rm -f $(DESTDIR)$(MANPREFIX)/man1/bspwm.1
 
-.PHONY: all options clean install uninstall
+.PHONY: all debug options clean install uninstall