ref: 1c09febec7eeb4f654d1b0692da7ef0e28dc81d2
parent: 7805475b7b4b92907e46939906385373df7213ef
author: Jean-Marc Valin <[email protected]>
date: Thu Feb 3 06:34:11 EST 2011
A simpler build system for the draft
--- /dev/null
+++ b/Makefile.draft
@@ -1,0 +1,88 @@
+include silk_sources.mk
+include celt_sources.mk
+include opus_sources.mk
+
+EXESUFFIX =
+LIBPREFIX = lib
+LIBSUFFIX = .a
+OBJSUFFIX = .o
+
+CC = $(TOOLCHAIN_PREFIX)gcc$(TOOLCHAIN_SUFFIX)
+CXX = $(TOOLCHAIN_PREFIX)g++$(TOOLCHAIN_SUFFIX)
+AR = $(TOOLCHAIN_PREFIX)ar
+RANLIB = $(TOOLCHAIN_PREFIX)ranlib
+CP = $(TOOLCHAIN_PREFIX)cp
+
+cppflags-from-defines = $(addprefix -D,$(1))
+cppflags-from-includes = $(addprefix -I,$(1))
+ldflags-from-ldlibdirs = $(addprefix -L,$(1))
+ldlibs-from-libs = $(addprefix -l,$(1))
+
+CFLAGS += -O2 -g -Wall -DOPUS_BUILD -Drestrict=
+
+CFLAGS += $(call cppflags-from-defines,$(CDEFINES))
+CFLAGS += $(call cppflags-from-includes,$(CINCLUDES))
+LDFLAGS += $(call ldflags-from-ldlibdirs,$(LDLIBDIRS))
+LDLIBS += $(call ldlibs-from-libs,$(LIBS))
+
+COMPILE.c.cmdline = $(CC) -c $(CFLAGS) -o $@ $<
+COMPILE.cpp.cmdline = $(CXX) -c $(CFLAGS) -o $@ $<
+LINK.o = $(CC) $(LDPREFLAGS) $(LDFLAGS)
+LINK.o.cmdline = $(LINK.o) $^ $(LDLIBS) -o $@$(EXESUFFIX)
+
+ARCHIVE.cmdline = $(AR) $(ARFLAGS) $@ $^ && $(RANLIB) $@
+
+%$(OBJSUFFIX):%.c
+ $(COMPILE.c.cmdline)
+
+%$(OBJSUFFIX):%.cpp
+ $(COMPILE.cpp.cmdline)
+
+# Directives
+
+CINCLUDES += silk/interface \
+ silk/src_common \
+ silk/test silk/src_FIX \
+ silk/src_FLP \
+ silk/src_SigProc_FIX \
+ silk/src_SigProc_FLP \
+ celt/libcelt \
+ src
+
+# VPATH e.g. VPATH = src:../headers
+VPATH = ./ \
+ silk/interface \
+ silk/src_FIX \
+ silk/src_FLP \
+ silk/src_SigProc_FIX \
+ silk/src_SigProc_FLP \
+ test
+
+# Variable definitions
+LIB_NAME = libopus
+TARGET = $(LIBPREFIX)$(LIB_NAME)$(LIBSUFFIX)
+
+SRCS_C = $(SILK_SOURCES) $(CELT_SOURCES) $(OPUS_SOURCES)
+
+OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(SRCS_C))
+
+TESTOPUS_SRCS_C = src/test_opus.c
+TESTOPUS_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUS_SRCS_C))
+
+LIBS = $(LIB_NAME) m
+
+LDLIBDIRS = ./
+
+# Rules
+default: all
+
+all: $(TARGET) lib test_opus
+
+lib: $(TARGET)
+
+$(TARGET): $(OBJS)
+ $(ARCHIVE.cmdline)
+
+test_opus$(EXESUFFIX): $(TESTOPUS_OBJS)
+ $(LINK.o.cmdline)
+
--- /dev/null
+++ b/celt_sources.mk
@@ -1,0 +1,19 @@
+CELT_SOURCES = celt/libcelt/bands.c \
+celt/libcelt/celt.c \
+celt/libcelt/cwrs.c \
+celt/libcelt/entcode.c \
+celt/libcelt/entdec.c \
+celt/libcelt/entenc.c \
+celt/libcelt/header.c \
+celt/libcelt/kiss_fft.c \
+celt/libcelt/laplace.c \
+celt/libcelt/mathops.c \
+celt/libcelt/mdct.c \
+celt/libcelt/modes.c \
+celt/libcelt/pitch.c \
+celt/libcelt/plc.c \
+celt/libcelt/quant_bands.c \
+celt/libcelt/rangedec.c \
+celt/libcelt/rangeenc.c \
+celt/libcelt/rate.c \
+celt/libcelt/vq.c
--- /dev/null
+++ b/opus_sources.mk
@@ -1,0 +1,3 @@
+OPUS_SOURCES = src/opus_decoder.c \
+src/opus_encoder.c \
+src/test_opus.c
--- /dev/null
+++ b/silk_sources.mk
@@ -1,0 +1,129 @@
+SILK_SOURCES = silk/src_common/SKP_Silk_CNG.c \
+silk/src_common/SKP_Silk_code_signs.c \
+silk/src_common/SKP_Silk_create_init_destroy.c \
+silk/src_common/SKP_Silk_decode_core.c \
+silk/src_common/SKP_Silk_decode_frame.c \
+silk/src_common/SKP_Silk_decode_parameters.c \
+silk/src_common/SKP_Silk_decode_indices.c \
+silk/src_common/SKP_Silk_decode_pulses.c \
+silk/src_common/SKP_Silk_decoder_set_fs.c \
+silk/src_common/SKP_Silk_dec_API.c \
+silk/src_common/SKP_Silk_enc_API.c \
+silk/src_common/SKP_Silk_encode_indices.c \
+silk/src_common/SKP_Silk_encode_pulses.c \
+silk/src_common/SKP_Silk_gain_quant.c \
+silk/src_common/SKP_Silk_interpolate.c \
+silk/src_common/SKP_Silk_LP_variable_cutoff.c \
+silk/src_common/SKP_Silk_NLSF2A_stable.c \
+silk/src_common/SKP_Silk_NLSF_MSVQ_decode.c \
+silk/src_common/SKP_Silk_NSQ.c \
+silk/src_common/SKP_Silk_NSQ_del_dec.c \
+silk/src_common/SKP_Silk_PLC.c \
+silk/src_common/SKP_Silk_pulses_to_bytes.c \
+silk/src_common/SKP_Silk_shell_coder.c \
+silk/src_common/SKP_Silk_tables_gain.c \
+silk/src_common/SKP_Silk_tables_LTP.c \
+silk/src_common/SKP_Silk_tables_NLSF_CB0_10.c \
+silk/src_common/SKP_Silk_tables_NLSF_CB0_16.c \
+silk/src_common/SKP_Silk_tables_NLSF_CB1_10.c \
+silk/src_common/SKP_Silk_tables_NLSF_CB1_16.c \
+silk/src_common/SKP_Silk_tables_other.c \
+silk/src_common/SKP_Silk_tables_pitch_lag.c \
+silk/src_common/SKP_Silk_tables_pulses_per_block.c \
+silk/src_common/SKP_Silk_VAD.c \
+silk/src_common/SKP_Silk_control_audio_bandwidth.c \
+silk/src_common/SKP_Silk_quant_LTP_gains.c \
+silk/src_common/SKP_Silk_VQ_WMat_EC.c \
+silk/src_FLP/SKP_Silk_apply_sine_window_FLP.c \
+silk/src_FLP/SKP_Silk_control_codec_FLP.c \
+silk/src_FLP/SKP_Silk_corrMatrix_FLP.c \
+silk/src_FLP/SKP_Silk_encode_frame_FLP.c \
+silk/src_FLP/SKP_Silk_find_LPC_FLP.c \
+silk/src_FLP/SKP_Silk_find_LTP_FLP.c \
+silk/src_FLP/SKP_Silk_find_pitch_lags_FLP.c \
+silk/src_FLP/SKP_Silk_find_pred_coefs_FLP.c \
+silk/src_FLP/SKP_Silk_HP_variable_cutoff_FLP.c \
+silk/src_FLP/SKP_Silk_init_encoder_FLP.c \
+silk/src_FLP/SKP_Silk_LPC_analysis_filter_FLP.c \
+silk/src_FLP/SKP_Silk_LTP_analysis_filter_FLP.c \
+silk/src_FLP/SKP_Silk_LTP_scale_ctrl_FLP.c \
+silk/src_FLP/SKP_Silk_NLSF_MSVQ_decode_FLP.c \
+silk/src_FLP/SKP_Silk_NLSF_MSVQ_encode_FLP.c \
+silk/src_FLP/SKP_Silk_NLSF_VQ_rate_distortion_FLP.c \
+silk/src_FLP/SKP_Silk_NLSF_VQ_sum_error_FLP.c \
+silk/src_FLP/SKP_Silk_NLSF_VQ_weights_laroia_FLP.c \
+silk/src_FLP/SKP_Silk_noise_shape_analysis_FLP.c \
+silk/src_FLP/SKP_Silk_prefilter_FLP.c \
+silk/src_FLP/SKP_Silk_process_gains_FLP.c \
+silk/src_FLP/SKP_Silk_process_NLSFs_FLP.c \
+silk/src_FLP/SKP_Silk_regularize_correlations_FLP.c \
+silk/src_FLP/SKP_Silk_residual_energy_FLP.c \
+silk/src_FLP/SKP_Silk_solve_LS_FLP.c \
+silk/src_FLP/SKP_Silk_warped_autocorrelation_FLP.c \
+silk/src_FLP/SKP_Silk_wrappers_FLP.c \
+silk/src_SigProc_FIX/SKP_Silk_A2NLSF.c \
+silk/src_SigProc_FIX/SKP_Silk_allpass_int.c \
+silk/src_SigProc_FIX/SKP_Silk_ana_filt_bank_1.c \
+silk/src_SigProc_FIX/SKP_Silk_apply_sine_window.c \
+silk/src_SigProc_FIX/SKP_Silk_array_maxabs.c \
+silk/src_SigProc_FIX/SKP_Silk_autocorr.c \
+silk/src_SigProc_FIX/SKP_Silk_biquad_alt.c \
+silk/src_SigProc_FIX/SKP_Silk_burg_modified.c \
+silk/src_SigProc_FIX/SKP_Silk_bwexpander_32.c \
+silk/src_SigProc_FIX/SKP_Silk_bwexpander.c \
+silk/src_SigProc_FIX/SKP_Silk_decode_pitch.c \
+silk/src_SigProc_FIX/SKP_Silk_inner_prod_aligned.c \
+silk/src_SigProc_FIX/SKP_Silk_k2a.c \
+silk/src_SigProc_FIX/SKP_Silk_k2a_Q16.c \
+silk/src_SigProc_FIX/SKP_Silk_lin2log.c \
+silk/src_SigProc_FIX/SKP_Silk_log2lin.c \
+silk/src_SigProc_FIX/SKP_Silk_lowpass_int.c \
+silk/src_SigProc_FIX/SKP_Silk_lowpass_short.c \
+silk/src_SigProc_FIX/SKP_Silk_LPC_inv_pred_gain.c \
+silk/src_SigProc_FIX/SKP_Silk_LPC_stabilize.c \
+silk/src_SigProc_FIX/SKP_Silk_LPC_synthesis_filter.c \
+silk/src_SigProc_FIX/SKP_Silk_LPC_synthesis_order16.c \
+silk/src_SigProc_FIX/SKP_Silk_LSF_cos_table.c \
+silk/src_SigProc_FIX/SKP_Silk_MA.c \
+silk/src_SigProc_FIX/SKP_Silk_NLSF2A.c \
+silk/src_SigProc_FIX/SKP_Silk_NLSF_stabilize.c \
+silk/src_SigProc_FIX/SKP_Silk_NLSF_VQ_weights_laroia.c \
+silk/src_SigProc_FIX/SKP_Silk_pitch_analysis_core.c \
+silk/src_SigProc_FIX/SKP_Silk_pitch_est_tables.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler_down2_3.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler_down2.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler_down3.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler_private_AR2.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler_private_ARMA4.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler_private_copy.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler_private_down4.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler_private_down_FIR.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler_private_IIR_FIR.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler_private_up2_HQ.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler_private_up4.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler_rom.c \
+silk/src_SigProc_FIX/SKP_Silk_resampler_up2.c \
+silk/src_SigProc_FIX/SKP_Silk_scale_copy_vector16.c \
+silk/src_SigProc_FIX/SKP_Silk_scale_vector.c \
+silk/src_SigProc_FIX/SKP_Silk_schur64.c \
+silk/src_SigProc_FIX/SKP_Silk_schur.c \
+silk/src_SigProc_FIX/SKP_Silk_sigm_Q15.c \
+silk/src_SigProc_FIX/SKP_Silk_sort.c \
+silk/src_SigProc_FIX/SKP_Silk_sum_sqr_shift.c \
+silk/src_SigProc_FLP/SKP_Silk_allpass_int_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_autocorrelation_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_burg_modified_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_bwexpander_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_decimate2_coarse_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_decimate2_coarsest_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_energy_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_inner_product_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_k2a_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_levinsondurbin_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_LPC_inv_pred_gain_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_pitch_analysis_core_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_scale_copy_vector_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_scale_vector_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_schur_FLP.c \
+silk/src_SigProc_FLP/SKP_Silk_sort_FLP.c