forked from traud/asterisk-opus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
50 lines (37 loc) · 1.3 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
prefix=/usr/local
exec_prefix=$(prefix)
libdir=$(exec_prefix)/lib
CC=gcc
CFLAGS=-pthread -g3 -O3 -D_FORTIFY_SOURCE=2 -fPIC
CPPFLAGS=
DEFS=
INSTALL=/usr/bin/install -c
LDFLAGS=-shared -pthread -Wl,--warn-common
LIBS=
MKDIR_P=/bin/mkdir -p
SHELL=/bin/sh
ASTMODDIR=$(libdir)/asterisk/modules
MODULES=codec_opus_open_source format_ogg_opus_open_source format_vp8 res_format_attr_opus
.SUFFIXES: .c .so
.PHONY: all clean install uninstall $(MODULES)
all: $(MODULES)
clean:
rm */*.so
install: $(MODULES)
$(MKDIR_P) $(ASTMODDIR)
$(INSTALL) */*.so $(ASTMODDIR)
uninstall:
cd $(ASTMODDIR) && rm $(addsuffix .so,$(MODULES))
codec_opus_open_source: LIBS+=-lopus
codec_opus_open_source: DEFS+=-DAST_MODULE=\"codec_opus_open_source\"
codec_opus_open_source: codecs/codec_opus_open_source.so
format_ogg_opus_open_source: CPATH+=-I/usr/include/opus
format_ogg_opus_open_source: LIBS+=-lopus -lopusfile
format_ogg_opus_open_source: DEFS+=-DAST_MODULE=\"format_ogg_opus_open_source\"
format_ogg_opus_open_source: formats/format_ogg_opus_open_source.so
format_vp8: DEFS+=-DAST_MODULE=\"format_vp8\"
format_vp8: formats/format_vp8.so
res_format_attr_opus: DEFS+=-DAST_MODULE=\"res_format_attr_opus\"
res_format_attr_opus: res/res_format_attr_opus.so
.c.so:
$(CC) -o $@ $(CPATH) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LIBS) $(LDFLAGS) $<