-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (48 loc) · 1.36 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
PREFIX = /usr/local/sounddeck
PATH_A = $(shell LC_ALL=C /usr/sbin/ldconfig -p | \
/usr/bin/sed "/x86-64.*libDeckLinkAPI\\.so/!d;\
s/.* => /\\\\\"/;s/$$/\\\\\"/;q")
PATH_PA = $(shell LC_ALL=C /usr/sbin/ldconfig -p | \
/usr/bin/sed "/x86-64.*libDeckLinkPreviewAPI\\.so/!d;\
s/.* => /\\\\\"/;s/$$/\\\\\"/;q")
CXX = /usr/bin/g++
DEBUG ?= 0
ifeq ($(DEBUG),1)
CFLAGS = -g -O1
else
CFLAGS = -O2 -s
endif
CFLAGS += -std=c++03 -Wextra -Wall -Werror \
-Wno-unused-parameter -fPIC
CFLAGS += -Wno-multichar -fno-rtti
ifeq ($(findstring gcc,$(CXX)),g++)
CFLAGS += -no-canonical-prefixes -Wno-builtin-macro-redefined \
-D__DATE__="redacted" -D__TIMESTAMP__="redacted" \
-D__TIME__="redacted" -U_FORTIFY_SOURCE \
-D_FORTIFY_SOURCE=1 -fstack-protector
endif
CFLAGS += -Iinclude
SRC_A = api.cc
SOLIB_A = libDeckLinkAPI.so
#ifeq ($(PATH_A),)
CDEFINES_A =
#else
#CDEFINES_A = -DPATH_A=$(PATH_A)
#endif
SRC_PA = preview_api.cc
SOLIB_PA = libDeckLinkPreviewAPI.so
SOLIB = $(SOLIB_A) $(SOLIB_PA)
LDLIBS = -lasound
COMPILE_A = $(CXX) $(CFLAGS) $(CDEFINES_A) -shared -o $@ \
$(SRC_A) $(LDLIBS)
COMPILE_PA = $(CXX) $(CFLAGS) -shared -o $@ \
$(SRC_PA) $(LDLIBS)
all: $(SOLIB)
$(SOLIB_A): $(SRC_A) $(DEP)
$(COMPILE_A)
$(SOLIB_PA): $(SRC_PA) $(DEP)
$(COMPILE_PA)
clean:
/usr/bin/rm -f $(SOLIB) *~
install: $(SOLIB)
/usr/bin/install -m 555 $(SOLIB) $(PREFIX)/lib64