Updated Windows liquid-dsp binaries to master using GCC 9.30

This commit is contained in:
vsonnier 2020-04-14 19:05:28 +02:00
parent d2f9333523
commit 60fa038549
15 changed files with 4901 additions and 4767 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2007 - 2019 Joseph Gaeddert * Copyright (c) 2007 - 2020 Joseph Gaeddert
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -1516,8 +1516,8 @@ void SPGRAM(_reset)(SPGRAM() _q); \
/* Print internal state of the object to stdout */ \ /* Print internal state of the object to stdout */ \
void SPGRAM(_print)(SPGRAM() _q); \ void SPGRAM(_print)(SPGRAM() _q); \
\ \
/* Set the forgetting factor (filter bandwidth) for accumulating */ \ /* Set the filter bandwidth for accumulating independent transform */ \
/* independent transform squared magnitude outputs. */ \ /* squared magnitude outputs. */ \
/* This is used to compute a running time-average power spectral */ \ /* This is used to compute a running time-average power spectral */ \
/* density output. */ \ /* density output. */ \
/* The value of _alpha determines how the power spectral estimate is */ \ /* The value of _alpha determines how the power spectral estimate is */ \
@ -1534,6 +1534,10 @@ void SPGRAM(_print)(SPGRAM() _q); \
int SPGRAM(_set_alpha)(SPGRAM() _q, \ int SPGRAM(_set_alpha)(SPGRAM() _q, \
float _alpha); \ float _alpha); \
\ \
/* Get the filter bandwidth for accumulating independent transform */ \
/* squared magnitude outputs. */ \
float SPGRAM(_get_alpha)(SPGRAM() _q); \
\
/* Set the center frequency of the received signal. */ \ /* Set the center frequency of the received signal. */ \
/* This is for display purposes only when generating the output image. */ \ /* This is for display purposes only when generating the output image. */ \
/* _q : spectral periodogram object */ \ /* _q : spectral periodogram object */ \
@ -1569,9 +1573,6 @@ unsigned long long int SPGRAM(_get_num_transforms)(SPGRAM() _q); \
/* Get number of transforms processed since object was created */ \ /* Get number of transforms processed since object was created */ \
unsigned long long int SPGRAM(_get_num_transforms_total)(SPGRAM() _q); \ unsigned long long int SPGRAM(_get_num_transforms_total)(SPGRAM() _q); \
\ \
/* Get forgetting factor (filter bandwidth) */ \
float SPGRAM(_get_alpha)(SPGRAM() _q); \
\
/* Push a single sample into the object, executing internal transform */ \ /* Push a single sample into the object, executing internal transform */ \
/* as necessary. */ \ /* as necessary. */ \
/* _q : spgram object */ \ /* _q : spgram object */ \
@ -2495,7 +2496,7 @@ FIRFILT() FIRFILT(_create_kaiser)(unsigned int _n, \
float _As, \ float _As, \
float _mu); \ float _mu); \
\ \
/* Create object from square-root Nyquist prototype */ \ /* Create object from square-root Nyquist prototype. */ \
/* The filter length will be \(2 k m + 1 \) samples long with a delay */ \ /* The filter length will be \(2 k m + 1 \) samples long with a delay */ \
/* of \( k m + 1 \) samples. */ \ /* of \( k m + 1 \) samples. */ \
/* _type : filter type (e.g. LIQUID_FIRFILT_RRC) */ \ /* _type : filter type (e.g. LIQUID_FIRFILT_RRC) */ \
@ -2509,6 +2510,14 @@ FIRFILT() FIRFILT(_create_rnyquist)(int _type, \
float _beta, \ float _beta, \
float _mu); \ float _mu); \
\ \
/* Create object from Parks-McClellan algorithm prototype */ \
/* _h_len : filter length, _h_len > 0 */ \
/* _fc : cutoff frequency, 0 < _fc < 0.5 */ \
/* _As : stop-band attenuation [dB], _As > 0 */ \
FIRFILT() FIRFILT(_create_firdespm)(unsigned int _h_len, \
float _fc, \
float _As); \
\
/* Create rectangular filter prototype; that is */ \ /* Create rectangular filter prototype; that is */ \
/* \( \vec{h} = \{ 1, 1, 1, \ldots 1 \} \) */ \ /* \( \vec{h} = \{ 1, 1, 1, \ldots 1 \} \) */ \
/* _n : length of filter [samples], 0 < _n <= 1024 */ \ /* _n : length of filter [samples], 0 < _n <= 1024 */ \
@ -3231,6 +3240,16 @@ FIRINTERP() FIRINTERP(_create_prototype)(int _type, \
float _beta, \ float _beta, \
float _dt); \ float _dt); \
\ \
/* Create linear interpolator object */ \
/* _M : interpolation factor, _M > 1 */ \
FIRINTERP() FIRINTERP(_create_linear)(unsigned int _M); \
\
/* Create window interpolator object */ \
/* _M : interpolation factor, _M > 1 */ \
/* _m : filter semi-length, _m > 0 */ \
FIRINTERP() FIRINTERP(_create_window)(unsigned int _M, \
unsigned int _m); \
\
/* Destroy firinterp object, freeing all internal memory */ \ /* Destroy firinterp object, freeing all internal memory */ \
void FIRINTERP(_destroy)(FIRINTERP() _q); \ void FIRINTERP(_destroy)(FIRINTERP() _q); \
\ \
@ -4618,6 +4637,7 @@ void qpilotsync_execute(qpilotsync _q,
float qpilotsync_get_dphi(qpilotsync _q); float qpilotsync_get_dphi(qpilotsync _q);
float qpilotsync_get_phi (qpilotsync _q); float qpilotsync_get_phi (qpilotsync _q);
float qpilotsync_get_gain(qpilotsync _q); float qpilotsync_get_gain(qpilotsync _q);
float qpilotsync_get_evm (qpilotsync _q);
// //
@ -4640,8 +4660,8 @@ void framegen64_print(framegen64 _q);
// generate frame // generate frame
// _q : frame generator object // _q : frame generator object
// _header : 8-byte header data // _header : 8-byte header data, NULL for random
// _payload : 64-byte payload data // _payload : 64-byte payload data, NULL for random
// _frame : output frame samples [size: LIQUID_FRAME64_LEN x 1] // _frame : output frame samples [size: LIQUID_FRAME64_LEN x 1]
void framegen64_execute(framegen64 _q, void framegen64_execute(framegen64 _q,
unsigned char * _header, unsigned char * _header,
@ -4678,6 +4698,10 @@ void framesync64_debug_enable(framesync64 _q);
void framesync64_debug_disable(framesync64 _q); void framesync64_debug_disable(framesync64 _q);
void framesync64_debug_print(framesync64 _q, const char * _filename); void framesync64_debug_print(framesync64 _q, const char * _filename);
// frame data statistics
void framesync64_reset_framedatastats(framesync64 _q);
framedatastats_s framesync64_get_framedatastats (framesync64 _q);
#if 0 #if 0
// advanced modes // advanced modes
void framesync64_set_csma_callbacks(framesync64 _q, void framesync64_set_csma_callbacks(framesync64 _q,
@ -5194,6 +5218,10 @@ float ofdmflexframesync_get_rssi(ofdmflexframesync _q);
// query the received carrier offset estimate // query the received carrier offset estimate
float ofdmflexframesync_get_cfo(ofdmflexframesync _q); float ofdmflexframesync_get_cfo(ofdmflexframesync _q);
// frame data statistics
void ofdmflexframesync_reset_framedatastats(ofdmflexframesync _q);
framedatastats_s ofdmflexframesync_get_framedatastats (ofdmflexframesync _q);
// set the received carrier offset estimate // set the received carrier offset estimate
void ofdmflexframesync_set_cfo(ofdmflexframesync _q, float _cfo); void ofdmflexframesync_set_cfo(ofdmflexframesync _q, float _cfo);
@ -5855,7 +5883,7 @@ float liquid_nchoosek(unsigned int _n, unsigned int _k);
// Windowing functions // Windowing functions
// //
// Modulation schemes available // number of window functions available, including "unknown" type
#define LIQUID_WINDOW_NUM_FUNCTIONS (10) #define LIQUID_WINDOW_NUM_FUNCTIONS (10)
// prototypes // prototypes
@ -5882,73 +5910,85 @@ void liquid_print_windows();
// returns window type based on input string // returns window type based on input string
liquid_window_type liquid_getopt_str2window(const char * _str); liquid_window_type liquid_getopt_str2window(const char * _str);
// Kaiser-Bessel derived window (single sample) // generic window function given type
// _n : index (0 <= _n < _N) // _type : window type, e.g. LIQUID_WINDOW_KAISER
// _N : length of filter (must be even) // _i : window index, _i in [0,_wlen-1]
// _beta : Kaiser window parameter (_beta > 0) // _wlen : length of window
float liquid_kbd(unsigned int _n, unsigned int _N, float _beta); // _arg : window-specific argument, if required
float liquid_windowf(liquid_window_type _type,
// Kaiser-Bessel derived window (full window) unsigned int _i,
// _n : length of filter (must be even) unsigned int _wlen,
// _beta : Kaiser window parameter (_beta > 0) float _arg);
// _w : resulting window
void liquid_kbd_window(unsigned int _n, float _beta, float * _w);
// Kaiser window // Kaiser window
// _n : window index // _i : window index, _i in [0,_wlen-1]
// _N : full window length // _wlen : full window length
// _beta : Kaiser-Bessel window shape parameter // _beta : Kaiser-Bessel window shape parameter
// _dt : fractional sample offset float liquid_kaiser(unsigned int _i,
float kaiser(unsigned int _n, unsigned int _wlen,
unsigned int _N, float _beta);
float _beta,
float _dt);
// Hamming window // Hamming window
// _n : window index // _i : window index, _i in [0,_wlen-1]
// _N : full window length // _wlen : full window length
float hamming(unsigned int _n, float liquid_hamming(unsigned int _i,
unsigned int _N); unsigned int _wlen);
// Hann window // Hann window
// _n : window index // _i : window index, _i in [0,_wlen-1]
// _N : full window length // _wlen : full window length
float hann(unsigned int _n, float liquid_hann(unsigned int _i,
unsigned int _N); unsigned int _wlen);
// Blackman-harris window // Blackman-harris window
// _n : window index // _i : window index, _i in [0,_wlen-1]
// _N : full window length // _wlen : full window length
float blackmanharris(unsigned int _n, float liquid_blackmanharris(unsigned int _i,
unsigned int _N); unsigned int _wlen);
// 7th order Blackman-harris window // 7th order Blackman-harris window
// _n : window index // _i : window index, _i in [0,_wlen-1]
// _N : full window length // _wlen : full window length
float blackmanharris7(unsigned int _n, float liquid_blackmanharris7(unsigned int _i,
unsigned int _N); unsigned int _wlen);
// Flat-top window // Flat-top window
// _n : window index // _i : window index, _i in [0,_wlen-1]
// _N : full window length // _wlen : full window length
float flattop(unsigned int _n, float liquid_flattop(unsigned int _i,
unsigned int _N); unsigned int _wlen);
// Triangular window // Triangular window
// _n : window index // _i : window index, _i in [0,_wlen-1]
// _N : full window length // _wlen : full window length
// _L : triangle length, _L in {_N, _N+1, _N-1} // _L : triangle length, _L in {_wlen-1, _wlen, _wlen+1}
float triangular(unsigned int _n, float liquid_triangular(unsigned int _i,
unsigned int _N, unsigned int _wlen,
unsigned int _L); unsigned int _L);
// raised-cosine tapering window // raised-cosine tapering window
// _n : window index // _i : window index
// _t : taper length // _wlen : full window length
// _N : full window length // _t : taper length, _t in [0,_wlen/2]
float liquid_rcostaper_windowf(unsigned int _n, float liquid_rcostaper_window(unsigned int _i,
unsigned int _t, unsigned int _wlen,
unsigned int _N); unsigned int _t);
// Kaiser-Bessel derived window (single sample)
// _i : window index, _i in [0,_wlen-1]
// _wlen : length of filter (must be even)
// _beta : Kaiser window parameter (_beta > 0)
float liquid_kbd(unsigned int _i,
unsigned int _wlen,
float _beta);
// Kaiser-Bessel derived window (full window)
// _wlen : full window length (must be even)
// _beta : Kaiser window parameter (_beta > 0)
// _w : window output buffer, [size: _wlen x 1]
void liquid_kbd_window(unsigned int _wlen,
float _beta,
float * _w);
// polynomials // polynomials

View File

@ -1,4 +1,4 @@
# Copyright (c) 2007 - 2018 Joseph Gaeddert # Copyright (c) 2007 - 2020 Joseph Gaeddert
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
@ -65,6 +65,7 @@ RANLIB := ranlib
# flags # flags
INCLUDE_CFLAGS = $(addprefix -I,$(include_dirs)) INCLUDE_CFLAGS = $(addprefix -I,$(include_dirs))
COVERAGE_FLAGS = # dynamic library linker needs separate flag
#MINGW: optimizations goes here, use SSSE42 for 32bit #MINGW: optimizations goes here, use SSSE42 for 32bit
CONFIG_CFLAGS = -m32 -O3 -msse4.2 -ffast-math CONFIG_CFLAGS = -m32 -O3 -msse4.2 -ffast-math
CPPFLAGS = $(INCLUDE_CFLAGS) CPPFLAGS = $(INCLUDE_CFLAGS)
@ -354,6 +355,7 @@ fft_autotests := \
src/fft/tests/fft_prime_autotest.c \ src/fft/tests/fft_prime_autotest.c \
src/fft/tests/fft_r2r_autotest.c \ src/fft/tests/fft_r2r_autotest.c \
src/fft/tests/fft_shift_autotest.c \ src/fft/tests/fft_shift_autotest.c \
src/fft/tests/spgram_autotest.c \
# additional autotest objects # additional autotest objects
autotest_extra_obj += \ autotest_extra_obj += \
@ -652,6 +654,7 @@ framing_autotests := \
src/framing/tests/detector_autotest.c \ src/framing/tests/detector_autotest.c \
src/framing/tests/flexframesync_autotest.c \ src/framing/tests/flexframesync_autotest.c \
src/framing/tests/framesync64_autotest.c \ src/framing/tests/framesync64_autotest.c \
src/framing/tests/ofdmflexframe_autotest.c \
src/framing/tests/qdetector_cccf_autotest.c \ src/framing/tests/qdetector_cccf_autotest.c \
src/framing/tests/qpacketmodem_autotest.c \ src/framing/tests/qpacketmodem_autotest.c \
src/framing/tests/qpilotsync_autotest.c \ src/framing/tests/qpilotsync_autotest.c \
@ -1124,6 +1127,7 @@ objects := \
autotest_sources := \ autotest_sources := \
autotest/null_autotest.c \ autotest/null_autotest.c \
autotest/libliquid_autotest.c \
$(agc_autotests) \ $(agc_autotests) \
$(audio_autotests) \ $(audio_autotests) \
$(buffer_autotests) \ $(buffer_autotests) \
@ -1190,7 +1194,7 @@ libliquid.ar: $(objects)
# gcc -dynamiclib -install_name libliquid.dylib -o libliquid.dylib libmodem.a libutility.a # gcc -dynamiclib -install_name libliquid.dylib -o libliquid.dylib libmodem.a libutility.a
libliquid.dylib: $(objects) libliquid.dylib: $(objects)
$(CC) -dynamiclib -install_name $@ -o $@ $^ $(LDFLAGS) $(LIBS) $(CC) -dynamiclib ${COVERAGE_FLAGS} -install_name $@ -o $@ $^ $(LDFLAGS) $(LIBS)
# #
# linux, et al # linux, et al
@ -1322,6 +1326,43 @@ clean-check:
$(RM) $(autotest_extra_obj) $(RM) $(autotest_extra_obj)
$(RM) autotest.json $(RM) autotest.json
##
## TARGET : doc-check - build and run basic documentation checks
##
readme.example.c : README.md
${SED} -n '22,42p' $< | ${SED} "s/<liquid\/liquid.h>/\"liquid.h\"/g" > $@
readme.example.o : %.o : %.c ${include_headers}
${CC} ${CPPFLAGS} ${CFLAGS} $< -c -o $@
readme.example : % : %.o ${ARCHIVE_LIB}
${CC} ${CFLAGS} ${LDFLAGS} $^ -o $@ ${LIBS}
doc-check : readme.example ; ./readme.example
clean-doc-check:
${RM} readme.example*
##
## TARGET : coverage - run coverage test and produce report
##
coverage: coverage.out
tail -n5 $<
${autotest_prog}.gcda : %.gcda : %
./${autotest_prog}
coverage.out : ${autotest_prog}.gcda
gcovr --root=src --exclude-directories=src/.*/tests --print-summary > $@
clean-coverage:
$(RM) src/*.gcda src/*/src/*.gcda src/*/tests/*.gcda src/*/tests/data/*.gcda autotest/*.gcda scripts/*.gcda
$(RM) src/*.gcno src/*/src/*.gcno src/*/tests/*.gcno src/*/tests/data/*.gcno autotest/*.gcno scripts/*.gcno
$(RM) autotest/*.gcda bench/*.gcda examples/*.gcda sandbox/*.gcda
$(RM) autotest/*.gcno bench/*.gcno examples/*.gcno sandbox/*.gcno
$(RM) *.gcda *.gcno coverage.out
## ##
## TARGET : bench - build and run all benchmarks ## TARGET : bench - build and run all benchmarks
@ -1362,7 +1403,7 @@ $(bench_prog): $(bench_prog).o $(benchmark_obj) $(benchmark_extra_obj) ${ARCHIVE
# run the benchmark program # run the benchmark program
bench: $(bench_prog) bench: $(bench_prog)
./$(bench_prog) ./$(bench_prog) -o benchmark.json
# benchmark compare script # benchmark compare script
scripts/benchmark_compare : % : %.c scripts/benchmark_compare : % : %.c
@ -1445,12 +1486,15 @@ example_programs := \
examples/firpfbchr_crcf_example \ examples/firpfbchr_crcf_example \
examples/firinterp_crcf_example \ examples/firinterp_crcf_example \
examples/firinterp_firdecim_crcf_example \ examples/firinterp_firdecim_crcf_example \
examples/firinterp_rrrf_linear_example \
examples/firinterp_rrrf_window_example \
examples/firpfbch_crcf_example \ examples/firpfbch_crcf_example \
examples/firpfbch_crcf_analysis_example \ examples/firpfbch_crcf_analysis_example \
examples/firpfbch_crcf_synthesis_example \ examples/firpfbch_crcf_synthesis_example \
examples/flexframesync_example \ examples/flexframesync_example \
examples/flexframesync_reconfig_example \ examples/flexframesync_reconfig_example \
examples/framesync64_example \ examples/framesync64_example \
examples/framesync64_performance_example \
examples/freqmodem_example \ examples/freqmodem_example \
examples/fskframesync_example \ examples/fskframesync_example \
examples/fskmodem_example \ examples/fskmodem_example \
@ -1474,6 +1518,7 @@ example_programs := \
examples/iirhilb_example \ examples/iirhilb_example \
examples/iirhilb_filter_example \ examples/iirhilb_filter_example \
examples/iirinterp_crcf_example \ examples/iirinterp_crcf_example \
examples/kaiser_window_example \
examples/kbd_window_example \ examples/kbd_window_example \
examples/lpc_example \ examples/lpc_example \
examples/libliquid_example \ examples/libliquid_example \
@ -1501,6 +1546,7 @@ example_programs := \
examples/packetizer_example \ examples/packetizer_example \
examples/packetizer_soft_example \ examples/packetizer_soft_example \
examples/pll_example \ examples/pll_example \
examples/polyfit_comparison_example \
examples/polyfit_example \ examples/polyfit_example \
examples/polyfit_lagrange_example \ examples/polyfit_lagrange_example \
examples/poly_findroots_example \ examples/poly_findroots_example \
@ -1517,6 +1563,7 @@ example_programs := \
examples/rresamp_rrrf_example \ examples/rresamp_rrrf_example \
examples/resamp_crcf_example \ examples/resamp_crcf_example \
examples/resamp_crcf_noise_example \ examples/resamp_crcf_noise_example \
examples/resamp_crcf_rate_match_example \
examples/resamp2_cccf_example \ examples/resamp2_cccf_example \
examples/resamp2_crcf_example \ examples/resamp2_crcf_example \
examples/resamp2_crcf_decim_example \ examples/resamp2_crcf_decim_example \
@ -1535,6 +1582,8 @@ example_programs := \
examples/symtrack_cccf_example \ examples/symtrack_cccf_example \
examples/wdelayf_example \ examples/wdelayf_example \
examples/windowf_example \ examples/windowf_example \
examples/window_enbw_example \
examples/windowing_example \
# examples/metadata_example # examples/metadata_example
# examples/ofdmframegen_example # examples/ofdmframegen_example
@ -1620,7 +1669,8 @@ sandbox_programs = \
sandbox/gmskmodem_coherent_test \ sandbox/gmskmodem_coherent_test \
sandbox/gmskmodem_equalizer_test \ sandbox/gmskmodem_equalizer_test \
sandbox/householder_test \ sandbox/householder_test \
sandbox/iirdes_example \ sandbox/iirdes_test \
sandbox/iirdes_gradsearch_test \
sandbox/iirfilt_intdiff_test \ sandbox/iirfilt_intdiff_test \
sandbox/levinson_test \ sandbox/levinson_test \
sandbox/matched_filter_test \ sandbox/matched_filter_test \
@ -1703,30 +1753,10 @@ world : all check bench examples sandbox
clean-modules: clean-modules:
@echo "cleaning modules..." @echo "cleaning modules..."
$(RM) src/agc/src/*.o src/agc/bench/*.o src/agc/tests/*.o $(RM) src/*/src/*.o src/*/bench/*.o src/*/tests/*.o
$(RM) src/audio/src/*.o src/audio/bench/*.o src/audio/tests/*.o
$(RM) src/buffer/src/*.o src/buffer/bench/*.o src/buffer/tests/*.o
$(RM) src/channel/src/*.o src/channel/bench/*.o src/channel/tests/*.o
$(RM) src/dotprod/src/*.o src/dotprod/bench/*.o src/dotprod/tests/*.o
$(RM) src/equalization/src/*.o src/equalization/bench/*.o src/equalization/tests/*.o
$(RM) src/fec/src/*.o src/fec/bench/*.o src/fec/tests/*.o
$(RM) src/fft/src/*.o src/fft/bench/*.o src/fft/tests/*.o
$(RM) src/filter/src/*.o src/filter/bench/*.o src/filter/tests/*.o
$(RM) src/framing/src/*.o src/framing/bench/*.o src/framing/tests/*.o
$(RM) src/math/src/*.o src/math/bench/*.o src/math/tests/*.o
$(RM) src/matrix/src/*.o src/matrix/bench/*.o src/matrix/tests/*.o
$(RM) src/modem/src/*.o src/modem/bench/*.o src/modem/tests/*.o
$(RM) src/multichannel/src/*.o src/multichannel/bench/*.o src/multichannel/tests/*.o
$(RM) src/nco/src/*.o src/nco/bench/*.o src/nco/tests/*.o
$(RM) src/optim/src/*.o src/optim/bench/*.o src/optim/tests/*.o
$(RM) src/quantization/src/*.o src/quantization/bench/*.o src/quantization/tests/*.o
$(RM) src/random/src/*.o src/random/bench/*.o src/random/tests/*.o
$(RM) src/sequence/src/*.o src/sequence/bench/*.o src/sequence/tests/*.o
$(RM) src/utility/src/*.o src/utility/bench/*.o src/utility/tests/*.o
$(RM) src/vector/src/*.o src/vector/bench/*.o src/vector/tests/*.o
$(RM) src/libliquid.o $(RM) src/libliquid.o
clean: clean-modules clean-autoscript clean-check clean-bench clean-examples clean-sandbox clean: clean-modules clean-autoscript clean-check clean-coverage clean-bench clean-examples clean-sandbox
$(RM) ${ARCHIVE_LIB} ${SHARED_LIB} $(extra_clean) $(RM) ${ARCHIVE_LIB} ${SHARED_LIB} $(extra_clean)
## ##

View File

@ -1,4 +1,4 @@
# Copyright (c) 2007 - 2019 Joseph Gaeddert # Copyright (c) 2007 - 2020 Joseph Gaeddert
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
@ -65,6 +65,7 @@ RANLIB := ranlib
# flags # flags
INCLUDE_CFLAGS = $(addprefix -I,$(include_dirs)) INCLUDE_CFLAGS = $(addprefix -I,$(include_dirs))
COVERAGE_FLAGS = # dynamic library linker needs separate flag
#MINGW: optimizations goes here, use SSSE42 for 64bit #MINGW: optimizations goes here, use SSSE42 for 64bit
CONFIG_CFLAGS = -O3 -msse4.2 -ffast-math CONFIG_CFLAGS = -O3 -msse4.2 -ffast-math
CPPFLAGS = $(INCLUDE_CFLAGS) CPPFLAGS = $(INCLUDE_CFLAGS)
@ -354,6 +355,7 @@ fft_autotests := \
src/fft/tests/fft_prime_autotest.c \ src/fft/tests/fft_prime_autotest.c \
src/fft/tests/fft_r2r_autotest.c \ src/fft/tests/fft_r2r_autotest.c \
src/fft/tests/fft_shift_autotest.c \ src/fft/tests/fft_shift_autotest.c \
src/fft/tests/spgram_autotest.c \
# additional autotest objects # additional autotest objects
autotest_extra_obj += \ autotest_extra_obj += \
@ -652,6 +654,7 @@ framing_autotests := \
src/framing/tests/detector_autotest.c \ src/framing/tests/detector_autotest.c \
src/framing/tests/flexframesync_autotest.c \ src/framing/tests/flexframesync_autotest.c \
src/framing/tests/framesync64_autotest.c \ src/framing/tests/framesync64_autotest.c \
src/framing/tests/ofdmflexframe_autotest.c \
src/framing/tests/qdetector_cccf_autotest.c \ src/framing/tests/qdetector_cccf_autotest.c \
src/framing/tests/qpacketmodem_autotest.c \ src/framing/tests/qpacketmodem_autotest.c \
src/framing/tests/qpilotsync_autotest.c \ src/framing/tests/qpilotsync_autotest.c \
@ -1124,6 +1127,7 @@ objects := \
autotest_sources := \ autotest_sources := \
autotest/null_autotest.c \ autotest/null_autotest.c \
autotest/libliquid_autotest.c \
$(agc_autotests) \ $(agc_autotests) \
$(audio_autotests) \ $(audio_autotests) \
$(buffer_autotests) \ $(buffer_autotests) \
@ -1190,7 +1194,7 @@ libliquid.ar: $(objects)
# gcc -dynamiclib -install_name libliquid.dylib -o libliquid.dylib libmodem.a libutility.a # gcc -dynamiclib -install_name libliquid.dylib -o libliquid.dylib libmodem.a libutility.a
libliquid.dylib: $(objects) libliquid.dylib: $(objects)
$(CC) -dynamiclib -install_name $@ -o $@ $^ $(LDFLAGS) $(LIBS) $(CC) -dynamiclib ${COVERAGE_FLAGS} -install_name $@ -o $@ $^ $(LDFLAGS) $(LIBS)
# #
# linux, et al # linux, et al
@ -1322,6 +1326,43 @@ clean-check:
$(RM) $(autotest_extra_obj) $(RM) $(autotest_extra_obj)
$(RM) autotest.json $(RM) autotest.json
##
## TARGET : doc-check - build and run basic documentation checks
##
readme.example.c : README.md
${SED} -n '22,42p' $< | ${SED} "s/<liquid\/liquid.h>/\"liquid.h\"/g" > $@
readme.example.o : %.o : %.c ${include_headers}
${CC} ${CPPFLAGS} ${CFLAGS} $< -c -o $@
readme.example : % : %.o ${ARCHIVE_LIB}
${CC} ${CFLAGS} ${LDFLAGS} $^ -o $@ ${LIBS}
doc-check : readme.example ; ./readme.example
clean-doc-check:
${RM} readme.example*
##
## TARGET : coverage - run coverage test and produce report
##
coverage: coverage.out
tail -n5 $<
${autotest_prog}.gcda : %.gcda : %
./${autotest_prog}
coverage.out : ${autotest_prog}.gcda
gcovr --root=src --exclude-directories=src/.*/tests --print-summary > $@
clean-coverage:
$(RM) src/*.gcda src/*/src/*.gcda src/*/tests/*.gcda src/*/tests/data/*.gcda autotest/*.gcda scripts/*.gcda
$(RM) src/*.gcno src/*/src/*.gcno src/*/tests/*.gcno src/*/tests/data/*.gcno autotest/*.gcno scripts/*.gcno
$(RM) autotest/*.gcda bench/*.gcda examples/*.gcda sandbox/*.gcda
$(RM) autotest/*.gcno bench/*.gcno examples/*.gcno sandbox/*.gcno
$(RM) *.gcda *.gcno coverage.out
## ##
## TARGET : bench - build and run all benchmarks ## TARGET : bench - build and run all benchmarks
@ -1362,7 +1403,7 @@ $(bench_prog): $(bench_prog).o $(benchmark_obj) $(benchmark_extra_obj) ${ARCHIVE
# run the benchmark program # run the benchmark program
bench: $(bench_prog) bench: $(bench_prog)
./$(bench_prog) ./$(bench_prog) -o benchmark.json
# benchmark compare script # benchmark compare script
scripts/benchmark_compare : % : %.c scripts/benchmark_compare : % : %.c
@ -1445,12 +1486,15 @@ example_programs := \
examples/firpfbchr_crcf_example \ examples/firpfbchr_crcf_example \
examples/firinterp_crcf_example \ examples/firinterp_crcf_example \
examples/firinterp_firdecim_crcf_example \ examples/firinterp_firdecim_crcf_example \
examples/firinterp_rrrf_linear_example \
examples/firinterp_rrrf_window_example \
examples/firpfbch_crcf_example \ examples/firpfbch_crcf_example \
examples/firpfbch_crcf_analysis_example \ examples/firpfbch_crcf_analysis_example \
examples/firpfbch_crcf_synthesis_example \ examples/firpfbch_crcf_synthesis_example \
examples/flexframesync_example \ examples/flexframesync_example \
examples/flexframesync_reconfig_example \ examples/flexframesync_reconfig_example \
examples/framesync64_example \ examples/framesync64_example \
examples/framesync64_performance_example \
examples/freqmodem_example \ examples/freqmodem_example \
examples/fskframesync_example \ examples/fskframesync_example \
examples/fskmodem_example \ examples/fskmodem_example \
@ -1474,6 +1518,7 @@ example_programs := \
examples/iirhilb_example \ examples/iirhilb_example \
examples/iirhilb_filter_example \ examples/iirhilb_filter_example \
examples/iirinterp_crcf_example \ examples/iirinterp_crcf_example \
examples/kaiser_window_example \
examples/kbd_window_example \ examples/kbd_window_example \
examples/lpc_example \ examples/lpc_example \
examples/libliquid_example \ examples/libliquid_example \
@ -1501,6 +1546,7 @@ example_programs := \
examples/packetizer_example \ examples/packetizer_example \
examples/packetizer_soft_example \ examples/packetizer_soft_example \
examples/pll_example \ examples/pll_example \
examples/polyfit_comparison_example \
examples/polyfit_example \ examples/polyfit_example \
examples/polyfit_lagrange_example \ examples/polyfit_lagrange_example \
examples/poly_findroots_example \ examples/poly_findroots_example \
@ -1517,6 +1563,7 @@ example_programs := \
examples/rresamp_rrrf_example \ examples/rresamp_rrrf_example \
examples/resamp_crcf_example \ examples/resamp_crcf_example \
examples/resamp_crcf_noise_example \ examples/resamp_crcf_noise_example \
examples/resamp_crcf_rate_match_example \
examples/resamp2_cccf_example \ examples/resamp2_cccf_example \
examples/resamp2_crcf_example \ examples/resamp2_crcf_example \
examples/resamp2_crcf_decim_example \ examples/resamp2_crcf_decim_example \
@ -1535,6 +1582,8 @@ example_programs := \
examples/symtrack_cccf_example \ examples/symtrack_cccf_example \
examples/wdelayf_example \ examples/wdelayf_example \
examples/windowf_example \ examples/windowf_example \
examples/window_enbw_example \
examples/windowing_example \
# examples/metadata_example # examples/metadata_example
# examples/ofdmframegen_example # examples/ofdmframegen_example
@ -1620,7 +1669,8 @@ sandbox_programs = \
sandbox/gmskmodem_coherent_test \ sandbox/gmskmodem_coherent_test \
sandbox/gmskmodem_equalizer_test \ sandbox/gmskmodem_equalizer_test \
sandbox/householder_test \ sandbox/householder_test \
sandbox/iirdes_example \ sandbox/iirdes_test \
sandbox/iirdes_gradsearch_test \
sandbox/iirfilt_intdiff_test \ sandbox/iirfilt_intdiff_test \
sandbox/levinson_test \ sandbox/levinson_test \
sandbox/matched_filter_test \ sandbox/matched_filter_test \
@ -1703,30 +1753,10 @@ world : all check bench examples sandbox
clean-modules: clean-modules:
@echo "cleaning modules..." @echo "cleaning modules..."
$(RM) src/agc/src/*.o src/agc/bench/*.o src/agc/tests/*.o $(RM) src/*/src/*.o src/*/bench/*.o src/*/tests/*.o
$(RM) src/audio/src/*.o src/audio/bench/*.o src/audio/tests/*.o
$(RM) src/buffer/src/*.o src/buffer/bench/*.o src/buffer/tests/*.o
$(RM) src/channel/src/*.o src/channel/bench/*.o src/channel/tests/*.o
$(RM) src/dotprod/src/*.o src/dotprod/bench/*.o src/dotprod/tests/*.o
$(RM) src/equalization/src/*.o src/equalization/bench/*.o src/equalization/tests/*.o
$(RM) src/fec/src/*.o src/fec/bench/*.o src/fec/tests/*.o
$(RM) src/fft/src/*.o src/fft/bench/*.o src/fft/tests/*.o
$(RM) src/filter/src/*.o src/filter/bench/*.o src/filter/tests/*.o
$(RM) src/framing/src/*.o src/framing/bench/*.o src/framing/tests/*.o
$(RM) src/math/src/*.o src/math/bench/*.o src/math/tests/*.o
$(RM) src/matrix/src/*.o src/matrix/bench/*.o src/matrix/tests/*.o
$(RM) src/modem/src/*.o src/modem/bench/*.o src/modem/tests/*.o
$(RM) src/multichannel/src/*.o src/multichannel/bench/*.o src/multichannel/tests/*.o
$(RM) src/nco/src/*.o src/nco/bench/*.o src/nco/tests/*.o
$(RM) src/optim/src/*.o src/optim/bench/*.o src/optim/tests/*.o
$(RM) src/quantization/src/*.o src/quantization/bench/*.o src/quantization/tests/*.o
$(RM) src/random/src/*.o src/random/bench/*.o src/random/tests/*.o
$(RM) src/sequence/src/*.o src/sequence/bench/*.o src/sequence/tests/*.o
$(RM) src/utility/src/*.o src/utility/bench/*.o src/utility/tests/*.o
$(RM) src/vector/src/*.o src/vector/bench/*.o src/vector/tests/*.o
$(RM) src/libliquid.o $(RM) src/libliquid.o
clean: clean-modules clean-autoscript clean-check clean-bench clean-examples clean-sandbox clean: clean-modules clean-autoscript clean-check clean-coverage clean-bench clean-examples clean-sandbox
$(RM) ${ARCHIVE_LIB} ${SHARED_LIB} $(extra_clean) $(RM) ${ARCHIVE_LIB} ${SHARED_LIB} $(extra_clean)
## ##

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.