Makefile.am 2.43 KB
Newer Older
1
2
include $(top_srcdir)/globals.mak

3
if BUILD_GSM
4
5
6
GSM_LIB = libcodec_gsm.so
libcodec_gsm_so_SOURCES = gsmcodec.cpp
libcodec_gsm_so_CFLAGS = -fPIC -g -Wall
7
libcodec_gsm_so_CXXFLAGS = -fPIC -g -Wall
Yun Liu's avatar
Yun Liu committed
8
libcodec_gsm_so_LDFLAGS = --shared -lc -lgsm
9
INSTALL_GSM_RULE = install-libcodec_gsm_so
10
11
endif

12
13
14
15
if ENABLE_SPEEXDSP
SPEEXDSP_LIB = -lspeexdsp
endif

16
if BUILD_SPEEX
17
18
19
SPEEX_LIB = libcodec_speex.so
libcodec_speex_so_SOURCES = speexcodec.cpp
libcodec_speex_so_CFLAGS = -fPIC -g -Wall
20
libcodec_speex_so_CXXFLAGS = -fPIC -g -Wall
21
libcodec_speex_so_LDFLAGS = --shared -lc -lspeex $(SPEEXDSP_LIB) -lm
22
INSTALL_SPEEX_RULE = install-libcodec_speex_so
23
24
endif

Emmanuel Milou's avatar
Emmanuel Milou committed
25
26
27
28
if BUILD_ILBC
ILBC_LIB = libcodec_ilbc.so
libcodec_ilbc_so_SOURCES = ilbc.cpp
libcodec_ilbc_so_CFLAGS = -fPIC -g -Wall
29
libcodec_ilbc_so_CXXFLAGS = -fPIC -g -Wall
Yun Liu's avatar
Yun Liu committed
30
libcodec_ilbc_so_LDFLAGS = --shared ilbc/*.o -lc
Emmanuel Milou's avatar
Emmanuel Milou committed
31
32
33
34
35
INSTALL_ILBC_RULE = install-libcodec_ilbc_so
SUBDIRS = ilbc
endif

noinst_PROGRAMS = libcodec_ulaw.so libcodec_alaw.so $(GSM_LIB) $(SPEEX_LIB) $(ILBC_LIB) 
36
37
38
39
40

noinst_HEADERS = audiocodec.h

libcodec_ulaw_so_SOURCES = ulaw.cpp
libcodec_ulaw_so_CFLAGS = -fPIC -g -Wall
41
libcodec_ulaw_so_CXXFLAGS = -fPIC -g -Wall
Yun Liu's avatar
Yun Liu committed
42
libcodec_ulaw_so_LDFLAGS = --shared -lc
43
44
45

libcodec_alaw_so_SOURCES = alaw.cpp
libcodec_alaw_so_CFLAGS = -fPIC -g -Wall
46
libcodec_alaw_so_CXXFLAGS = -fPIC -g -Wall
Yun Liu's avatar
Yun Liu committed
47
libcodec_alaw_so_LDFLAGS = --shared -lc
48
49
50



Emmanuel Milou's avatar
Emmanuel Milou committed
51
install-exec-local:  install-libcodec_ulaw_so install-libcodec_alaw_so $(INSTALL_GSM_RULE) $(INSTALL_SPEEX_RULE) $(INSTALL_ILBC_RULE) 
52
uninstall-local:  uninstall-libcodec_ulaw_so uninstall-libcodec_alaw_so uninstall-libcodec_gsm_so uninstall-libcodec_speex_so 
53
54
55
56
57
58
59
60
61
62

install-libcodec_ulaw_so: libcodec_ulaw.so
	mkdir -p $(sflcodecdir)
	$(INSTALL_PROGRAM)  libcodec_ulaw.so $(sflcodecdir)
install-libcodec_alaw_so: libcodec_alaw.so
	$(INSTALL_PROGRAM)  libcodec_alaw.so $(sflcodecdir)
install-libcodec_gsm_so: libcodec_gsm.so
	$(INSTALL_PROGRAM)  libcodec_gsm.so $(sflcodecdir)
install-libcodec_speex_so: libcodec_speex.so
	$(INSTALL_PROGRAM)  libcodec_speex.so $(sflcodecdir)
Emmanuel Milou's avatar
Emmanuel Milou committed
63
64
install-libcodec_ilbc_so: libcodec_ilbc.so
	$(INSTALL_PROGRAM)  libcodec_ilbc.so $(sflcodecdir)
65
66
67
68
69
70
71
72
73
74
75


uninstall-libcodec_ulaw_so:
	rm -f $(sflcodecdir)/libcodec_ulaw.so
uninstall-libcodec_alaw_so:
	rm -f $(sflcodecdir)/libcodec_alaw.so
uninstall-libcodec_gsm_so:
	rm -f $(sflcodecdir)/libcodec_gsm.so
uninstall-libcodec_speex_so:
	rm -f $(sflcodecdir)/libcodec_speex.so
	rm -rf $(sflcodecdir)
Emmanuel Milou's avatar
Emmanuel Milou committed
76
77
uninstall-libcodec_ilbc_so:
	rm -f $(sflcodecdir)/libcodec_ilbc.so
78