diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 183 |
1 files changed, 183 insertions, 0 deletions
@@ -148,6 +148,10 @@ ifndef USE_CODEC_VORBIS USE_CODEC_VORBIS=0 endif +ifndef USE_CODEC_OPUS +USE_CODEC_OPUS=1 +endif + ifndef USE_MUMBLE USE_MUMBLE=1 endif @@ -164,6 +168,10 @@ ifndef USE_INTERNAL_SPEEX USE_INTERNAL_SPEEX=1 endif +ifndef USE_INTERNAL_OPUS +USE_INTERNAL_OPUS=1 +endif + ifndef USE_INTERNAL_ZLIB USE_INTERNAL_ZLIB=1 endif @@ -211,6 +219,8 @@ NDIR=$(MOUNT_DIR)/null UIDIR=$(MOUNT_DIR)/ui JPDIR=$(MOUNT_DIR)/jpeg-8c SPEEXDIR=$(MOUNT_DIR)/libspeex +OPUSDIR=$(MOUNT_DIR)/opus-1.0.2 +OPUSFILEDIR=$(MOUNT_DIR)/opusfile-0.2 ZDIR=$(MOUNT_DIR)/zlib Q3ASMDIR=$(MOUNT_DIR)/tools/asm LBURGDIR=$(MOUNT_DIR)/tools/lcc/lburg @@ -880,6 +890,19 @@ ifeq ($(USE_CODEC_VORBIS),1) CLIENT_CFLAGS += -DUSE_CODEC_VORBIS endif +ifeq ($(USE_CODEC_OPUS),1) + CLIENT_CFLAGS += -DUSE_CODEC_OPUS + ifeq ($(USE_INTERNAL_OPUS),1) + CLIENT_CFLAGS += -DOPUS_BUILD -DFLOATING_POINT -DUSE_ALLOCA \ + -I$(OPUSDIR)/include -I$(OPUSDIR)/celt -I$(OPUSDIR)/silk \ + -I$(OPUSDIR)/silk/float + + CLIENT_CFLAGS += -I$(OPUSFILEDIR)/include + else + CLIENT_LIBS += -lopusfile -lopus -logg + endif +endif + ifeq ($(USE_RENDERER_DLOPEN),1) CLIENT_CFLAGS += -DUSE_RENDERER_DLOPEN endif @@ -1109,6 +1132,7 @@ makedirs: @if [ ! -d $(BUILD_DIR) ];then $(MKDIR) $(BUILD_DIR);fi @if [ ! -d $(B) ];then $(MKDIR) $(B);fi @if [ ! -d $(B)/client ];then $(MKDIR) $(B)/client;fi + @if [ ! -d $(B)/client/opus ];then $(MKDIR) $(B)/client/opus;fi @if [ ! -d $(B)/renderergl1 ];then $(MKDIR) $(B)/renderergl1;fi @if [ ! -d $(B)/renderergl2 ];then $(MKDIR) $(B)/renderergl2;fi @if [ ! -d $(B)/renderergl2/glsl ];then $(MKDIR) $(B)/renderergl2/glsl;fi @@ -1323,6 +1347,7 @@ Q3OBJ = \ $(B)/client/snd_codec.o \ $(B)/client/snd_codec_wav.o \ $(B)/client/snd_codec_ogg.o \ + $(B)/client/snd_codec_opus.o \ \ $(B)/client/qal.o \ $(B)/client/snd_openal.o \ @@ -1599,6 +1624,149 @@ Q3OBJ += \ endif endif +ifeq ($(USE_CODEC_OPUS),1) +ifeq ($(USE_INTERNAL_OPUS),1) +Q3OBJ += \ + $(B)/client/opus/opus.o \ + $(B)/client/opus/opus_decoder.o \ + $(B)/client/opus/opus_encoder.o \ + $(B)/client/opus/opus_multistream.o \ + $(B)/client/opus/repacketizer.o \ + \ + $(B)/client/opus/bands.o \ + $(B)/client/opus/celt.o \ + $(B)/client/opus/cwrs.o \ + $(B)/client/opus/entcode.o \ + $(B)/client/opus/entdec.o \ + $(B)/client/opus/entenc.o \ + $(B)/client/opus/kiss_fft.o \ + $(B)/client/opus/laplace.o \ + $(B)/client/opus/mathops.o \ + $(B)/client/opus/mdct.o \ + $(B)/client/opus/modes.o \ + $(B)/client/opus/pitch.o \ + $(B)/client/opus/celt_lpc.o \ + $(B)/client/opus/quant_bands.o \ + $(B)/client/opus/rate.o \ + $(B)/client/opus/vq.o \ + \ + $(B)/client/opus/CNG.o \ + $(B)/client/opus/code_signs.o \ + $(B)/client/opus/init_decoder.o \ + $(B)/client/opus/decode_core.o \ + $(B)/client/opus/decode_frame.o \ + $(B)/client/opus/decode_parameters.o \ + $(B)/client/opus/decode_indices.o \ + $(B)/client/opus/decode_pulses.o \ + $(B)/client/opus/decoder_set_fs.o \ + $(B)/client/opus/dec_API.o \ + $(B)/client/opus/enc_API.o \ + $(B)/client/opus/encode_indices.o \ + $(B)/client/opus/encode_pulses.o \ + $(B)/client/opus/gain_quant.o \ + $(B)/client/opus/interpolate.o \ + $(B)/client/opus/LP_variable_cutoff.o \ + $(B)/client/opus/NLSF_decode.o \ + $(B)/client/opus/NSQ.o \ + $(B)/client/opus/NSQ_del_dec.o \ + $(B)/client/opus/PLC.o \ + $(B)/client/opus/shell_coder.o \ + $(B)/client/opus/tables_gain.o \ + $(B)/client/opus/tables_LTP.o \ + $(B)/client/opus/tables_NLSF_CB_NB_MB.o \ + $(B)/client/opus/tables_NLSF_CB_WB.o \ + $(B)/client/opus/tables_other.o \ + $(B)/client/opus/tables_pitch_lag.o \ + $(B)/client/opus/tables_pulses_per_block.o \ + $(B)/client/opus/VAD.o \ + $(B)/client/opus/control_audio_bandwidth.o \ + $(B)/client/opus/quant_LTP_gains.o \ + $(B)/client/opus/VQ_WMat_EC.o \ + $(B)/client/opus/HP_variable_cutoff.o \ + $(B)/client/opus/NLSF_encode.o \ + $(B)/client/opus/NLSF_VQ.o \ + $(B)/client/opus/NLSF_unpack.o \ + $(B)/client/opus/NLSF_del_dec_quant.o \ + $(B)/client/opus/process_NLSFs.o \ + $(B)/client/opus/stereo_LR_to_MS.o \ + $(B)/client/opus/stereo_MS_to_LR.o \ + $(B)/client/opus/check_control_input.o \ + $(B)/client/opus/control_SNR.o \ + $(B)/client/opus/init_encoder.o \ + $(B)/client/opus/control_codec.o \ + $(B)/client/opus/A2NLSF.o \ + $(B)/client/opus/ana_filt_bank_1.o \ + $(B)/client/opus/biquad_alt.o \ + $(B)/client/opus/bwexpander_32.o \ + $(B)/client/opus/bwexpander.o \ + $(B)/client/opus/debug.o \ + $(B)/client/opus/decode_pitch.o \ + $(B)/client/opus/inner_prod_aligned.o \ + $(B)/client/opus/lin2log.o \ + $(B)/client/opus/log2lin.o \ + $(B)/client/opus/LPC_analysis_filter.o \ + $(B)/client/opus/LPC_inv_pred_gain.o \ + $(B)/client/opus/table_LSF_cos.o \ + $(B)/client/opus/NLSF2A.o \ + $(B)/client/opus/NLSF_stabilize.o \ + $(B)/client/opus/NLSF_VQ_weights_laroia.o \ + $(B)/client/opus/pitch_est_tables.o \ + $(B)/client/opus/resampler.o \ + $(B)/client/opus/resampler_down2_3.o \ + $(B)/client/opus/resampler_down2.o \ + $(B)/client/opus/resampler_private_AR2.o \ + $(B)/client/opus/resampler_private_down_FIR.o \ + $(B)/client/opus/resampler_private_IIR_FIR.o \ + $(B)/client/opus/resampler_private_up2_HQ.o \ + $(B)/client/opus/resampler_rom.o \ + $(B)/client/opus/sigm_Q15.o \ + $(B)/client/opus/sort.o \ + $(B)/client/opus/sum_sqr_shift.o \ + $(B)/client/opus/stereo_decode_pred.o \ + $(B)/client/opus/stereo_encode_pred.o \ + $(B)/client/opus/stereo_find_predictor.o \ + $(B)/client/opus/stereo_quant_pred.o \ + \ + $(B)/client/opus/apply_sine_window_FLP.o \ + $(B)/client/opus/corrMatrix_FLP.o \ + $(B)/client/opus/encode_frame_FLP.o \ + $(B)/client/opus/find_LPC_FLP.o \ + $(B)/client/opus/find_LTP_FLP.o \ + $(B)/client/opus/find_pitch_lags_FLP.o \ + $(B)/client/opus/find_pred_coefs_FLP.o \ + $(B)/client/opus/LPC_analysis_filter_FLP.o \ + $(B)/client/opus/LTP_analysis_filter_FLP.o \ + $(B)/client/opus/LTP_scale_ctrl_FLP.o \ + $(B)/client/opus/noise_shape_analysis_FLP.o \ + $(B)/client/opus/prefilter_FLP.o \ + $(B)/client/opus/process_gains_FLP.o \ + $(B)/client/opus/regularize_correlations_FLP.o \ + $(B)/client/opus/residual_energy_FLP.o \ + $(B)/client/opus/solve_LS_FLP.o \ + $(B)/client/opus/warped_autocorrelation_FLP.o \ + $(B)/client/opus/wrappers_FLP.o \ + $(B)/client/opus/autocorrelation_FLP.o \ + $(B)/client/opus/burg_modified_FLP.o \ + $(B)/client/opus/bwexpander_FLP.o \ + $(B)/client/opus/energy_FLP.o \ + $(B)/client/opus/inner_product_FLP.o \ + $(B)/client/opus/k2a_FLP.o \ + $(B)/client/opus/levinsondurbin_FLP.o \ + $(B)/client/opus/LPC_inv_pred_gain_FLP.o \ + $(B)/client/opus/pitch_analysis_core_FLP.o \ + $(B)/client/opus/scale_copy_vector_FLP.o \ + $(B)/client/opus/scale_vector_FLP.o \ + $(B)/client/opus/schur_FLP.o \ + $(B)/client/opus/sort_FLP.o \ + \ + $(B)/client/http.o \ + $(B)/client/info.o \ + $(B)/client/internal.o \ + $(B)/client/opusfile.o \ + $(B)/client/stream.o +endif +endif + ifeq ($(USE_INTERNAL_ZLIB),1) Q3OBJ += \ $(B)/client/adler32.o \ @@ -2010,6 +2178,21 @@ $(B)/client/%.o: $(CMDIR)/%.c $(B)/client/%.o: $(SPEEXDIR)/%.c $(DO_CC) +$(B)/client/opus/%.o: $(OPUSDIR)/src/%.c + $(DO_CC) + +$(B)/client/opus/%.o: $(OPUSDIR)/celt/%.c + $(DO_CC) + +$(B)/client/opus/%.o: $(OPUSDIR)/silk/%.c + $(DO_CC) + +$(B)/client/opus/%.o: $(OPUSDIR)/silk/float/%.c + $(DO_CC) + +$(B)/client/%.o: $(OPUSFILEDIR)/src/%.c + $(DO_CC) + $(B)/client/%.o: $(ZDIR)/%.c $(DO_CC) |