-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.mk
61 lines (45 loc) · 1.28 KB
/
config.mk
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
# Program version
PROGRAM_NAME = avolt
VERSION = 0.4.4a
SRC_POSTFIX = .c
# Customize below to fit your system
### Extra compile-time configuration options
# -DUSE_SEMAPHORE=[true|false]
# Use semaphores to prevent synchronous volume setting. Synchronism can cause
# some undesirable effects with alsa.
# -DSEMAPHORE_NAME=\"<name>\"
# Name for the semaphore to use, change if one with current name already
# exists, or is used by some other program.
CONFIG_OPTS=-DUSE_SEMAPHORE=true -DSEMAPHORE_NAME=\"avolt\"
# Install Paths
PREFIX = /usr
MANPREFIX = ${PREFIX}/share/man
# Build files/Paths
# Program binary name
BIN ?= $(PROGRAM_NAME)
# default build dir
BUILDDIR := build
# Source dir
SRCDIR := src
# dir to store automatically generated dependency info files
DEPDIR := .deps
# includes and libs
ALSAINC = `pkg-config --cflags alsa`
INCS = ${ALSAINC}
ALSALIB = `pkg-config --libs alsa`
LIBS = -lm -pthread ${ALSALIB}
ifdef EFENCE
LIBS = ${LIBS} -lefence
endif
# flags
CPPFLAGS = -DVERSION=\"${VERSION}\" -D_POSIX_C_SOURCE=200809L ${CONFIG_OPTS}
CFLAGS = -mtune=native -march=native -std=c99 -pedantic -Wall -O3 ${INCS} ${CPPFLAGS}
LDFLAGS = -ggdb ${LIBS}
# Compiler and linker
ifdef CLANG
CC := clang
LINKER := clang
else
CC := cc
LINKER := cc
endif