main Makefile
 1CC         ?= cc
 2PKG_CONFIG ?= pkg-config
 3CLIBS      != ${PKG_CONFIG} --cflags swc spng
 4LDLIBS     != ${PKG_CONFIG} --libs swc spng
 5CFLAGS     += -std=c99 -Wall -Wextra -Wshadow -Wno-unused-parameter -Oz -pedantic
 6LDFLAGS    += -Iinclude
 7PREFIX     ?= /usr/local
 8
 9###############
10
11howl      ?= howl
12howl_src  ?= src/ipc.c src/log.c src/decor.c src/howl.c
13
14howlc     ?= howlc
15howlc_src ?= src/client.c
16
17VERSION   ?= 0.2.0
18CFLAGS    += -D_XOPEN_SOURCE=700 -DVERSION=\"$(VERSION)\"
19
20###############
21
22.PHONY: all install uninstall clean
23
24all: $(howl) $(howlc)
25
26$(howl): $(howl_src)
27	@echo "Building howl..."
28	$(CC) $(CFLAGS) $(CLIBS) $(LDFLAGS) -o $(howl) $(howl_src) $(LDLIBS)
29
30$(howlc): $(howlc_src)
31	@echo "Building howlc..."
32	$(CC) $(CFLAGS) $(LDFLAGS) -o $(howlc) $(howlc_src)
33
34install: $(howl) $(howlc)
35	install -Dm755 $(howl)  $(DESTDIR)$(PREFIX)/bin/$(howl)
36	install -Dm755 $(howlc) $(DESTDIR)$(PREFIX)/bin/$(howlc)
37	install -Dm644 doc/howl.1 $(DESTDIR)$(PREFIX)/share/man/man1/howl.1
38	install -Dm644 doc/howlc.1 $(DESTDIR)$(PREFIX)/share/man/man1/howlc.1
39
40uninstall:
41	rm -f $(DESTDIR)$(PREFIX)/bin/$(howl)
42	rm -f $(DESTDIR)$(PREFIX)/bin/$(howlc)
43	rm -f $(DESTDIR)$(PREFIX)/share/man/man1/howl.1
44	rm -f $(DESTDIR)$(PREFIX)/share/man/man1/howlc.1
45
46clean:
47	rm -f $(howl) $(howlc)