Makefile.am 5.59 KB
Newer Older
1
EXTRA_DIST=autogen.sh mswebrtc.iss.in
2
isac_VERSION = 1.0.0
3
isac_DIR=$(top_builddir)/webrtc
4

5
ISAC_FLAVOUR ?= fix # use 'main' or 'fix'
6 7
ISAC_SRC_DIR = webrtc/modules/audio_coding/codecs/isac/$(ISAC_FLAVOUR)
ISAC_COMMON_DIR = webrtc/common_audio/signal_processing
8 9 10

pluginsdir = $(libdir)/mediastreamer/plugins

11
plugins_LTLIBRARIES=libmswebrtc.la
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

# Build the list of isac source files
ISAC_BASE_SRCS = $(ISAC_SRC_DIR)/source/fft.c \
	$(ISAC_SRC_DIR)/source/arith_routines.c \
	$(ISAC_SRC_DIR)/source/arith_routines_hist.c \
	$(ISAC_SRC_DIR)/source/arith_routines_logist.c \
	$(ISAC_SRC_DIR)/source/bandwidth_estimator.c \
	$(ISAC_SRC_DIR)/source/decode.c \
	$(ISAC_SRC_DIR)/source/decode_bwe.c \
	$(ISAC_SRC_DIR)/source/encode.c \
	$(ISAC_SRC_DIR)/source/entropy_coding.c \
	$(ISAC_SRC_DIR)/source/filterbank_tables.c \
	$(ISAC_SRC_DIR)/source/filterbanks.c \
	$(ISAC_SRC_DIR)/source/lattice.c \
	$(ISAC_SRC_DIR)/source/lpc_tables.c \
	$(ISAC_SRC_DIR)/source/pitch_estimator.c \
	$(ISAC_SRC_DIR)/source/pitch_filter.c \
	$(ISAC_SRC_DIR)/source/pitch_gain_tables.c \
	$(ISAC_SRC_DIR)/source/pitch_lag_tables.c \
	$(ISAC_SRC_DIR)/source/spectrum_ar_model_tables.c \
32
	$(ISAC_SRC_DIR)/source/transform.c
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

# some files are implementation specific

if ISAC_FLAVOUR_MAIN

# floating point implementation
ISAC_BASE_SRCS += $(ISAC_SRC_DIR)/source/intialize.c \
	$(ISAC_SRC_DIR)/source/crc.c \
	$(ISAC_SRC_DIR)/source/encode_lpc_swb.c \
	$(ISAC_SRC_DIR)/source/filter_functions.c \
	$(ISAC_SRC_DIR)/source/isac.c \
	$(ISAC_SRC_DIR)/source/lpc_analysis.c \
	$(ISAC_SRC_DIR)/source/lpc_gain_swb_tables.c \
	$(ISAC_SRC_DIR)/source/lpc_shape_swb12_tables.c \
	$(ISAC_SRC_DIR)/source/lpc_shape_swb16_tables.c \
	$(ISAC_SRC_DIR)/util/utility.c 

else

# fixed point implementation
ISAC_BASE_SRCS += $(ISAC_SRC_DIR)/source/decode_plc.c \
	$(ISAC_SRC_DIR)/source/filters.c \
	$(ISAC_SRC_DIR)/source/initialize.c \
	$(ISAC_SRC_DIR)/source/isacfix.c \
	$(ISAC_SRC_DIR)/source/lattice_c.c \
	$(ISAC_SRC_DIR)/source/pitch_filter_c.c \
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
	$(ISAC_SRC_DIR)/source/lpc_masking_model.c \
	$(ISAC_COMMON_DIR)/spl_sqrt.c \
	$(ISAC_COMMON_DIR)/real_fft.c \
	$(ISAC_COMMON_DIR)/filter_ar_fast_q12.c \
	$(ISAC_COMMON_DIR)/webrtc_fft_t_1024_8.c \
	$(ISAC_COMMON_DIR)/complex_bit_reverse.c \
	$(ISAC_COMMON_DIR)/spl_init.c \
	$(ISAC_COMMON_DIR)/splitting_filter.c \
	$(ISAC_COMMON_DIR)/spl_sqrt_floor.c \
	$(ISAC_COMMON_DIR)/levinson_durbin.c \
	$(ISAC_COMMON_DIR)/filter_ar.c \
	$(ISAC_COMMON_DIR)/get_scaling_square.c \
	$(ISAC_COMMON_DIR)/resample_fractional.c \
	$(ISAC_COMMON_DIR)/resample.c \
	$(ISAC_COMMON_DIR)/downsample_fast.c \
	$(ISAC_COMMON_DIR)/filter_ma_fast_q12.c \
	$(ISAC_COMMON_DIR)/auto_corr_to_refl_coef.c \
	$(ISAC_COMMON_DIR)/auto_correlation.c \
	$(ISAC_COMMON_DIR)/refl_coef_to_lpc.c \
	$(ISAC_COMMON_DIR)/dot_product_with_scale.c \
	$(ISAC_COMMON_DIR)/copy_set_operations.c \
	$(ISAC_COMMON_DIR)/spl_version.c \
	$(ISAC_COMMON_DIR)/cross_correlation.c \
	$(ISAC_COMMON_DIR)/sqrt_of_one_minus_x_squared.c \
	$(ISAC_COMMON_DIR)/ilbc_specific_functions.c \
	$(ISAC_COMMON_DIR)/resample_by_2.c \
	$(ISAC_COMMON_DIR)/complex_fft.c \
	$(ISAC_COMMON_DIR)/resample_48khz.c \
	$(ISAC_COMMON_DIR)/energy.c \
	$(ISAC_COMMON_DIR)/get_hanning_window.c \
	$(ISAC_COMMON_DIR)/randomization_functions.c \
	$(ISAC_COMMON_DIR)/vector_scaling_operations.c \
	$(ISAC_COMMON_DIR)/webrtc_fft_t_rad.c \
	$(ISAC_COMMON_DIR)/resample_by_2_internal.c \
	$(ISAC_COMMON_DIR)/lpc_to_refl_coef.c \
	$(ISAC_COMMON_DIR)/min_max_operations.c \
	$(ISAC_COMMON_DIR)/division_operations.c 
