forked from skaman/shairport
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (30 loc) · 1.03 KB
/
Makefile
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
39
#CFLAGS+=-Wall $(shell pkg-config --cflags openssl)
CFLAGS+=-Wall $(shell pkg-config --cflags openssl) -DDISABLESTUFF
DEBUGCFLAGS+=-DDEBUGCTL
#DEBUGCFLAGS+=-DDEBUGCTL -DDEBUGSTUFF -DDEBUGALSA -DDEBUGBUFWRITE -g
#DEBUGCFLAGS+=-DDEBUGBUFWRITE -g
#DEBUGCFLAGS+=-DDEBUGSTUFF
AUDIO:=ao
VOL:=alsa
ifneq ($(VOL),soft)
USECFLAGS:=$(shell pkg-config --cflags alsa)
USELDFLAGS:=$(shell pkg-config --libs alsa)
else
CFLAGS+=-DSOFT_VOL
endif
LDFLAGS+=-lm -lpthread $(shell pkg-config --libs openssl)
USECFLAGS+=$(shell pkg-config --cflags $(AUDIO))
USELDFLAGS+=$(shell pkg-config --libs $(AUDIO))
USEOBJS+=socketlib.o shairport.o alac.o hairtunes.o audio_$(AUDIO).o vol_$(VOL).o
all: shairport
shairport: $(USEOBJS)
$(CC) $(CFLAGS) $(DEBUGCFLAGS) $(USECFLAGS) $(USEOBJS) -o $@ $(LDFLAGS) $(USELDFLAGS)
clean:
-@rm -rf hairtunes shairport *.o
%.o: %.c Makefile
$(CC) $(CFLAGS) $(DEBUGCFLAGS) -c $< -o $@
prefix=/usr/local
install: shairport
install -D -m 0755 shairport $(DESTDIR)$(prefix)/bin/shairport
.PHONY: all clean install
.SILENT: clean