]> git.lizzy.rs Git - bspwm.git/blob - Makefile
Fix "alternate" command, min width,height is 1,1
[bspwm.git] / Makefile
1 VERSION = 0.01
2
3 CC      = gcc
4 LIBS    = `pkg-config --libs xcb xcb-ewmh xcb-icccm lua`
5 CFLAGS  = -g -std=c99 -pedantic -Wall -Wextra
6 LDFLAGS = $(LIBS)
7
8 PREFIX    ?= /usr/local
9 BINPREFIX = $(PREFIX)/bin
10
11 WM_SRC = bspwm.c events.c luautils.c messages.c ewmh.c settings.c utils.c tree.c types.c rules.c window.c
12 CL_SRC = bspc.c
13
14 WM_OBJ = $(WM_SRC:.c=.o)
15 CL_OBJ = $(CL_SRC:.c=.o)
16
17 all: options clean bspwm bspc
18
19 options:
20 #       @echo "bspwm build options:"
21 #       @echo "CC      = $(CC)"
22 #       @echo "CFLAGS  = $(CFLAGS)"
23 #       @echo "LDFLAGS = $(LDFLAGS)"
24 #       @echo "PREFIX  = $(PREFIX)"
25
26 .c.o:
27 #       @echo "CC $<"
28         @$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<
29
30 bspwm:  $(WM_OBJ)
31 #       @echo CC -o $@
32         @$(CC) -o $@ $(WM_OBJ) $(LDFLAGS)
33
34 bspc:   $(CL_OBJ)
35 #       @echo CC -o $@
36         @$(CC) -o $@ $(CL_OBJ) $(LDFLAGS)
37
38 clean:
39 #       @echo "cleaning"
40         @rm -f $(WM_OBJ) $(CL_OBJ) bsp{wm,c}
41
42 install: all
43 #       @echo "installing executable files to $(DESTDIR)$(BINPREFIX)"
44         @install -D -m 755 bspwm $(DESTDIR)$(BINPREFIX)/bspwm
45         @install -D -m 755 bspc $(DESTDIR)$(BINPREFIX)/bspc
46
47 uninstall:
48 #       @echo "removing executable files from $(DESTDIR)$(BINPREFIX)"
49         @rm -f $(DESTDIR)$(BINPREFIX)/bsp{wm,c}
50
51 .PHONY: all options clean install uninstall