]> Pileus Git - wmpus/blob - makefile
Add fullscreen support
[wmpus] / makefile
1 # wmpus - cross platofrm window manager
2 # See LICENSE file for copyright and license details.
3
4 undefine CC
5
6 -include config.mk
7
8 VERSION   ?= 0.1-p0
9 WM        ?= wmii
10 SYS       ?= x11
11 CFLAGS    ?= -g -Wall
12 PREFIX    ?= /usr/local
13 MANPREFIX ?= ${PREFIX}/share/man
14
15 ifeq ($(SYS),x11)
16 CC        ?= gcc
17 PROG      ?= wmpus
18 LDFLAGS   += -lX11 -lXinerama
19 endif
20
21 ifeq ($(SYS),win32)
22 CC        ?= i686-pc-mingw32-gcc
23 PROG      ?= wmpus.exe
24 CFLAGS    += -D_MODE_T_
25 LDFLAGS   += -lgdi32
26 endif
27
28 all: $(PROG)
29
30 clean:
31         rm -f wmpus *.exe *.o
32
33 dist:
34         tar -czf wmpus-$(VERSION).tar.gz --transform s::wmpus-$(VERSION)/: \
35                 README LICENSE config.mk.example makefile *.1 *.c *.h
36
37 install: all
38         install -m 755 -D $(PROG) $(DESTDIR)$(PREFIX)/bin/$(PROG)
39         install -m 644 -D wmpus.1 $(DESTDIR)$(MANPREFIX)/man1/wmpus.1
40
41 uninstall:
42         rm -f $(DESTDIR)$(PREFIX)/bin/$(PROG)
43         rm -f $(DESTDIR)$(MANPREFIX)/man1/wmpus.1
44
45 $(PROG): main.o conf.o util.o sys-$(SYS).o wm-$(WM).o
46         $(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS)
47
48 %.o: %.c $(wildcard *.h) makefile
49         $(CC) $(CFLAGS) --std=gnu99 -c -o $@ $<
50
51 .PHONY: all clean dist install uninstall