summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 12 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 31142b8..f8f93ad 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CFLAGS = -I src -g $(shell pkg-config --cflags glib-2.0 dbus-1)
-CFLAGS += -I lib/clist/include
+CFLAGS += -I lib/liblist/include
LDLIBS = -lcurses -lmpdclient $(shell pkg-config --libs glib-2.0 dbus-1)
DEPFLAGS = -MT $@ -MMD -MP -MF build/$*.d
@@ -7,23 +7,28 @@ ifeq "$(PROF)" "YES"
CFLAGS += -pg
endif
+BACKEND ?= mpd
+
SRCS = $(wildcard src/*.c)
-OBJS = $(SRCS:src/%.c=build/%.o)
+OBJS = $(SRCS:src/%.c=build/%.o) build/player_$(BACKEND).o
DEPS = $(OBJS:%.o=%.d)
-LIBLIST_A = lib/clist/build/liblist.a
+LIBLIST_A = lib/liblist/build/liblist.a
-.PHONY: all tmus clean install uninstall
+.PHONY: all tmus clean cleanlibs install uninstall
all: tmus
clean:
rm -rf build
+cleanlibs:
+ rm -rf lib/liblist/build
+
build:
mkdir build
-build/%.o: src/%.c build/%.d
+build/%.o: src/%.c build/%.d | build
$(CC) -c -o $@ $(DEPFLAGS) $(CFLAGS) $<
build/%.d: | build;
@@ -31,7 +36,7 @@ build/%.d: | build;
include $(DEPS)
$(LIBLIST_A):
- make -C lib/clist build/liblist.a
+ make -C lib/liblist build/liblist.a
tmus: $(OBJS) $(LIBLIST_A)
$(CC) -o tmus $^ $(CFLAGS) $(LDLIBS)
@@ -40,5 +45,5 @@ install:
install -m 755 tmus /usr/bin
uninstall:
- rm /usr/bin/tmus
+ rm -f /usr/bin/tmus