forked from karlstav/cava
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile.am
More file actions
155 lines (125 loc) · 4.05 KB
/
Makefile.am
File metadata and controls
155 lines (125 loc) · 4.05 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
CLEANFILES = $(NULL)
# Install the pkgconfig file for the library
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libcava.pc
# Generate the pkgconfig file
libcava.pc: Makefile.am
@echo "Generating $@..."
@mkdir -p $(@D)
@echo "prefix=$(prefix)" > $@
@echo "exec_prefix=$(exec_prefix)" >> $@
@echo "libdir=$(libdir)" >> $@
@echo "includedir=$(includedir)" >> $@
@echo "Name: $(PKG_CONFIG_NAME)" >> $@
@echo "Description: $(PKG_CONFIG_DESC)" >> $@
@echo "Version: $(PKG_CONFIG_VERSION)" >> $@
@echo "Libs: -L\$(libdir) -lcava" >> $@ # Link against libcava library
@echo "Cflags: -I\$(includedir)/cava -I\$(includedir)/cava/input -I\$(includedir)/cava/output" >> $@
# Clean up the generated pkgconfig file
CLEANFILES += libcava.pc
# Define the library to be built
# 'lib' directory implies shared library by default with Automake.
# Use 'noinst_LTLIBRARIES' if you don't want to install it but build it for internal use.
lib_LTLIBRARIES = libcava.la
AM_LIBTOOL_VERSION = $(AM_LIBTOOL_CURRENT):$(AM_LIBTOOL_REVISION):$(AM_LIBTOOL_RELEASE)
AM_LIBTOOL_REL = $(AM_LIBTOOL_RELEASE):$(AM_LIBTOOL_REVISION):$(AM_LIBTOOL_CURRENT)
libcava_la_LDFLAGS = -version-info $(AM_LIBTOOL_REL)
bin_PROGRAMS = cava
cavadir = $(top_srcdir)
cava_SOURCES = cava.c
libcava_la_SOURCES = cavacore.c config.c input/common.c input/fifo.c input/shmem.c \
output/common.c output/terminal_noncurses.c output/raw.c output/noritake.c
cava_CPPFLAGS = \
-DPACKAGE=\"$(PACKAGE)\" \
-DVERSION=\"$(VERSION)\" \
-DLIB_VERSION=\"$(VERSION)\" \
-D_POSIX_SOURCE \
-D_POSIX_C_SOURCE=200809L \
-D_XOPEN_SOURCE_EXTENDED \
-DFONTDIR=\"@FONT_DIR@\" \
-DFONTFILE=\"@FONT_FILE@\" \
-I$(srcdir) \
-I$(srcfir)/input \
-I$(srcfir)/output \
-I$(srcdir)/include
AM_CFLAGS = $(cava_CPPFLAGS)
cava_CFLAGS = -std=c99 -Wall -Wextra -Wno-unused-result -Wno-unknown-warning-option -Wno-maybe-uninitialized -Wno-vla-parameter
EXTRA_DIST = \
include \
output/shaders/pass_through.vert \
output/shaders/bar_spectrum.frag \
output/shaders/northern_lights.frag \
output/shaders/winamp_line_style_spectrum.frag \
output/shaders/spectrogram.frag \
output/shaders/eye_of_phi.frag \
output/themes/solarized_dark \
output/themes/tricolor \
example_files/config \
cava.psf \
LICENSE \
run_all_tests.sh \
SHADERS.md \
.clang-format \
CMakeLists.txt
# Install entire directories preserving structure
dist-hook:
cp -r include/cava $(DESTDIR)$(includedir)
# Define the target to install the headers
install-exec-hook:
@$(MKDIR_P) $(DESTDIR)$(includedir)/cava
# Install entire directories preserving structure
install-data-hook:
cp -r include/cava/* $(DESTDIR)$(includedir)/cava/
# Define uninstall hook to remove the directory
uninstall-hook:
$(AM_V_GEN) rm -rf "$(DESTDIR)$(includedir)/cava"
if OSX
cava_CFLAGS += -DNORT
cava_LDADD =
else
cava_LDADD = -lrt
cava_font_dir = @FONT_DIR@
cava_font__DATA = @FONT_FILE@
endif
if FREEBSD
if CAVAFONT
CLEANFILES += cava.bdf cava.fnt
cava.fnt: ${srcdir}/cava.psf
${PSF2BDF} --fontname="-gnu-cava-medium-r-normal--16-160-75-75-c-80-iso10646-1" ${srcdir}/cava.psf cava.bdf
${VTFONTCVT} -o cava.fnt cava.bdf
endif
endif
if ALSA
libcava_la_SOURCES += input/alsa.c input/alsa.h
endif
if PORTAUDIO
libcava_la_SOURCES += input/portaudio.c input/portaudio.h
endif
if PIPEWIRE
libcava_la_SOURCES += input/pipewire.c input/pipewire.h
endif
if PULSE
libcava_la_SOURCES += input/pulse.c input/pulse.h
endif
if SNDIO
libcava_la_SOURCES += input/sndio.c input/sndio.h
endif
if OSS
libcava_la_SOURCES += input/oss.c input/oss.h
endif
if JACK
libcava_la_SOURCES += input/jack.c input/jack.h
endif
if NCURSES
libcava_la_SOURCES += output/terminal_ncurses.c output/terminal_bcircle.c \
output/terminal_ncurses.h output/terminal_bcircle.h
endif
if SDL
libcava_la_SOURCES += output/sdl_cava.c output/sdl_cava.h
endif
if SDL_GLSL
libcava_la_SOURCES += output/sdl_glsl.c output/sdl_glsl.h
endif
cava_SOURCES += $(libcava_la_SOURCES)