blob: d842753f5d3806acc71fc45c4412a05c4cc0d29d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
CFLAGS = -I src -g -pg $(shell pkg-config --cflags glib-2.0 dbus-1)
LDLIBS = -lcurses -lmpdclient $(shell pkg-config --libs glib-2.0 dbus-1)
DEPFLAGS = -MT $@ -MMD -MP -MF build/$*.d
SRCS = $(wildcard src/*.c)
OBJS = $(SRCS:src/%.c=build/%.o)
DEPS = $(OBJS:%.o=%.d)
.PHONY: all tmus clean install uninstall
all: tmus
clean:
rm -rf build
build:
mkdir build
build/%.o: src/%.c build/%.d
$(CC) -c -o $@ $(DEPFLAGS) $(CFLAGS) $<
build/%.d: | build;
include $(DEPS)
tmus: $(OBJS)
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
install:
install -m 755 tmus /usr/bin
uninstall:
rm /usr/bin/tmus
|