-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (27 loc) · 802 Bytes
/
Makefile
File metadata and controls
35 lines (27 loc) · 802 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
CC ?= gcc
RM = rm -f
CCFLAGS = -Wall -D_GNU_SOURCE
ifeq ($(DEBUG),1)
CCFLAGS += -O1 -ggdb
else
CCFLAGS += -Ofast
endif
DEPS = freetype2 libpng
DEPFLAGS_CC = `pkg-config --cflags $(DEPS)`
DEPFLAGS_LD = `pkg-config --libs $(DEPS)`
OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
HDRS = $(wildcard *.h)
all: displayboot
%.o : %.c $(HDRS) Makefile
$(CC) -c $(CCFLAGS) $(DEPFLAGS_CC) $< -o $@
displayboot: $(OBJS)
$(CC) $(CCFLAGS) $^ $(DEPFLAGS_LD) -o displayboot
clean:
$(RM) $(OBJS)
$(RM) displayboot
install: displayboot
install -d $(DESTDIR)/opt/ottercast-displayboot
install -m 755 ottercast-displayboot $(DESTDIR)/opt/ottercast-displayboot/
install -m 755 fb.raw $(DESTDIR)/opt/ottercast-displayboot/
install -m 755 UbuntuMono.ttf $(DESTDIR)/opt/ottercast-displayboot/
.PHONY: all clean