-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.am
80 lines (61 loc) · 2 KB
/
Makefile.am
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
bin_PROGRAMS = synaesthesia
synaesthesia_SOURCES = main.cc core.cc ui.cc sdlwrap.cc
if COMPILE_UNIXSOUND
synaesthesia_SOURCES += sound.cc
endif
if COMPILE_WINSOUND
synaesthesia_SOURCES += winsound.cc
endif
if COMPILE_SDLAUDIO
synaesthesia_SOURCES += sdlaudio.cc soundbuf.cc
endif
if COMPILE_WINDOWS
synaesthesia_LDFLAGS = -static
if COMPILE_WINICON
synaesthesia_SOURCES += syn-res.rc
synaesthesia_DEPENDENCIES = synaesthesia.ico
.rc.o:
$(WINDRES) -o $@ $<
syn-res.o: synaesthesia.ico
synaesthesia.ico: synaesthesia.png
icotool -c -o $@ $^
endif
if COMPILE_WINAMP
synaesthesia_SOURCES += winamp.cc
synaesthesia_LDFLAGS += -shared -Wl,-no-undefined
endif
endif COMPILE_WINDOWS
if COMPILE_SDLICON
syn_icon.rgb: synaesthesia.png
convert $< -resize "64x64!" $@
syn_icon_rgb.cc: syn_icon.rgb
xxd -i $< > $@
nodist_synaesthesia_SOURCES = syn_icon_rgb.cc
endif COMPILE_SDLICON
if COMPILE_AUDACIOUS
synaesthesia_SOURCES += audacious.cc
synaesthesia_LDFLAGS = -shared -Wl,-no-undefined
AM_CXXFLAGS = $(AUDACIOUS_CFLAGS)
synaesthesia_LDADD = $(AUDACIOUS_LIBS)
endif
if COMPILE_PORTAUDIO
synaesthesia_SOURCES += pawrap.cc soundbuf.cc
endif
if COMPILE_EMSCRIPTEN
synaesthesia_SOURCES += emscripten.cc
synaesthesia_LDFLAGS = -s EXPORTED_RUNTIME_METHODS="['cwrap', 'ccall']" \
-s EXPORTED_FUNCTIONS="['_main', '_getDataBuffer', '_displaySynaesthesia']" \
-s NO_EXIT_RUNTIME=1
synaesthesia_LDFLAGS += --post-js soundplayer.js
synaesthesia_DEPENDENCIES = soundplayer.js
endif
CLEANFILES = synaesthesia.ico syn_icon.rgb syn_icon_rgb.cc \
synaesthesia.js synaesthesia.html.mem a.out.js
install-data-local:
-xdg-icon-resource install --novendor --context apps \
--size 256 synaesthesia.png synaesthesia
-xdg-desktop-menu install --novendor synaesthesia.desktop
uninstall-local:
-xdg-icon-resource uninstall --novendor --context apps \
--size 256 synaesthesia
-xdg-desktop-menu uninstall --novendor synaesthesia.desktop