forked from antiprism/mpd_oled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (29 loc) · 803 Bytes
/
Makefile
File metadata and controls
35 lines (29 loc) · 803 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
ifeq ($(PLAYER),)
PLAYER=MPD
# PLAYER=MPD # MPD VOLUMIO RUNEAUDIO
endif
ifeq ($(PLAYER),VOLUMIO)
PLAYERLIBS=-lcurl -ljsoncpp
else ifeq ($(PLAYER),RUNEAUDIO)
PLAYERLIBS=-li2c
else ifeq ($(PLAYER),MOODE)
PLAYERLIBS=-li2c
endif
CPPFLAGS=-W -Wall -Wno-unused-variable -Wno-unused-parameter \
-Wno-strict-aliasing -Ofast -D$(PLAYER)
CXXFLAGS=-std=c++11
PROG_NAME=mpd_oled
includes = $(wildcard *.h)
# make all
all: $(PROG_NAME)
# Make the library
OBJECTS=main.o timer.o status.o status_msg.o utils.o display.o\
programopts.o ultragetopt.o \
ArduiPi_OLED.o Adafruit_GFX.o bcm2835.o bcm2835_i2c.o
PROG_LIBS=-lmpdclient -lpthread $(PLAYERLIBS)
$(OBJECTS): $(includes)
$(PROG_NAME): $(OBJECTS)
$(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(PROG_LIBS)
# clear build files
clean:
rm -rf *.o $(PROG_NAME)