-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
38 lines (27 loc) · 733 Bytes
/
makefile
File metadata and controls
38 lines (27 loc) · 733 Bytes
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
35
36
37
38
.PHONY: clean install
PREFIX?=/usr/local
CFLAGS+=-Wall -std=gnu99
LDLIBS+=-lmpdclient
OBJECTS= $(patsubst %.c, %.o, $(wildcard *.c libs/*.c))
DEPS= $(wildcard *.h libs/*.h)
all: mpdinfo
debug: CFLAGS += -g
debug: mpdinfo
mpdinfo: $(OBJECTS)
%.o: %.c $(DEPS)
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c -o $@ $<
$(MAKE) -C docs
install:
install -m 0755 -D mpdinfo $(DESTDIR)$(PREFIX)/bin/mpdinfo
$(MAKE) -C docs install
run:
valgrind --leak-check=full ./mpdinfo -c sample.conf
clean:
$(RM) $(OBJECTS)
$(RM) mpdinfo
$(MAKE) -C docs clean
pack:
mkdir -p mpdinfo-1.1.0
cp -r *.h *.c makefile libs _mpdinfo README.md sample.conf mpdinfo-1.1.0
tar -czf packages/mpdinfo-1.1.0.tar.gz mpdinfo-1.1.0
rm -rf mpdinfo-1.1.0