aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: fc31da36a0dfaca6eb010aba762489cc60e170ac (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# mpd-notification - Notify about tracks played by mpd

CC	:= gcc
INSTALL	:= install
RM	:= rm
CFLAGS	+= -O2 -Wall -Werror
CFLAGS	+= $(shell pkg-config --cflags --libs libmpdclient) \
	   $(shell pkg-config --cflags --libs libnotify)
VERSION	= $(shell git describe --tags --long)

all: mpd-notification.c
	$(CC) $(CFLAGS) -o mpd-notification mpd-notification.c \
		-DVERSION="\"$(VERSION)\""

install:
	$(INSTALL) -D -m0755 mpd-notification $(DESTDIR)/usr/bin/mpd-notification
	$(INSTALL) -D -m0644 mpd-notification.desktop $(DESTDIR)/etc/xdg/autostart/mpd-notification.desktop
clean:
	$(RM) -f *.o *~ mpd-notification