UniversalMusicController/Makefile

20 lines
476 B
Makefile

CC ?= clang
CFLAGS ?= -O2 `pkg-config --cflags dbus-1` `pkg-config --libs dbus-1` -Wall -Wextra
PREFIX ?= /usr/local/bin
LDFLAGS ?= -ldbus-1 -lmpdclient
.PHONY: default
default: universalmusiccontroller
universalmusiccontroller: main.c dbus_client.o mpd_client.o metadata.o
$(CC) $(CFLAGS) -o $@ $^ ${LDFLAGS}
%.o: %.c
$(CC) $(CFLAGS) -c $^ -o $@
install: universalmusiccontroller
install universalmusiccontroller ${PREFIX}
clean:
rm -Rf *.o universalmusiccontroller