96 97 98 99 100 101 102 103 104 105 106

# TODO: use assembly-optimized versions when possible
#	$(ISAC_SRC_DIR)/source/filters_neon.c \
#	$(ISAC_SRC_DIR)/source/lpc_masking_model_neon.S \
#	$(ISAC_SRC_DIR)/source/pitch_filter_armv6.S \
#	$(ISAC_SRC_DIR)/source/lattice_neon.S \
#	$(ISAC_SRC_DIR)/source/lattice_armv7.S 

endif


107 108 109
libmswebrtc_la_SOURCES= \
	mswebrtc.c \
	$(ISAC_BASE_SRCS) isac_dec.c isac_enc.c
110

111 112
webrtc_repo = git://git.linphone.org/webrtc

113
BUILT_SOURCES = $(webrtc_DIR)
114 115
GIT=$(shell which git)

116
$(webrtc_DIR):
117 118
	$(GIT) clone $(webrtc_repo)

119
extract-sources: $(webrtc_DIR)
120 121


122
libmswebrtc_la_LIBADD= \
123
	$(ORTP_LIBS) \
124
	$(MEDIASTREAMER_LIBS)
125

126
libmswebrtc_la_LDFLAGS=-module -no-undefined
127

128 129 130
webrtc_CFLAGS = -I$(webrtc_DIR) \
	-I$(ISAC_SRC_DIR)/source -I$(ISAC_SRC_DIR)/util -I$(ISAC_SRC_DIR)/interface \
	-I$(ISAC_COMMON_DIR)/include
131

132 133 134 135
AM_CFLAGS= \
	$(webrtc_CFLAGS) \
	$(MEDIASTREAMER_CFLAGS) \
	$(STRICT_CFLAGS)
136 137 138 139 140 141

INSTALLDIR=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-install
INSTALLDIR_WITH_PREFIX=$(INSTALLDIR)/$(prefix)
ZIPFILE=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-win32-$(VERSION).zip
ZIP_EXCLUDED=include 

142
ISS_SCRIPT=mswebrtc.iss
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
ISS_SCRIPT_PATH=$(shell cd $(top_srcdir) && pwd)/$(ISS_SCRIPT)
#path to Inno Setup 5 compiler
ISCC=ISCC.exe
PACKAGE_WIN32_FILELIST=$(PACKAGE)-win32.filelist

setup.exe: zip
	cd $(INSTALLDIR_WITH_PREFIX) && \
	rm -f $(PACKAGE_WIN32_FILELIST) && \
	for file in `find` ; do \
		if ! test -d $$file ; then \
			echo "Source: $$file; Destdir: {app}\\`dirname $$file`; Flags: ignoreversion" \
			>> $(PACKAGE_WIN32_FILELIST) ;\
		fi \
	done
	cp $(ISS_SCRIPT) $(INSTALLDIR_WITH_PREFIX)/.
	cd $(INSTALLDIR_WITH_PREFIX) && \
	$(ISCC) $(ISS_SCRIPT) 
	mv $(INSTALLDIR_WITH_PREFIX)/Output/setup.exe $(PACKAGE)-$(VERSION)-setup.exe
	rm -rf $(INSTALLDIR_WITH_PREFIX)/Output
	rm -f $(INSTALLDIR_WITH_PREFIX)/$(PACKAGE_WIN32_FILELIST)
	rm -f $(INSTALLDIR_WITH_PREFIX)/$(ISS_SCRIPT)

zip:
	rm -f $(ZIPFILE)
	rm -rf $(INSTALLDIR)
	mkdir -p $(INSTALLDIR)
	make install DESTDIR=$(INSTALLDIR)
	cp -f $(top_srcdir)/README $(INSTALLDIR_WITH_PREFIX)/.
	cp -f $(top_srcdir)/COPYING $(INSTALLDIR_WITH_PREFIX)/.
	cd $(INSTALLDIR)/$(prefix) && rm -rf $(ZIP_EXCLUDED) && \
	zip -r $(ZIPFILE) *