This repository has been archived by the owner on Jan 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
95 lines (79 loc) · 2.17 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
.PHONY: all clean debug profile dist
.SUFFIXES:
.PRECIOUS: src/%.lh src/%.o
VERSION = 2.1.0
include config.mak.dist
-include config.mak
HEADERS = \
src/audio.h \
src/font.h \
src/image.h \
src/lua-file.h \
src/lua-image.h \
src/mpdc.h \
src/shared.h \
src/stb_image.h \
src/stb_image_resize.h \
src/thread.h \
src/video.h \
src/visualizer.h
LIBSRCS = \
src/audio.c \
src/avi_header.c \
src/image.c \
src/lua-audio.c \
src/lua-file.c \
src/lua-image.c \
src/mpdc.c \
src/ringbuf.c \
src/thread.c \
src/video.c \
src/visualizer.c
LIBOBJS = \
src/audio.o \
src/avi_header.o \
src/image.o \
src/lua-audio.o \
src/lua-file.o \
src/lua-image.o \
src/mpdc.o \
src/ringbuf.o \
src/thread.o \
src/video.o \
src/visualizer.o
LUALHS = \
src/font.lua.lh \
src/image.lua.lh \
src/stream.lua.lh
MAINSRCS = src/main.c
BIN2CSRC = src/bin2c.c
all: mpd-visualizer
mpd-visualizer: src/libvisualizer.a src/main.c
$(CC) $(CFLAGS) -o mpd-visualizer src/main.c -Lsrc -rdynamic -lvisualizer $(LDFLAGS) -pthread
src/%.o: src/%.c $(LUALHS)
$(CC) $(CFLAGS) -o $@ -c $<
src/%.lh: lua/% src/bin2c
./src/bin2c $< $@ $(patsubst %.lua,%_lua,$(notdir $<))
src/libvisualizer.a: $(LIBOBJS)
$(AR) rcs $@ $^
src/bin2c: src/bin2c.c
$(HOSTCC) -o src/bin2c src/bin2c.c
clean:
rm -f mpd-visualizer src/libvisualizer.a src/bin2c $(LIBOBJS) $(LUALHS)
dist:
rm -rf dist/mpd-visualizer-$(VERSION)
rm -rf dist/mpd-visualizer-$(VERSION).tar.gz
rm -rf dist/mpd-visualizer-$(VERSION).tar.xz
mkdir -p dist/mpd-visualizer-$(VERSION)
cp -r demos dist/mpd-visualizer-$(VERSION)/demos
cp -r gifs dist/mpd-visualizer-$(VERSION)/gifs
cp -r lua dist/mpd-visualizer-$(VERSION)/lua
cp -r src dist/mpd-visualizer-$(VERSION)/src
cp LICENSE dist/mpd-visualizer-$(VERSION)/LICENSE
cp LICENSE.ringbuf dist/mpd-visualizer-$(VERSION)/LICENSE.ringbuf
cp Makefile dist/mpd-visualizer-$(VERSION)/Makefile
cp README.md dist/mpd-visualizer-$(VERSION)/README.md
cp config.mak.dist dist/mpd-visualizer-$(VERSION)/config.mak.dist
tar cvf dist/mpd-visualizer-$(VERSION).tar dist/mpd-visualizer-$(VERSION)
gzip -k dist/mpd-visualizer-$(VERSION).tar
xz dist/mpd-visualizer-$(VERSION).tar