diff --git a/.gitignore b/.gitignore index d4f043a84..fd5c735af 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,9 @@ # ignore swap files for vim editing *.swp +*~ -# build objects +# build objects autom4te.cache aclocal.m4 diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..623908146 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,1082 @@ +project(liquid-dsp C) + +cmake_minimum_required(VERSION 3.0) + +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") + +set(LIQUID_VERSION "1.2.0") + +include(CheckCPUID) +include(CheckIncludeFile) +include(CheckLibraryExists) +include(CheckTypeSize) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) + +option(LIQUID_FFTOVERRIDE "Force internal FFT even if libfftw is available" OFF) +option(LIQUID_SIMDOVERRIDE "Force overriding of SIMD (use portable C code)" OFF) +option(LIQUID_FORCE_X86_MMX "Force MMX (useful for cross-compiling)" OFF) +option(LIQUID_FORCE_X86_SSE "Force SSE (useful for cross-compiling)" OFF) +option(LIQUID_FORCE_X86_SSE2 "Force SSE2 (useful for cross-compiling)" OFF) +option(LIQUID_FORCE_X86_SSE3 "Force SSE3 (useful for cross-compiling)" OFF) +option(LIQUID_FORCE_X86_SSSE3 "Force SSSE3 (useful for cross-compiling)" OFF) +option(LIQUID_FORCE_X86_SSE41 "Force SSE4.1 (useful for cross-compiling)" OFF) +option(LIQUID_FORCE_X86_SSE42 "Force SSE4.2 (useful for cross-compiling)" OFF) +option(LIQUID_FORCE_X86_AVX "Force AVX (useful for cross-compiling)" OFF) +option(LIQUID_FORCE_PPC_ALTIVEC "Force AltiVec (useful for cross-compiling)" OFF) +option(LIQUID_FORCE_ARM_NEON "Force NEON (useful for cross-compiling)" OFF) +option(LIQUID_FORCE_ARM64_NEON "Force AArch64 NEON (useful for cross-compiling)" OFF) + +CHECK_INCLUDE_FILE(sys/resource.h HAVE_SYS_RESOURCE_H) + +CHECK_INCLUDE_FILE(complex.h HAVE_COMPLEX_H) +CHECK_INCLUDE_FILE(float.h HAVE_FLOAT_H) +CHECK_INCLUDE_FILE(getopt.h HAVE_GETOPT_H) +CHECK_INCLUDE_FILE(inttypes.h HAVE_INTTYPES_H) +CHECK_INCLUDE_FILE(memory.h HAVE_MEMORY_H) +CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H) + +CHECK_INCLUDE_FILE(mmintrin.h HAVE_MMINTRIN_H) +CHECK_INCLUDE_FILE(emmintrin.h HAVE_EMMINTRIN_H) +CHECK_INCLUDE_FILE(immintrin.h HAVE_IMMINTRIN_H) +CHECK_INCLUDE_FILE(pmmintrin.h HAVE_PMMINTRIN_H) +CHECK_INCLUDE_FILE(smmintrin.h HAVE_SMMINTRIN_H) +CHECK_INCLUDE_FILE(tmmintrin.h HAVE_TMMINTRIN_H) +CHECK_INCLUDE_FILE(xmmintrin.h HAVE_XMMINTRIN_H) + +CHECK_INCLUDE_FILE(fec.h HAVE_FEC_H) +CHECK_INCLUDE_FILE(fftw3.h HAVE_FFTW3_H) + +CHECK_TYPE_SIZE(int SIZEOF_INT) +CHECK_TYPE_SIZE("unsigned int" SIZEOF_UNSIGNED_INT) + +if (LIQUID_FORCE_X86_MMX) + set(HAVE_MMX TRUE) +else () + CHECK_CPUID("mmx" HAVE_MMX) +endif () +if (LIQUID_FORCE_X86_SSE) + set(HAVE_SSE TRUE) +else () + CHECK_CPUID("sse" HAVE_SSE) +endif () +if (LIQUID_FORCE_X86_SSE2) + set(HAVE_SSE2 TRUE) +else () + CHECK_CPUID("sse2" HAVE_SSE2) +endif () +if (LIQUID_FORCE_X86_SSE3) + set(HAVE_SSE3 TRUE) +else () + CHECK_CPUID("sse3" HAVE_SSE3) +endif () +if (LIQUID_FORCE_X86_SSSE3) + set(HAVE_SSSE3 TRUE) +else () + CHECK_CPUID("ssse3" HAVE_SSSE3) +endif () +if (LIQUID_FORCE_X86_SSE41) + set(HAVE_SSE41 TRUE) +else () + CHECK_CPUID("sse41" HAVE_SSE41) +endif () +if (LIQUID_FORCE_X86_SSE42) + set(HAVE_SSE42 TRUE) +else () + CHECK_CPUID("sse42" HAVE_SSE42) +endif () +if (LIQUID_FORCE_X86_AVX) + set(HAVE_AVX TRUE) +else () + CHECK_CPUID("avx" HAVE_AVX) +endif () +if (LIQUID_FORCE_PPC_ALTIVEC) + set(HAVE_ALTIVEC TRUE) +else () + CHECK_CPUID("vmx" HAVE_ALTIVEC) +endif () +if (LIQUID_FORCE_ARM_NEON) + set(HAVE_NEON TRUE) +else () + CHECK_CPUID("neon" HAVE_NEON) +endif () +if (LIQUID_FORCE_ARM64_NEON) + set(HAVE_NEON64 TRUE) +else () + CHECK_CPUID("neon64" HAVE_NEON64) +endif () + +CHECK_LIBRARY_EXISTS(m sqrtf "" HAVE_LIBM) + +if (HAVE_FEC_H) + CHECK_LIBRARY_EXISTS(fec create_viterbi27 "" HAVE_LIBFEC) +endif () +if (HAVE_FFTW3_H) + CHECK_LIBRARY_EXISTS(fftw3f fftwf_plan_dft_1d "" HAVE_LIBFFTW3F) +endif () + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/include/config.h) + +# +# Build compilation extra flags +# +if (CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang") + if (HAVE_AVX) + set(_EXTRA_C_FLAGS "-mavx") + elseif (HAVE_SSE42) + set(_EXTRA_C_FLAGS "-msse4.2") + elseif (HAVE_SSE41) + set(_EXTRA_C_FLAGS "-msse4.1") + elseif (HAVE_SSSE3) + set(_EXTRA_C_FLAGS "-mssse3") + elseif (HAVE_SSE3) + set(_EXTRA_C_FLAGS "-msse3") + elseif (HAVE_SSE2) + set(_EXTRA_C_FLAGS "-msse2") + elseif (HAVE_SSE) + set(_EXTRA_C_FLAGS "-msse") + elseif (HAVE_MMX) + set(_EXTRA_C_FLAGS "-mmmx") + elseif (HAVE_ALTIVEC) + if (CMAKE_SYSTEM_NAME MATCHES "Darwin") + set(_EXTRA_C_FLAGS "-fno-common -faltivec") + else () + set(_EXTRA_C_FLAGS "-maltivec") + endif () + elseif (HAVE_NEON) + set(_EXTRA_C_FLAGS "-mfpu=neon-vfpv4") + elseif (HAVE_NEON64) + # No extra flags needed + endif () + set(_EXTRA_C_FLAGS "${_EXTRA_C_FLAGS} -ffast-math") +endif () + +# +# MODULE : agc - automatic gain control +# + +set(agc_SOURCES + src/agc/src/agc_crcf.c + src/agc/src/agc_rrrf.c + ) + +set(agc_AUTOTESTS_SOURCES + src/agc/tests/agc_crcf_autotest.c + ) + +set(agc_BENCHMARK_SOURCES + src/agc/tests/agc_crcf_benchmark.c + ) + +# +# MODULE : audio +# + +set(audio_SOURCES + src/audio/src/cvsd.c + ) + +set(audio_AUTOTESTS_SOURCES + src/audio/tests/cvsd_autotest.c + ) + +set(audio_BENCHMARK_SOURCES + src/audio/tests/cvsd_benchmark.c + ) + +# +# MODULE : buffer +# + +set(buffer_SOURCES + src/buffer/src/bufferf.c + src/buffer/src/buffercf.c + ) + +set(buffer_AUTOTESTS_SOURCES + src/buffer/tests/cbuffer_autotest.c + src/buffer/tests/wdelay_autotest.c + src/buffer/tests/window_autotest.c + #src/buffer/tests/sbuffer_autotest.c + ) + +set(buffer_BENCHMARK_SOURCES + src/buffer/tests/cbuffercf_benchmark.c + src/buffer/tests/window_push_benchmark.c + src/buffer/tests/window_read_benchmark.c + ) + +# +# MODULE : channel +# + +set(channel_SOURCES + src/channel/src/channel_cccf.c + ) + +set(channel_AUTOTESTS_SOURCES + ) + +set(channel_BENCHMARK_SOURCES + ) + +# +# MODULE : dotprod +# + +set(dotprod_C_SOURCES + src/dotprod/src/dotprod_cccf.c + src/dotprod/src/dotprod_crcf.c + src/dotprod/src/dotprod_rrrf.c + src/dotprod/src/sumsq.c + ) + +# PowerPC AltiVec +set(dotprod_ALTIVEC_SOURCES + src/dotprod/src/dotprod_cccf.c + src/dotprod/src/dotprod_crcf.av.c + src/dotprod/src/dotprod_rrrf.av.c + src/dotprod/src/sumsq.c + ) + +# Intel MMX/SSE/AVX +set(dotprod_SSE_SOURCES + src/dotprod/src/dotprod_cccf.mmx.c + src/dotprod/src/dotprod_crcf.mmx.c + src/dotprod/src/dotprod_rrrf.mmx.c + src/dotprod/src/sumsq.mmx.c + ) + +# ARM NEON +set(dotprod_NEON_SOURCES + src/dotprod/src/dotprod_cccf.neon.c + src/dotprod/src/dotprod_crcf.neon.c + src/dotprod/src/dotprod_rrrf.neon.c + src/dotprod/src/sumsq.c + ) + +set(dotprod_AUTOTESTS_SOURCES + src/dotprod/tests/dotprod_rrrf_autotest.c + src/dotprod/tests/dotprod_crcf_autotest.c + src/dotprod/tests/dotprod_cccf_autotest.c + src/dotprod/tests/sumsqf_autotest.c + src/dotprod/tests/sumsqcf_autotest.c + ) + +set(dotprod_BENCHMARK_SOURCES + src/dotprod/bench/dotprod_cccf_benchmark.c + src/dotprod/bench/dotprod_crcf_benchmark.c + src/dotprod/bench/dotprod_rrrf_benchmark.c + src/dotprod/bench/sumsqf_benchmark.c + src/dotprod/bench/sumsqcf_benchmark.c + ) + +if (LIQUID_SIMDOVERRIDE) + set(dotprod_SOURCES ${dotprod_C_SOURCES}) +elseif (HAVE_MMX OR HAVE_SSE OR HAVE_SSE2 OR HAVE_SSE3 OR HAVE_SSSE3 OR HAVE_SSE41 OR HAVE_SSE42 OR HAVE_AVX) + set(dotprod_SOURCES ${dotprod_SSE_SOURCES}) +elseif (HAVE_ALTIVEC) + set(dotprod_SOURCES ${dotprod_ALTIVEC_SOURCES}) +elseif (HAVE_NEON OR HAVE_NEON64) + set(dotprod_SOURCES ${dotprod_NEON_SOURCES}) +else () + set(dotprod_SOURCES ${dotprod_C_SOURCES}) +endif () + + +# +# MODULE : equalization +# + +set(equalization_SOURCES + src/equalization/src/equalizer_cccf.c + src/equalization/src/equalizer_rrrf.c + ) + +set(equalization_AUTOTESTS_SOURCES + src/equalization/tests/eqlms_cccf_autotest.c + src/equalization/tests/eqrls_rrrf_autotest.c + ) + +set(equalization_BENCHMARK_SOURCES + src/equalization/bench/eqlms_cccf_benchmark.c + src/equalization/bench/eqrls_cccf_benchmark.c + ) + +# +# MODULE : fec - forward error-correction +# +set(fec_SOURCES + src/fec/src/crc.c + src/fec/src/fec.c + src/fec/src/fec_conv.c + src/fec/src/fec_conv_poly.c + src/fec/src/fec_conv_pmatrix.c + src/fec/src/fec_conv_punctured.c + src/fec/src/fec_golay2412.c + src/fec/src/fec_hamming74.c + src/fec/src/fec_hamming84.c + src/fec/src/fec_hamming128.c + src/fec/src/fec_hamming1511.c + src/fec/src/fec_hamming3126.c + src/fec/src/fec_hamming128_gentab.c + src/fec/src/fec_pass.c + src/fec/src/fec_rep3.c + src/fec/src/fec_rep5.c + src/fec/src/fec_rs.c + src/fec/src/fec_secded2216.c + src/fec/src/fec_secded3932.c + src/fec/src/fec_secded7264.c + src/fec/src/interleaver.c + src/fec/src/packetizer.c + src/fec/src/sumproduct.c + ) + +set(fec_AUTOTESTS_SOURCES + src/fec/tests/crc_autotest.c + src/fec/tests/fec_autotest.c + src/fec/tests/fec_soft_autotest.c + src/fec/tests/fec_golay2412_autotest.c + src/fec/tests/fec_hamming74_autotest.c + src/fec/tests/fec_hamming84_autotest.c + src/fec/tests/fec_hamming128_autotest.c + src/fec/tests/fec_hamming1511_autotest.c + src/fec/tests/fec_hamming3126_autotest.c + src/fec/tests/fec_reedsolomon_autotest.c + src/fec/tests/fec_rep3_autotest.c + src/fec/tests/fec_rep5_autotest.c + src/fec/tests/fec_secded2216_autotest.c + src/fec/tests/fec_secded3932_autotest.c + src/fec/tests/fec_secded7264_autotest.c + src/fec/tests/interleaver_autotest.c + src/fec/tests/packetizer_autotest.c + ) + +set(fec_BENCHMARKS_SOURCES + src/fec/bench/crc_benchmark.c + src/fec/bench/fec_encode_benchmark.c + src/fec/bench/fec_decode_benchmark.c + src/fec/bench/fecsoft_decode_benchmark.c + src/fec/bench/sumproduct_benchmark.c + src/fec/bench/interleaver_benchmark.c + src/fec/bench/packetizer_decode_benchmark.c + ) + +# +# MODULE : fft - fast Fourier transforms, discrete sine/cosine transforms, etc. +# +set(fft_SOURCES + src/fft/src/fftf.c + src/fft/src/spgramcf.c + src/fft/src/spgramf.c + src/fft/src/fft_utilities.c + ) + +set(fft_AUTOTESTS_SOURCES + src/fft/tests/fft_small_autotest.c + src/fft/tests/fft_radix2_autotest.c + src/fft/tests/fft_composite_autotest.c + src/fft/tests/fft_prime_autotest.c + src/fft/tests/fft_r2r_autotest.c + src/fft/tests/fft_shift_autotest.c + ) + +set(autotest_EXTRA_SOURCES ${autotest_EXTRA_SOURCES} + src/fft/tests/fft_runtest.c + src/fft/tests/data/fft_data_2.c + src/fft/tests/data/fft_data_3.c + src/fft/tests/data/fft_data_4.c + src/fft/tests/data/fft_data_5.c + src/fft/tests/data/fft_data_6.c + src/fft/tests/data/fft_data_7.c + src/fft/tests/data/fft_data_8.c + src/fft/tests/data/fft_data_9.c + src/fft/tests/data/fft_data_10.c + src/fft/tests/data/fft_data_16.c + src/fft/tests/data/fft_data_17.c + src/fft/tests/data/fft_data_20.c + src/fft/tests/data/fft_data_21.c + src/fft/tests/data/fft_data_22.c + src/fft/tests/data/fft_data_24.c + src/fft/tests/data/fft_data_26.c + src/fft/tests/data/fft_data_30.c + src/fft/tests/data/fft_data_32.c + src/fft/tests/data/fft_data_35.c + src/fft/tests/data/fft_data_36.c + src/fft/tests/data/fft_data_43.c + src/fft/tests/data/fft_data_48.c + src/fft/tests/data/fft_data_63.c + src/fft/tests/data/fft_data_64.c + src/fft/tests/data/fft_data_79.c + src/fft/tests/data/fft_data_92.c + src/fft/tests/data/fft_data_96.c + src/fft/tests/data/fft_data_120.c + src/fft/tests/data/fft_data_130.c + src/fft/tests/data/fft_data_157.c + src/fft/tests/data/fft_data_192.c + src/fft/tests/data/fft_data_317.c + src/fft/tests/data/fft_data_509.c + src/fft/tests/data/fft_r2rdata_8.c + src/fft/tests/data/fft_r2rdata_27.c + src/fft/tests/data/fft_r2rdata_32.c + ) + +set(fft_BENCHMARKS_SOURCES + src/fft/bench/fft_composite_benchmark.c + src/fft/bench/fft_prime_benchmark.c + src/fft/bench/fft_radix2_benchmark.c + src/fft/bench/fft_r2r_benchmark.c + ) + +set(benchmark_EXTRA_SOURCES ${benchmark_EXTRA_SOURCES} + src/fft/bench/fft_runbench.c + ) + +# +# MODULE : filter +# +set(filter_SOURCES + src/filter/src/bessel.c + src/filter/src/butter.c + src/filter/src/cheby1.c + src/filter/src/cheby2.c + src/filter/src/ellip.c + src/filter/src/filter_rrrf.c + src/filter/src/filter_crcf.c + src/filter/src/filter_cccf.c + src/filter/src/firdes.c + src/filter/src/firdespm.c + src/filter/src/fnyquist.c + src/filter/src/gmsk.c + src/filter/src/group_delay.c + src/filter/src/hM3.c + src/filter/src/iirdes.pll.c + src/filter/src/iirdes.c + src/filter/src/lpc.c + src/filter/src/rcos.c + src/filter/src/rkaiser.c + src/filter/src/rrcos.c + ) + +set(filter_AUTOTESTS_SOURCES + src/filter/tests/fftfilt_xxxf_autotest.c + src/filter/tests/filter_crosscorr_autotest.c + src/filter/tests/firdecim_xxxf_autotest.c + src/filter/tests/firdes_autotest.c + src/filter/tests/firdespm_autotest.c + src/filter/tests/firfilt_xxxf_autotest.c + src/filter/tests/firhilb_autotest.c + src/filter/tests/firinterp_autotest.c + src/filter/tests/firpfb_autotest.c + src/filter/tests/groupdelay_autotest.c + src/filter/tests/iirdes_autotest.c + src/filter/tests/iirfilt_xxxf_autotest.c + src/filter/tests/iirfiltsos_rrrf_autotest.c + src/filter/tests/msresamp_crcf_autotest.c + src/filter/tests/resamp_crcf_autotest.c + src/filter/tests/resamp2_crcf_autotest.c + src/filter/tests/symsync_crcf_autotest.c + src/filter/tests/symsync_rrrf_autotest.c + ) + +set(autotest_EXTRA_SOURCES ${autotest_EXTRA_SOURCES} + src/filter/tests/fftfilt_runtest.c + + src/filter/tests/data/fftfilt_rrrf_data_h4x256.c + src/filter/tests/data/fftfilt_crcf_data_h4x256.c + src/filter/tests/data/fftfilt_cccf_data_h4x256.c + + src/filter/tests/data/fftfilt_rrrf_data_h7x256.c + src/filter/tests/data/fftfilt_crcf_data_h7x256.c + src/filter/tests/data/fftfilt_cccf_data_h7x256.c + + src/filter/tests/data/fftfilt_rrrf_data_h13x256.c + src/filter/tests/data/fftfilt_crcf_data_h13x256.c + src/filter/tests/data/fftfilt_cccf_data_h13x256.c + + src/filter/tests/data/fftfilt_rrrf_data_h23x256.c + src/filter/tests/data/fftfilt_crcf_data_h23x256.c + src/filter/tests/data/fftfilt_cccf_data_h23x256.c + + src/filter/tests/firdecim_runtest.c + + src/filter/tests/data/firdecim_rrrf_data_M2h4x20.c + src/filter/tests/data/firdecim_crcf_data_M2h4x20.c + src/filter/tests/data/firdecim_cccf_data_M2h4x20.c + + src/filter/tests/data/firdecim_rrrf_data_M3h7x30.c + src/filter/tests/data/firdecim_crcf_data_M3h7x30.c + src/filter/tests/data/firdecim_cccf_data_M3h7x30.c + + src/filter/tests/data/firdecim_rrrf_data_M4h13x40.c + src/filter/tests/data/firdecim_crcf_data_M4h13x40.c + src/filter/tests/data/firdecim_cccf_data_M4h13x40.c + + src/filter/tests/data/firdecim_rrrf_data_M5h23x50.c + src/filter/tests/data/firdecim_crcf_data_M5h23x50.c + src/filter/tests/data/firdecim_cccf_data_M5h23x50.c + + src/filter/tests/firfilt_runtest.c + + src/filter/tests/data/firfilt_rrrf_data_h4x8.c + src/filter/tests/data/firfilt_crcf_data_h4x8.c + src/filter/tests/data/firfilt_cccf_data_h4x8.c + + src/filter/tests/data/firfilt_rrrf_data_h7x16.c + src/filter/tests/data/firfilt_crcf_data_h7x16.c + src/filter/tests/data/firfilt_cccf_data_h7x16.c + + src/filter/tests/data/firfilt_rrrf_data_h13x32.c + src/filter/tests/data/firfilt_crcf_data_h13x32.c + src/filter/tests/data/firfilt_cccf_data_h13x32.c + + src/filter/tests/data/firfilt_rrrf_data_h23x64.c + src/filter/tests/data/firfilt_crcf_data_h23x64.c + src/filter/tests/data/firfilt_cccf_data_h23x64.c + + src/filter/tests/iirfilt_runtest.c + + src/filter/tests/data/iirfilt_rrrf_data_h3x64.c + src/filter/tests/data/iirfilt_crcf_data_h3x64.c + src/filter/tests/data/iirfilt_cccf_data_h3x64.c + + src/filter/tests/data/iirfilt_rrrf_data_h5x64.c + src/filter/tests/data/iirfilt_crcf_data_h5x64.c + src/filter/tests/data/iirfilt_cccf_data_h5x64.c + + src/filter/tests/data/iirfilt_rrrf_data_h7x64.c + src/filter/tests/data/iirfilt_crcf_data_h7x64.c + src/filter/tests/data/iirfilt_cccf_data_h7x64.c + ) + +set(filter_BENCHMARKS_SOURCES + src/filter/bench/fftfilt_crcf_benchmark.c + src/filter/bench/firdecim_crcf_benchmark.c + src/filter/bench/firhilb_benchmark.c + src/filter/bench/firinterp_crcf_benchmark.c + src/filter/bench/firfilt_crcf_benchmark.c + src/filter/bench/iirdecim_crcf_benchmark.c + src/filter/bench/iirfilt_crcf_benchmark.c + src/filter/bench/iirinterp_crcf_benchmark.c + src/filter/bench/resamp_crcf_benchmark.c + src/filter/bench/resamp2_crcf_benchmark.c + src/filter/bench/symsync_crcf_benchmark.c + ) + +# +# MODULE : framing +# +set(framing_SOURCES + src/framing/src/bpacketgen.c + src/framing/src/bpacketsync.c + src/framing/src/bpresync_cccf.c + src/framing/src/bsync_rrrf.c + src/framing/src/bsync_crcf.c + src/framing/src/bsync_cccf.c + src/framing/src/detector_cccf.c + src/framing/src/framedatastats.c + src/framing/src/framesyncstats.c + src/framing/src/framegen64.c + src/framing/src/framesync64.c + src/framing/src/flexframegen.c + src/framing/src/flexframesync.c + src/framing/src/gmskframegen.c + src/framing/src/gmskframesync.c + src/framing/src/msourcecf.c + src/framing/src/ofdmflexframegen.c + src/framing/src/ofdmflexframesync.c + src/framing/src/presync_cccf.c + src/framing/src/symstreamcf.c + src/framing/src/symtrack_cccf.c + src/framing/src/qdetector_cccf.c + src/framing/src/qpacketmodem.c + src/framing/src/qpilotgen.c + src/framing/src/qpilotsync.c + ) + +set(framing_AUTOTESTS_SOURCES + src/framing/tests/bpacketsync_autotest.c + src/framing/tests/bsync_autotest.c + src/framing/tests/detector_autotest.c + src/framing/tests/flexframesync_autotest.c + src/framing/tests/framesync64_autotest.c + src/framing/tests/qdetector_cccf_autotest.c + src/framing/tests/qpacketmodem_autotest.c + src/framing/tests/qpilotsync_autotest.c + ) + +set(framing_BENCHMARKS_SOURCES + src/framing/bench/presync_benchmark.c + src/framing/bench/bpacketsync_benchmark.c + src/framing/bench/bpresync_benchmark.c + src/framing/bench/bsync_benchmark.c + src/framing/bench/detector_benchmark.c + src/framing/bench/flexframesync_benchmark.c + src/framing/bench/framesync64_benchmark.c + src/framing/bench/gmskframesync_benchmark.c + ) + +# +# MODULE : math +# +set(math_SOURCES + src/math/src/poly.c + src/math/src/polyc.c + src/math/src/polyf.c + src/math/src/polycf.c + src/math/src/math.c + src/math/src/math.bessel.c + src/math/src/math.gamma.c + src/math/src/math.complex.c + src/math/src/math.trig.c + src/math/src/modular_arithmetic.c + ) + +set(math_AUTOTESTS_SOURCES + src/math/tests/kbd_autotest.c + src/math/tests/math_autotest.c + src/math/tests/math_bessel_autotest.c + src/math/tests/math_gamma_autotest.c + src/math/tests/math_complex_autotest.c + src/math/tests/polynomial_autotest.c + ) + +set(math_BENCHMARKS_SOURCES + src/math/bench/polyfit_benchmark.c + ) + +# +# MODULE : matrix +# +set(matrix_SOURCES + src/matrix/src/matrix.c + src/matrix/src/matrixf.c + src/matrix/src/matrixc.c + src/matrix/src/matrixcf.c + src/matrix/src/smatrix.common.c + src/matrix/src/smatrixb.c + src/matrix/src/smatrixf.c + src/matrix/src/smatrixi.c + ) + +set(matrix_AUTOTESTS_SOURCES + src/matrix/tests/matrixcf_autotest.c + src/matrix/tests/matrixf_autotest.c + src/matrix/tests/smatrixb_autotest.c + src/matrix/tests/smatrixf_autotest.c + src/matrix/tests/smatrixi_autotest.c + ) + +set(autotest_EXTRA_SOURCES ${autotest_EXTRA_SOURCES} + src/matrix/tests/data/matrixf_data_add.c + src/matrix/tests/data/matrixf_data_aug.c + src/matrix/tests/data/matrixf_data_cgsolve.c + src/matrix/tests/data/matrixf_data_chol.c + src/matrix/tests/data/matrixf_data_gramschmidt.c + src/matrix/tests/data/matrixf_data_inv.c + src/matrix/tests/data/matrixf_data_linsolve.c + src/matrix/tests/data/matrixf_data_ludecomp.c + src/matrix/tests/data/matrixf_data_mul.c + src/matrix/tests/data/matrixf_data_qrdecomp.c + src/matrix/tests/data/matrixf_data_transmul.c + + src/matrix/tests/data/matrixcf_data_add.c + src/matrix/tests/data/matrixcf_data_aug.c + src/matrix/tests/data/matrixcf_data_chol.c + src/matrix/tests/data/matrixcf_data_inv.c + src/matrix/tests/data/matrixcf_data_linsolve.c + src/matrix/tests/data/matrixcf_data_ludecomp.c + src/matrix/tests/data/matrixcf_data_mul.c + src/matrix/tests/data/matrixcf_data_qrdecomp.c + src/matrix/tests/data/matrixcf_data_transmul.c + ) + +set(matrix_BENCHMARKS_SOURCES + src/matrix/bench/matrixf_inv_benchmark.c + src/matrix/bench/matrixf_linsolve_benchmark.c + src/matrix/bench/matrixf_mul_benchmark.c + src/matrix/bench/smatrixf_mul_benchmark.c + ) + +# +# MODULE : modem +# +set(modem_SOURCES + src/modem/src/ampmodem.c + src/modem/src/cpfskdem.c + src/modem/src/cpfskmod.c + src/modem/src/fskdem.c + src/modem/src/fskmod.c + src/modem/src/gmskdem.c + src/modem/src/gmskmod.c + src/modem/src/modemf.c + src/modem/src/modem_utilities.c + src/modem/src/modem_apsk_const.c + src/modem/src/modem_arb_const.c + ) + +set(modem_AUTOTESTS_SOURCES + src/modem/tests/cpfskmodem_autotest.c + src/modem/tests/freqmodem_autotest.c + src/modem/tests/fskmodem_autotest.c + src/modem/tests/modem_autotest.c + src/modem/tests/modem_demodsoft_autotest.c + src/modem/tests/modem_demodstats_autotest.c + ) + +set(modem_BENCHMARKS_SOURCES + src/modem/bench/freqdem_benchmark.c + src/modem/bench/freqmod_benchmark.c + src/modem/bench/fskdem_benchmark.c + src/modem/bench/fskmod_benchmark.c + src/modem/bench/gmskmodem_benchmark.c + src/modem/bench/modem_modulate_benchmark.c + src/modem/bench/modem_demodulate_benchmark.c + src/modem/bench/modem_demodsoft_benchmark.c + ) + +# +# MODULE : multichannel +# +set(multichannel_SOURCES + src/multichannel/src/firpfbch_crcf.c + src/multichannel/src/firpfbch_cccf.c + src/multichannel/src/ofdmframe.common.c + src/multichannel/src/ofdmframegen.c + src/multichannel/src/ofdmframesync.c + ) + +set(multichannel_AUTOTESTS_SOURCES + src/multichannel/tests/firpfbch2_crcf_autotest.c + src/multichannel/tests/firpfbch_crcf_synthesizer_autotest.c + src/multichannel/tests/firpfbch_crcf_analyzer_autotest.c + src/multichannel/tests/ofdmframesync_autotest.c + ) + +set(multichannel_BENCHMARKS_SOURCES + src/multichannel/bench/firpfbch_crcf_benchmark.c + src/multichannel/bench/firpfbch2_crcf_benchmark.c + src/multichannel/bench/ofdmframesync_acquire_benchmark.c + src/multichannel/bench/ofdmframesync_rxsymbol_benchmark.c + ) + +# +# MODULE : nco - numerically-controlled oscillator +# +set(nco_SOURCES + src/nco/src/nco_crcf.c + src/nco/src/nco.utilities.c + ) + +set(nco_AUTOTESTS_SOURCES + src/nco/tests/nco_crcf_frequency_autotest.c + src/nco/tests/nco_crcf_phase_autotest.c + src/nco/tests/nco_crcf_pll_autotest.c + src/nco/tests/unwrap_phase_autotest.c + ) + +set(autotest_EXTRA_SOURCES ${autotest_EXTRA_SOURCES} + src/nco/tests/data/nco_sincos_fsqrt1_2.c + src/nco/tests/data/nco_sincos_fsqrt1_3.c + src/nco/tests/data/nco_sincos_fsqrt1_5.c + src/nco/tests/data/nco_sincos_fsqrt1_7.c + ) + +set(nco_BENCHMARKS_SOURCES + src/nco/bench/nco_benchmark.c + src/nco/bench/vco_benchmark.c + ) + +# +# MODULE : optim - optimization +# +set(optim_SOURCES + src/optim/src/chromosome.c + src/optim/src/gasearch.c + src/optim/src/gradsearch.c + src/optim/src/optim.common.c + src/optim/src/qnsearch.c + src/optim/src/utilities.c + ) + +set(optim_AUTOTESTS_SOURCES + src/optim/tests/gradsearch_autotest.c + ) + +set(optim_BENCHMARKS_SOURCES ) + +# +# MODULE : quantization +# +set(quantization_SOURCES + src/quantization/src/compand.c + src/quantization/src/quantizercf.c + src/quantization/src/quantizerf.c + src/quantization/src/quantizer.inline.c + ) + +set(quantization_AUTOTESTS_SOURCES + src/quantization/tests/compand_autotest.c + src/quantization/tests/quantize_autotest.c + ) + +set(quantization_BENCHMARKS_SOURCES + src/quantization/bench/quantizer_benchmark.c + src/quantization/bench/compander_benchmark.c + ) + +# +# MODULE : random +# +set(random_SOURCES + src/random/src/rand.c + src/random/src/randn.c + src/random/src/randexp.c + src/random/src/randweib.c + src/random/src/randgamma.c + src/random/src/randnakm.c + src/random/src/randricek.c + src/random/src/scramble.c + ) + +set(random_AUTOTESTS_SOURCES + src/random/tests/scramble_autotest.c + #src/random/tests/random_autotest.c + ) + +set(random_BENCHMARKS_SOURCES + src/random/bench/random_benchmark.c + ) + +# +# MODULE : sequence +# +set(sequence_SOURCES + src/sequence/src/bsequence.c + src/sequence/src/msequence.c + ) + +set(sequence_AUTOTESTS_SOURCES + src/sequence/tests/bsequence_autotest.c + src/sequence/tests/complementary_codes_autotest.c + src/sequence/tests/msequence_autotest.c + ) + +set(sequence_BENCHMARKS_SOURCES + src/sequence/bench/bsequence_benchmark.c + ) + +# +# MODULE : utility +# +set(utility_SOURCES + src/utility/src/bshift_array.c + src/utility/src/byte_utilities.c + src/utility/src/msb_index.c + src/utility/src/pack_bytes.c + src/utility/src/shift_array.c + ) + +set(utility_AUTOTESTS_SOURCES + src/utility/tests/bshift_array_autotest.c + src/utility/tests/count_bits_autotest.c + src/utility/tests/pack_bytes_autotest.c + src/utility/tests/shift_array_autotest.c + ) + +set(utility_BENCHMARKS_SOURCES ) + +# +# MODULE : vector +# +set(vector_SOURCES + src/vector/src/vectorf_add.port.c + src/vector/src/vectorf_norm.port.c + src/vector/src/vectorf_mul.port.c + src/vector/src/vectorf_trig.port.c + src/vector/src/vectorcf_add.port.c + src/vector/src/vectorcf_norm.port.c + src/vector/src/vectorcf_mul.port.c + src/vector/src/vectorcf_trig.port.c + ) + +set(vector_AUTOTESTS_SOURCES ) + +set(vector_BENCHMARKS_SOURCES ) + +# +# Library +# +set(liquid_SOURCES + src/libliquid.c + ${agc_SOURCES} + ${audio_SOURCES} + ${buffer_SOURCES} + ${channel_SOURCES} + ${dotprod_SOURCES} + ${equalization_SOURCES} + ${fec_SOURCES} + ${fft_SOURCES} + ${filter_SOURCES} + ${framing_SOURCES} + ${math_SOURCES} + ${matrix_SOURCES} + ${modem_SOURCES} + ${multichannel_SOURCES} + ${nco_SOURCES} + ${optim_SOURCES} + ${quantization_SOURCES} + ${random_SOURCES} + ${sequence_SOURCES} + ${utility_SOURCES} + ${vector_SOURCES} + ) + +add_library(liquid-shared SHARED ${liquid_SOURCES}) +if (HAVE_LIBM) + target_link_libraries(liquid-shared m) +endif () +if (HAVE_LIBFEC) + target_link_libraries(liquid-shared fec) +endif () +if (NOT LIQUID_FFTOVERRIDE AND HAVE_LIBFFTW3F) + target_link_libraries(liquid-shared fftw3f) +endif () +set_property(TARGET liquid-shared PROPERTY OUTPUT_NAME "liquid") +set_property(TARGET liquid-shared PROPERTY SOVERSION ${LIQUID_VERSION}) +set_property(TARGET liquid-shared PROPERTY COMPILE_FLAGS "${_EXTRA_C_FLAGS}") + +add_library(liquid-static STATIC ${liquid_SOURCES}) +if (HAVE_LIBM) + target_link_libraries(liquid-static m) +endif () +if (HAVE_LIBFEC) + target_link_libraries(liquid-static fec) +endif () +if (NOT LIQUID_FFTOVERRIDE AND HAVE_LIBFFTW3F) + target_link_libraries(liquid-static fftw3f) +endif () +set_property(TARGET liquid-static PROPERTY OUTPUT_NAME "liquid") +set_property(TARGET liquid-static PROPERTY COMPILE_FLAGS "${_EXTRA_C_FLAGS}") + +# +# Autotest +# +set(autotest_ALL_SOURCES + ${agc_AUTOTESTS_SOURCES} + ${audio_AUTOTESTS_SOURCES} + ${buffer_AUTOTESTS_SOURCES} + ${channel_AUTOTESTS_SOURCES} + ${dotprod_AUTOTESTS_SOURCES} + ${equalization_AUTOTESTS_SOURCES} + ${fec_AUTOTESTS_SOURCES} + ${fft_AUTOTESTS_SOURCES} + ${filter_AUTOTESTS_SOURCES} + ${framing_AUTOTESTS_SOURCES} + ${math_AUTOTESTS_SOURCES} + ${matrix_AUTOTESTS_SOURCES} + ${modem_AUTOTESTS_SOURCES} + ${multichannel_AUTOTESTS_SOURCES} + ${nco_AUTOTESTS_SOURCES} + ${optim_AUTOTESTS_SOURCES} + ${quantization_AUTOTESTS_SOURCES} + ${random_AUTOTESTS_SOURCES} + ${sequence_AUTOTESTS_SOURCES} + ${utility_AUTOTESTS_SOURCES} + ${vector_AUTOTESTS_SOURCES} + ) + +set(autotest_SOURCES + autotest/autotest.c + autotest/autotestlib.c + ${autotest_ALL_SOURCES} + ${autotest_EXTRA_SOURCES} + ) + +# We need first to build and run the autoscript tool. +if (NOT HOST_CC_COMPILER) + add_executable(autoscript scripts/autoscript.c scripts/main.c) +else () + add_custom_target(autoscript + COMMAND ${HOST_CC_COMPILER} -o autoscript "${CMAKE_CURRENT_SOURCE_DIR}/scripts/autoscript.c" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/main.c" + BYPRODUCTS autoscript) +endif () + +add_custom_target(autotest_include + COMMAND "${CMAKE_CURRENT_BINARY_DIR}/autoscript" "/" "autotest" ${autotest_ALL_SOURCES} > "${CMAKE_CURRENT_BINARY_DIR}/autotest_include.h" + DEPENDS autoscript + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/autotest_include.h" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + ) + +add_executable(autotest ${autotest_SOURCES}) +add_dependencies(autotest autotest_include) +target_link_libraries(autotest liquid-shared) + +# +# Benchmark +# +set(benchmark_ALL_SOURCES + ${agc_BENCHMARKS_SOURCES} + ${audio_BENCHMARKS_SOURCES} + ${buffer_BENCHMARKS_SOURCES} + ${channel_BENCHMARKS_SOURCES} + ${dotprod_BENCHMARKS_SOURCES} + ${equalization_BENCHMARKS_SOURCES} + ${fec_BENCHMARKS_SOURCES} + ${fft_BENCHMARKS_SOURCES} + ${filter_BENCHMARKS_SOURCES} + ${framing_BENCHMARKS_SOURCES} + ${math_BENCHMARKS_SOURCES} + ${matrix_BENCHMARKS_SOURCES} + ${modem_BENCHMARKS_SOURCES} + ${multichannel_BENCHMARKS_SOURCES} + ${nco_BENCHMARKS_SOURCES} + ${optim_BENCHMARKS_SOURCES} + ${quantization_BENCHMARKS_SOURCES} + ${random_BENCHMARKS_SOURCES} + ${sequence_BENCHMARKS_SOURCES} + ${utility_BENCHMARKS_SOURCES} + ${vector_BENCHMARKS_SOURCES} + ) + +set(benchmark_SOURCES + bench/bench.c + ${benchmark_ALL_SOURCES} + ${benchmark_EXTRA_SOURCES} + ) + +add_custom_target(benchmark_include + COMMAND "${CMAKE_CURRENT_BINARY_DIR}/autoscript" "/" "benchmark" ${benchmark_ALL_SOURCES} > "${CMAKE_CURRENT_BINARY_DIR}/benchmark_include.h" + DEPENDS autoscript + BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/benchmark_include.h" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + ) + +add_executable(benchmark ${benchmark_SOURCES}) +add_dependencies(benchmark benchmark_include) +target_link_libraries(benchmark liquid-shared) + +# +# Examples +# +add_subdirectory(examples) + +# +# Sandbox +# +add_subdirectory(sandbox) + +# +# Installation +# +install(TARGETS liquid-static liquid-shared + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) +install(FILES include/liquid.h + DESTINATION include/liquid) diff --git a/README.md b/README.md index fa83de6d8..8832bd308 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,14 @@ run $ sudo make uninstall +Alternatively, you can build with CMake (in example, with Ninja): + + $ mkdir build + $ cd build + $ cmake -G Ninja .. + $ ninja + $ sudo ninja install + ### Run all test scripts ### Source code validation is a critical step in any software library, diff --git a/cmake/Modules/CheckCPUID.cmake b/cmake/Modules/CheckCPUID.cmake new file mode 100644 index 000000000..71d28d9b2 --- /dev/null +++ b/cmake/Modules/CheckCPUID.cmake @@ -0,0 +1,24 @@ +macro(CHECK_CPUID CHARACTERISTIC VARIABLE) + if (NOT _CPUID_CHARACTERISTICS) + try_run(CPUID_RUN_RESULT CPUID_COMPILE_RESULT + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/cmcpuid.c + RUN_OUTPUT_VARIABLE CPUID_CHARACTERISTICS + ) + set(_CPUID_CHARACTERISTICS "${CPUID_CHARACTERISTICS}" CACHE INTERNAL "CPU Characteristics") + endif () + + if (${_CPUID_CHARACTERISTICS} MATCHES "#${CHARACTERISTIC}#") + set(_CPUID_CHARACTERISTIC_FOUND TRUE) + else () + set(_CPUID_CHARACTERISTIC_FOUND FALSE) + endif () + + message("-- Checking for CPU characteristic ${CHARACTERISTIC}") + if (_CPUID_CHARACTERISTIC_FOUND) + message("-- Checking for CPU characteristic ${CHARACTERISTIC} - found") + else () + message("-- Checking for CPU characteristic ${CHARACTERISTIC} - not found") + endif () + set(${VARIABLE} ${_CPUID_CHARACTERISTIC_FOUND} CACHE INTERNAL "Check for CPU characteristic ${CHARACTERISTIC}" FORCE) +endmacro() diff --git a/cmake/Modules/cmcpuid.c b/cmake/Modules/cmcpuid.c new file mode 100644 index 000000000..8a30dfb30 --- /dev/null +++ b/cmake/Modules/cmcpuid.c @@ -0,0 +1,198 @@ +#include +#include +#include +#if defined(_MSC_VER) +#include +#endif + +#define ISA_X86_MMX (1 << 0) +#define ISA_X86_SSE (1 << 1) +#define ISA_X86_SSE2 (1 << 2) +#define ISA_X86_SSE3 (1 << 3) +#define ISA_X86_SSSE3 (1 << 4) +#define ISA_X86_SSE41 (1 << 5) +#define ISA_X86_SSE42 (1 << 6) +#define ISA_X86_AVX1 (1 << 7) +#define ISA_X86_AVX2 (1 << 8) +#define ISA_PPC_VMX (1 << 9) +#define ISA_ARM_NEON (1 << 10) +#define ISA_ARM64_NEON (1 << 11) + +#if !(defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_AMD64)) +static jmp_buf return_jmp; + +static void sighandler(int signo) +{ + longjmp(return_jmp, 1); +} +#endif + +static void +siginit(void) +{ +#if !(defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_AMD64)) + signal(SIGSEGV, sighandler); +#ifdef SIGBUS + signal(SIGBUS, sighandler); +#endif + signal(SIGILL, sighandler); +#endif +} + +static unsigned +check_isa(void) +{ +#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_AMD64) +#if defined(_M_IX86) || defined(_M_AMD64) + int regs[4]; +#endif + unsigned ebx, ecx, edx; + unsigned isa = 0; + +#if defined(_M_IX86) || defined(_M_AMD64) + __cpuid(regs, 1); + ecx = regs[2]; + edx = regs[3]; +#else + __asm__ __volatile__( + "cpuid" + : "=c"(ecx), "=d"(edx) + : "a"(1) + : "eax", "ebx" + ); +#endif + + if (edx & (1 << 23)) { + /* MMX */ + isa |= ISA_X86_MMX; + } + + if (edx & (1 << 25)) { + /* SSE */ + isa |= ISA_X86_SSE; + } + + if (edx & (1 << 26)) { + /* SSE */ + isa |= ISA_X86_SSE2; + } + + if (ecx & (1 << 0)) { + /* SSE3 */ + isa |= ISA_X86_SSE3; + } + + if (ecx & (1 << 9)) { + /* SSSE3 */ + isa |= ISA_X86_SSSE3; + } + + if (ecx & (1 << 19)) { + /* SSE4.1 */ + isa |= ISA_X86_SSE41; + } + + if (ecx & (1 << 20)) { + /* SSE4.2 */ + isa |= ISA_X86_SSE42; + } + + if (ecx & (1 << 28)) { + /* AVX1 */ + isa |= ISA_X86_AVX1; + +#if defined(_M_IX86) || defined(_M_AMD64) + __cpuid(regs, 7); + ebx = regs[1]; +#else + __asm__ __volatile__( + "cpuid" + : "=b"(ebx) + : "a"(7) + : "eax", "ecx", "edx" + ); +#endif + + if (ebx & (1 << 5)) { + /* AVX2 */ + isa |= ISA_X86_AVX2; + } + } + + return isa; +#elif defined(__powerpc__) + if (setjmp(return_jmp) == 1) + return 0; + + __asm__ __volatile__(".long 0x10011000"); + + return ISA_PPC_VMX; +#elif defined(__arm__) || defined(_M_ARM) + /* Windows on ARM is always Thumb-2, and NEON is always available. */ +#if !defined(_M_ARM) + if (setjmp(return_jmp) == 1) + return 0; + +#if defined(__thumb__) + __asm__ __volatile__(".short 0xef12"); + __asm__ __volatile__(".short 0x0054"); +#else + __asm__ __volatile__(".word 0xf2120054"); +#endif +#endif + + return ISA_ARM_NEON; +#elif defined(__aarch64__) + return ISA_ARM64_NEON; +#else + return 0; +#endif +} + +int +main() +{ + unsigned isa; + + siginit(); + isa = check_isa(); + + if (isa & ISA_X86_MMX) { + printf("#mmx#"); + } + if (isa & ISA_X86_SSE) { + printf("#sse#"); + } + if (isa & ISA_X86_SSE2) { + printf("#sse2#"); + } + if (isa & ISA_X86_SSE3) { + printf("#sse3#"); + } + if (isa & ISA_X86_SSSE3) { + printf("#ssse3#"); + } + if (isa & ISA_X86_SSE41) { + printf("#sse41#"); + } + if (isa & ISA_X86_SSE42) { + printf("#sse42#"); + } + if (isa & ISA_X86_AVX1) { + printf("#avx#"); + } + if (isa & ISA_X86_AVX2) { + printf("#avx2#"); + } + if (isa & ISA_PPC_VMX) { + printf("#vmx#"); + } + if (isa & ISA_ARM_NEON) { + printf("#neon#"); + } + if (isa & ISA_ARM64_NEON) { + printf("#neon64#"); + } + printf("\n"); + return 0; +} diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 000000000..1a3518ced --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,94 @@ +#ifndef __LIQUID_CONFIG_H__ +#define __LIQUID_CONFIG_H__ + +/* Support AVX (Advanced Vector Extensions) instructions */ +#cmakedefine HAVE_AVX @HAVE_AVX@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_COMPLEX_H @HAVE_COMPLEX_H@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_EMMINTRIN_H @HAVE_EMMINTRIN_H@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_FEC_H @HAVE_FEC_H@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_FFTW3_H @HAVE_FFTW3_H@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_FLOAT_H @HAVE_FLOAT_H@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_GETOPT_H @HAVE_GETOPT_H@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_IMMINTRIN_H @HAVE_IMMINTRIN_H@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@ + +/* Define to 1 if you have the `fec' library (-lfec). */ +#cmakedefine HAVE_LIBFEC @HAVE_LIBFEC@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MEMORY_H @HAVE_MEMORY_H@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MMINTRIN_H @HAVE_MMINTRIN_H@ + +/* Support MMX instructions */ +#cmakedefine HAVE_MMX @HAVE_MMX@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_PMMINTRIN_H @HAVE_PMMINTRIN_H@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SMMINTRIN_H @HAVE_SMMINTRIN_H@ + +/* Support SSE (Streaming SIMD Extensions) instructions */ +#cmakedefine HAVE_SSE @HAVE_SSE@ + +/* Support SSE2 (Streaming SIMD Extensions 2) instructions */ +#cmakedefine HAVE_SSE2 @HAVE_SSE2@ + +/* Support SSE3 (Streaming SIMD Extensions 3) instructions */ +#cmakedefine HAVE_SSE3 @HAVE_SSE3@ + +/* Support SSE4.1 (Streaming SIMD Extensions 4.1) instructions */ +#cmakedefine HAVE_SSE41 @HAVE_SSE41@ + +/* Support SSE4.2 (Streaming SIMD Extensions 4.2) instructions */ +#cmakedefine HAVE_SSE42 @HAVE_SSE42@ + +/* Support SSSE3 (Supplemental Streaming SIMD Extensions 3) instructions */ +#cmakedefine HAVE_SSSE3 @HAVE_SSSE3@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDINT_H @HAVE_STDINT_H@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_RESOURCE_H @HAVE_SYS_RESOURCE_H@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_TMMINTRIN_H @HAVE_TMMINTRIN_H@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_XMMINTRIN_H @HAVE_XMMINTRIN_H@ + +/* Force internal FFT even if libfftw is available */ +#cmakedefine LIQUID_FFTOVERRIDE @LIQUID_FFTOVERRIDE@ + +/* Force overriding of SIMD (use portable C code) */ +#cmakedefine LIQUID_SIMDOVERRIDE @LIQUID_SIMDOVERRIDE@ + +/* The size of `int', as computed by sizeof. */ +#cmakedefine SIZEOF_INT @SIZEOF_INT@ + +/* The size of `unsigned int', as computed by sizeof. */ +#cmakedefine SIZEOF_UNSIGNED_INT @SIZEOF_UNSIGNED_INT@ + +#endif // __LIQUID_CONFIG_H__ diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 000000000..987ae38b6 --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,255 @@ +add_executable(agc_crcf_example agc_crcf_example.c) +target_link_libraries(agc_crcf_example liquid-shared) +add_executable(agc_crcf_qpsk_example agc_crcf_qpsk_example.c) +target_link_libraries(agc_crcf_qpsk_example liquid-shared) +add_executable(agc_rrrf_example agc_rrrf_example.c) +target_link_libraries(agc_rrrf_example liquid-shared) +add_executable(ampmodem_example ampmodem_example.c) +target_link_libraries(ampmodem_example liquid-shared) +add_executable(asgramcf_example asgramcf_example.c) +target_link_libraries(asgramcf_example liquid-shared) +add_executable(asgramf_example asgramf_example.c) +target_link_libraries(asgramf_example liquid-shared) +add_executable(autocorr_cccf_example autocorr_cccf_example.c) +target_link_libraries(autocorr_cccf_example liquid-shared) +add_executable(bpacketsync_example bpacketsync_example.c) +target_link_libraries(bpacketsync_example liquid-shared) +add_executable(bpresync_example bpresync_example.c) +target_link_libraries(bpresync_example liquid-shared) +add_executable(bsequence_example bsequence_example.c) +target_link_libraries(bsequence_example liquid-shared) +add_executable(cbufferf_example cbufferf_example.c) +target_link_libraries(cbufferf_example liquid-shared) +add_executable(cgsolve_example cgsolve_example.c) +target_link_libraries(cgsolve_example liquid-shared) +add_executable(channel_cccf_example channel_cccf_example.c) +target_link_libraries(channel_cccf_example liquid-shared) +add_executable(chromosome_example chromosome_example.c) +target_link_libraries(chromosome_example liquid-shared) +add_executable(compand_example compand_example.c) +target_link_libraries(compand_example liquid-shared) +add_executable(compand_cf_example compand_cf_example.c) +target_link_libraries(compand_cf_example liquid-shared) +add_executable(complementary_codes_example complementary_codes_example.c) +target_link_libraries(complementary_codes_example liquid-shared) +add_executable(conversion_example conversion_example.c) +target_link_libraries(conversion_example liquid-shared) +add_executable(crc_example crc_example.c) +target_link_libraries(crc_example liquid-shared) +add_executable(cpfskmodem_example cpfskmodem_example.c) +target_link_libraries(cpfskmodem_example liquid-shared) +add_executable(cpfsk_psd_example cpfsk_psd_example.c) +target_link_libraries(cpfsk_psd_example liquid-shared) +add_executable(cvsd_example cvsd_example.c) +target_link_libraries(cvsd_example liquid-shared) +add_executable(detector_cccf_example detector_cccf_example.c) +target_link_libraries(detector_cccf_example liquid-shared) +add_executable(dotprod_rrrf_example dotprod_rrrf_example.c) +target_link_libraries(dotprod_rrrf_example liquid-shared) +add_executable(dotprod_cccf_example dotprod_cccf_example.c) +target_link_libraries(dotprod_cccf_example liquid-shared) +add_executable(eqlms_cccf_block_example eqlms_cccf_block_example.c) +target_link_libraries(eqlms_cccf_block_example liquid-shared) +add_executable(eqlms_cccf_blind_example eqlms_cccf_blind_example.c) +target_link_libraries(eqlms_cccf_blind_example liquid-shared) +add_executable(eqlms_cccf_decisiondirected_example eqlms_cccf_decisiondirected_example.c) +target_link_libraries(eqlms_cccf_decisiondirected_example liquid-shared) +add_executable(eqlms_cccf_example eqlms_cccf_example.c) +target_link_libraries(eqlms_cccf_example liquid-shared) +add_executable(eqrls_cccf_example eqrls_cccf_example.c) +target_link_libraries(eqrls_cccf_example liquid-shared) +add_executable(fec_example fec_example.c) +target_link_libraries(fec_example liquid-shared) +add_executable(fec_soft_example fec_soft_example.c) +target_link_libraries(fec_soft_example liquid-shared) +add_executable(fft_example fft_example.c) +target_link_libraries(fft_example liquid-shared) +add_executable(fftfilt_crcf_example fftfilt_crcf_example.c) +target_link_libraries(fftfilt_crcf_example liquid-shared) +add_executable(firdecim_crcf_example firdecim_crcf_example.c) +target_link_libraries(firdecim_crcf_example liquid-shared) +add_executable(firfarrow_rrrf_example firfarrow_rrrf_example.c) +target_link_libraries(firfarrow_rrrf_example liquid-shared) +add_executable(firfilt_cccf_example firfilt_cccf_example.c) +target_link_libraries(firfilt_cccf_example liquid-shared) +add_executable(firfilt_crcf_example firfilt_crcf_example.c) +target_link_libraries(firfilt_crcf_example liquid-shared) +add_executable(firfilt_rrrf_example firfilt_rrrf_example.c) +target_link_libraries(firfilt_rrrf_example liquid-shared) +add_executable(firdes_kaiser_example firdes_kaiser_example.c) +target_link_libraries(firdes_kaiser_example liquid-shared) +add_executable(firdespm_example firdespm_example.c) +target_link_libraries(firdespm_example liquid-shared) +add_executable(firhilb_example firhilb_example.c) +target_link_libraries(firhilb_example liquid-shared) +add_executable(firhilb_decim_example firhilb_decim_example.c) +target_link_libraries(firhilb_decim_example liquid-shared) +add_executable(firhilb_interp_example firhilb_interp_example.c) +target_link_libraries(firhilb_interp_example liquid-shared) +add_executable(firpfbch2_crcf_example firpfbch2_crcf_example.c) +target_link_libraries(firpfbch2_crcf_example liquid-shared) +add_executable(firinterp_crcf_example firinterp_crcf_example.c) +target_link_libraries(firinterp_crcf_example liquid-shared) +add_executable(firpfbch_crcf_example firpfbch_crcf_example.c) +target_link_libraries(firpfbch_crcf_example liquid-shared) +add_executable(firpfbch_crcf_analysis_example firpfbch_crcf_analysis_example.c) +target_link_libraries(firpfbch_crcf_analysis_example liquid-shared) +add_executable(firpfbch_crcf_synthesis_example firpfbch_crcf_synthesis_example.c) +target_link_libraries(firpfbch_crcf_synthesis_example liquid-shared) +add_executable(flexframesync_example flexframesync_example.c) +target_link_libraries(flexframesync_example liquid-shared) +add_executable(flexframesync_reconfig_example flexframesync_reconfig_example.c) +target_link_libraries(flexframesync_reconfig_example liquid-shared) +add_executable(framesync64_example framesync64_example.c) +target_link_libraries(framesync64_example liquid-shared) +add_executable(freqmodem_example freqmodem_example.c) +target_link_libraries(freqmodem_example liquid-shared) +add_executable(fskmodem_example fskmodem_example.c) +target_link_libraries(fskmodem_example liquid-shared) +add_executable(gasearch_example gasearch_example.c) +target_link_libraries(gasearch_example liquid-shared) +add_executable(gasearch_knapsack_example gasearch_knapsack_example.c) +target_link_libraries(gasearch_knapsack_example liquid-shared) +add_executable(gmskframesync_example gmskframesync_example.c) +target_link_libraries(gmskframesync_example liquid-shared) +add_executable(gmskmodem_example gmskmodem_example.c) +target_link_libraries(gmskmodem_example liquid-shared) +add_executable(gradsearch_datafit_example gradsearch_datafit_example.c) +target_link_libraries(gradsearch_datafit_example liquid-shared) +add_executable(gradsearch_example gradsearch_example.c) +target_link_libraries(gradsearch_example liquid-shared) +add_executable(interleaver_example interleaver_example.c) +target_link_libraries(interleaver_example liquid-shared) +add_executable(interleaver_soft_example interleaver_soft_example.c) +target_link_libraries(interleaver_soft_example liquid-shared) +add_executable(interleaver_scatterplot_example interleaver_scatterplot_example.c) +target_link_libraries(interleaver_scatterplot_example liquid-shared) +add_executable(iirdes_example iirdes_example.c) +target_link_libraries(iirdes_example liquid-shared) +add_executable(iirdes_analog_example iirdes_analog_example.c) +target_link_libraries(iirdes_analog_example liquid-shared) +add_executable(iirdes_pll_example iirdes_pll_example.c) +target_link_libraries(iirdes_pll_example liquid-shared) +add_executable(iirdecim_crcf_example iirdecim_crcf_example.c) +target_link_libraries(iirdecim_crcf_example liquid-shared) +add_executable(iirfilt_cccf_example iirfilt_cccf_example.c) +target_link_libraries(iirfilt_cccf_example liquid-shared) +add_executable(iirfilt_crcf_example iirfilt_crcf_example.c) +target_link_libraries(iirfilt_crcf_example liquid-shared) +add_executable(iirfilt_crcf_dcblocker_example iirfilt_crcf_dcblocker_example.c) +target_link_libraries(iirfilt_crcf_dcblocker_example liquid-shared) +add_executable(iirinterp_crcf_example iirinterp_crcf_example.c) +target_link_libraries(iirinterp_crcf_example liquid-shared) +add_executable(kbd_window_example kbd_window_example.c) +target_link_libraries(kbd_window_example liquid-shared) +add_executable(lpc_example lpc_example.c) +target_link_libraries(lpc_example liquid-shared) +add_executable(libliquid_example libliquid_example.c) +target_link_libraries(libliquid_example liquid-shared) +add_executable(matched_filter_example matched_filter_example.c) +target_link_libraries(matched_filter_example liquid-shared) +add_executable(math_lngamma_example math_lngamma_example.c) +target_link_libraries(math_lngamma_example liquid-shared) +add_executable(math_primitive_root_example math_primitive_root_example.c) +target_link_libraries(math_primitive_root_example liquid-shared) +add_executable(modem_arb_example modem_arb_example.c) +target_link_libraries(modem_arb_example liquid-shared) +add_executable(modem_example modem_example.c) +target_link_libraries(modem_example liquid-shared) +add_executable(modem_soft_example modem_soft_example.c) +target_link_libraries(modem_soft_example liquid-shared) +add_executable(modular_arithmetic_example modular_arithmetic_example.c) +target_link_libraries(modular_arithmetic_example liquid-shared) +add_executable(msequence_example msequence_example.c) +target_link_libraries(msequence_example liquid-shared) +add_executable(msourcecf_example msourcecf_example.c) +target_link_libraries(msourcecf_example liquid-shared) +add_executable(msresamp_crcf_example msresamp_crcf_example.c) +target_link_libraries(msresamp_crcf_example liquid-shared) +add_executable(msresamp2_crcf_example msresamp2_crcf_example.c) +target_link_libraries(msresamp2_crcf_example liquid-shared) +add_executable(nco_example nco_example.c) +target_link_libraries(nco_example liquid-shared) +add_executable(nco_pll_example nco_pll_example.c) +target_link_libraries(nco_pll_example liquid-shared) +add_executable(nco_pll_modem_example nco_pll_modem_example.c) +target_link_libraries(nco_pll_modem_example liquid-shared) +add_executable(nyquist_filter_example nyquist_filter_example.c) +target_link_libraries(nyquist_filter_example liquid-shared) +add_executable(ofdmflexframesync_example ofdmflexframesync_example.c) +target_link_libraries(ofdmflexframesync_example liquid-shared) +add_executable(ofdmframesync_example ofdmframesync_example.c) +target_link_libraries(ofdmframesync_example liquid-shared) +add_executable(packetizer_example packetizer_example.c) +target_link_libraries(packetizer_example liquid-shared) +add_executable(packetizer_soft_example packetizer_soft_example.c) +target_link_libraries(packetizer_soft_example liquid-shared) +add_executable(pll_example pll_example.c) +target_link_libraries(pll_example liquid-shared) +add_executable(polyfit_example polyfit_example.c) +target_link_libraries(polyfit_example liquid-shared) +add_executable(polyfit_lagrange_example polyfit_lagrange_example.c) +target_link_libraries(polyfit_lagrange_example liquid-shared) +add_executable(poly_findroots_example poly_findroots_example.c) +target_link_libraries(poly_findroots_example liquid-shared) +add_executable(qdetector_cccf_example qdetector_cccf_example.c) +target_link_libraries(qdetector_cccf_example liquid-shared) +add_executable(qpacketmodem_performance_example qpacketmodem_performance_example.c) +target_link_libraries(qpacketmodem_performance_example liquid-shared) +add_executable(qpacketmodem_example qpacketmodem_example.c) +target_link_libraries(qpacketmodem_example liquid-shared) +add_executable(qpilotsync_example qpilotsync_example.c) +target_link_libraries(qpilotsync_example liquid-shared) +add_executable(qnsearch_example qnsearch_example.c) +target_link_libraries(qnsearch_example liquid-shared) +add_executable(quantize_example quantize_example.c) +target_link_libraries(quantize_example liquid-shared) +add_executable(random_histogram_example random_histogram_example.c) +target_link_libraries(random_histogram_example liquid-shared) +add_executable(repack_bytes_example repack_bytes_example.c) +target_link_libraries(repack_bytes_example liquid-shared) +add_executable(resamp_crcf_example resamp_crcf_example.c) +target_link_libraries(resamp_crcf_example liquid-shared) +add_executable(resamp2_cccf_example resamp2_cccf_example.c) +target_link_libraries(resamp2_cccf_example liquid-shared) +add_executable(resamp2_crcf_example resamp2_crcf_example.c) +target_link_libraries(resamp2_crcf_example liquid-shared) +add_executable(resamp2_crcf_decim_example resamp2_crcf_decim_example.c) +target_link_libraries(resamp2_crcf_decim_example liquid-shared) +add_executable(resamp2_crcf_filter_example resamp2_crcf_filter_example.c) +target_link_libraries(resamp2_crcf_filter_example liquid-shared) +add_executable(resamp2_crcf_interp_example resamp2_crcf_interp_example.c) +target_link_libraries(resamp2_crcf_interp_example liquid-shared) +add_executable(ricek_channel_example ricek_channel_example.c) +target_link_libraries(ricek_channel_example liquid-shared) +add_executable(scramble_example scramble_example.c) +target_link_libraries(scramble_example liquid-shared) +add_executable(smatrix_example smatrix_example.c) +target_link_libraries(smatrix_example liquid-shared) +add_executable(spgramcf_example spgramcf_example.c) +target_link_libraries(spgramcf_example liquid-shared) +add_executable(spgramf_example spgramf_example.c) +target_link_libraries(spgramf_example liquid-shared) +add_executable(symsync_crcf_example symsync_crcf_example.c) +target_link_libraries(symsync_crcf_example liquid-shared) +add_executable(symsync_crcf_full_example symsync_crcf_full_example.c) +target_link_libraries(symsync_crcf_full_example liquid-shared) +add_executable(symsync_crcf_kaiser_example symsync_crcf_kaiser_example.c) +target_link_libraries(symsync_crcf_kaiser_example liquid-shared) +add_executable(symstreamcf_example symstreamcf_example.c) +target_link_libraries(symstreamcf_example liquid-shared) +add_executable(symtrack_cccf_example symtrack_cccf_example.c) +target_link_libraries(symtrack_cccf_example liquid-shared) +add_executable(wdelayf_example wdelayf_example.c) +target_link_libraries(wdelayf_example liquid-shared) +add_executable(windowf_example windowf_example.c) +target_link_libraries(windowf_example liquid-shared) + +#add_executable(metadata_example metadata_example.c) +#target_link_libraries(metadata_example liquid-shared) +#add_executable(ofdmframegen_example ofdmframegen_example.c) +#target_link_libraries(ofdmframegen_example liquid-shared) +#add_executable(gmskframe_example gmskframe_example.c) +#target_link_libraries(gmskframe_example liquid-shared) +#add_executable(fading_generator_example fading_generator_example.c) +#target_link_libraries(fading_generator_example liquid-shared) diff --git a/sandbox/CMakeLists.txt b/sandbox/CMakeLists.txt new file mode 100644 index 000000000..d329e18e2 --- /dev/null +++ b/sandbox/CMakeLists.txt @@ -0,0 +1,195 @@ +add_executable(bpresync_test bpresync_test.c) +target_link_libraries(bpresync_test liquid-shared) +add_executable(cpmodem_test cpmodem_test.c) +target_link_libraries(cpmodem_test liquid-shared) +add_executable(count_ones_gentab count_ones_gentab.c) +target_link_libraries(count_ones_gentab liquid-shared) +add_executable(crc_gentab crc_gentab.c) +target_link_libraries(crc_gentab liquid-shared) +add_executable(ellip_func_test ellip_func_test.c) +target_link_libraries(ellip_func_test liquid-shared) +add_executable(ellip_test ellip_test.c) +target_link_libraries(ellip_test liquid-shared) +add_executable(eqlms_cccf_test eqlms_cccf_test.c) +target_link_libraries(eqlms_cccf_test liquid-shared) +add_executable(fecsoft_ber_test fecsoft_ber_test.c) +target_link_libraries(fecsoft_ber_test liquid-shared) +add_executable(fec_g2412product_test fec_g2412product_test.c) +target_link_libraries(fec_g2412product_test liquid-shared) +add_executable(fec_golay2412_test fec_golay2412_test.c) +target_link_libraries(fec_golay2412_test liquid-shared) +add_executable(fec_golay_test fec_golay_test.c) +target_link_libraries(fec_golay_test liquid-shared) +add_executable(fec_hamming3126_example fec_hamming3126_example.c) +target_link_libraries(fec_hamming3126_example liquid-shared) +add_executable(fec_hamming128_test fec_hamming128_test.c) +target_link_libraries(fec_hamming128_test liquid-shared) +add_executable(fec_hamming128_gentab fec_hamming128_gentab.c) +target_link_libraries(fec_hamming128_gentab liquid-shared) +add_executable(fec_hamming128_example fec_hamming128_example.c) +target_link_libraries(fec_hamming128_example liquid-shared) +add_executable(fec_hamming74_gentab fec_hamming74_gentab.c) +target_link_libraries(fec_hamming74_gentab liquid-shared) +add_executable(fec_hamming84_gentab fec_hamming84_gentab.c) +target_link_libraries(fec_hamming84_gentab liquid-shared) +add_executable(fec_hamming_test fec_hamming_test.c) +target_link_libraries(fec_hamming_test liquid-shared) +add_executable(fec_ldpc_test fec_ldpc_test.c) +target_link_libraries(fec_ldpc_test liquid-shared) +add_executable(fec_rep3_test fec_rep3_test.c) +target_link_libraries(fec_rep3_test liquid-shared) +add_executable(fec_rep5_test fec_rep5_test.c) +target_link_libraries(fec_rep5_test liquid-shared) +add_executable(fec_secded2216_test fec_secded2216_test.c) +target_link_libraries(fec_secded2216_test liquid-shared) +add_executable(fec_secded3932_test fec_secded3932_test.c) +target_link_libraries(fec_secded3932_test liquid-shared) +add_executable(fec_secded7264_test fec_secded7264_test.c) +target_link_libraries(fec_secded7264_test liquid-shared) +add_executable(fec_spc2216_test fec_spc2216_test.c) +target_link_libraries(fec_spc2216_test liquid-shared) +add_executable(fec_secded_punctured_test fec_secded_punctured_test.c) +target_link_libraries(fec_secded_punctured_test liquid-shared) +add_executable(fecsoft_conv_test fecsoft_conv_test.c) +target_link_libraries(fecsoft_conv_test liquid-shared) +add_executable(fecsoft_hamming128_gentab fecsoft_hamming128_gentab.c) +target_link_libraries(fecsoft_hamming128_gentab liquid-shared) +add_executable(fecsoft_ldpc_test fecsoft_ldpc_test.c) +target_link_libraries(fecsoft_ldpc_test liquid-shared) +add_executable(fec_sumproduct_test fec_sumproduct_test.c) +target_link_libraries(fec_sumproduct_test liquid-shared) +add_executable(fskmodem_test fskmodem_test.c) +target_link_libraries(fskmodem_test liquid-shared) +add_executable(fft_dual_radix_test fft_dual_radix_test.c) +target_link_libraries(fft_dual_radix_test liquid-shared) +add_executable(fft_mixed_radix_test fft_mixed_radix_test.c) +target_link_libraries(fft_mixed_radix_test liquid-shared) +add_executable(fft_recursive_plan_test fft_recursive_plan_test.c) +target_link_libraries(fft_recursive_plan_test liquid-shared) +add_executable(fft_recursive_test fft_recursive_test.c) +target_link_libraries(fft_recursive_test liquid-shared) +add_executable(fft_rader_prime_test fft_rader_prime_test.c) +target_link_libraries(fft_rader_prime_test liquid-shared) +add_executable(fft_rader_prime_radix2_test fft_rader_prime_radix2_test.c) +target_link_libraries(fft_rader_prime_radix2_test liquid-shared) +add_executable(fft_r2r_test fft_r2r_test.c) +target_link_libraries(fft_r2r_test liquid-shared) +add_executable(firdes_energy_test firdes_energy_test.c) +target_link_libraries(firdes_energy_test liquid-shared) +add_executable(firdes_fexp_test firdes_fexp_test.c) +target_link_libraries(firdes_fexp_test liquid-shared) +add_executable(firdes_gmskrx_test firdes_gmskrx_test.c) +target_link_libraries(firdes_gmskrx_test liquid-shared) +add_executable(firdes_length_test firdes_length_test.c) +target_link_libraries(firdes_length_test liquid-shared) +add_executable(firfarrow_rrrf_test firfarrow_rrrf_test.c) +target_link_libraries(firfarrow_rrrf_test liquid-shared) +add_executable(firpfbch_analysis_alignment_test firpfbch_analysis_alignment_test.c) +target_link_libraries(firpfbch_analysis_alignment_test liquid-shared) +add_executable(firpfbch2_analysis_equivalence_test firpfbch2_analysis_equivalence_test.c) +target_link_libraries(firpfbch2_analysis_equivalence_test liquid-shared) +add_executable(firpfbch2_test firpfbch2_test.c) +target_link_libraries(firpfbch2_test liquid-shared) +add_executable(firpfbch_analysis_equivalence_test firpfbch_analysis_equivalence_test.c) +target_link_libraries(firpfbch_analysis_equivalence_test liquid-shared) +add_executable(firpfbch_synthesis_equivalence_test firpfbch_synthesis_equivalence_test.c) +target_link_libraries(firpfbch_synthesis_equivalence_test liquid-shared) +add_executable(gmskmodem_test gmskmodem_test.c) +target_link_libraries(gmskmodem_test liquid-shared) +add_executable(gmskmodem_coherent_test gmskmodem_coherent_test.c) +target_link_libraries(gmskmodem_coherent_test liquid-shared) +add_executable(gmskmodem_equalizer_test gmskmodem_equalizer_test.c) +target_link_libraries(gmskmodem_equalizer_test liquid-shared) +add_executable(householder_test householder_test.c) +target_link_libraries(householder_test liquid-shared) +add_executable(sandbox_iirdes_example iirdes_example.c) +target_link_libraries(sandbox_iirdes_example liquid-shared) +add_executable(iirfilt_intdiff_test iirfilt_intdiff_test.c) +target_link_libraries(iirfilt_intdiff_test liquid-shared) +add_executable(levinson_test levinson_test.c) +target_link_libraries(levinson_test liquid-shared) +add_executable(matched_filter_test matched_filter_test.c) +target_link_libraries(matched_filter_test liquid-shared) +add_executable(matched_filter_cfo_test matched_filter_cfo_test.c) +target_link_libraries(matched_filter_cfo_test liquid-shared) +add_executable(math_lngamma_test math_lngamma_test.c) +target_link_libraries(math_lngamma_test liquid-shared) +add_executable(math_cacosf_test math_cacosf_test.c) +target_link_libraries(math_cacosf_test liquid-shared) +add_executable(math_casinf_test math_casinf_test.c) +target_link_libraries(math_casinf_test liquid-shared) +add_executable(math_catanf_test math_catanf_test.c) +target_link_libraries(math_catanf_test liquid-shared) +add_executable(math_cexpf_test math_cexpf_test.c) +target_link_libraries(math_cexpf_test liquid-shared) +add_executable(math_clogf_test math_clogf_test.c) +target_link_libraries(math_clogf_test liquid-shared) +add_executable(math_csqrtf_test math_csqrtf_test.c) +target_link_libraries(math_csqrtf_test liquid-shared) +add_executable(matrix_test matrix_test.c) +target_link_libraries(matrix_test liquid-shared) +add_executable(minsearch_test minsearch_test.c) +target_link_libraries(minsearch_test liquid-shared) +add_executable(minsearch2_test minsearch2_test.c) +target_link_libraries(minsearch2_test liquid-shared) +add_executable(matrix_eig_test matrix_eig_test.c) +target_link_libraries(matrix_eig_test liquid-shared) +add_executable(modem_demodulate_arb_gentab modem_demodulate_arb_gentab.c) +target_link_libraries(modem_demodulate_arb_gentab liquid-shared) +add_executable(modem_demodulate_soft_test modem_demodulate_soft_test.c) +target_link_libraries(modem_demodulate_soft_test liquid-shared) +add_executable(modem_demodulate_soft_gentab modem_demodulate_soft_gentab.c) +target_link_libraries(modem_demodulate_soft_gentab liquid-shared) +add_executable(mskmodem_test mskmodem_test.c) +target_link_libraries(mskmodem_test liquid-shared) +add_executable(msresamp_crcf_test msresamp_crcf_test.c) +target_link_libraries(msresamp_crcf_test liquid-shared) +add_executable(ofdmoqam_firpfbch_test ofdmoqam_firpfbch_test.c) +target_link_libraries(ofdmoqam_firpfbch_test liquid-shared) +add_executable(ofdm_ber_test ofdm_ber_test.c) +target_link_libraries(ofdm_ber_test liquid-shared) +add_executable(ofdmframe_papr_test ofdmframe_papr_test.c) +target_link_libraries(ofdmframe_papr_test liquid-shared) +add_executable(ofdmframesync_cfo_test ofdmframesync_cfo_test.c) +target_link_libraries(ofdmframesync_cfo_test liquid-shared) +add_executable(pll_design_test pll_design_test.c) +target_link_libraries(pll_design_test liquid-shared) +add_executable(predemod_sync_test predemod_sync_test.c) +target_link_libraries(predemod_sync_test liquid-shared) +add_executable(quasinewton_test quasinewton_test.c) +target_link_libraries(quasinewton_test liquid-shared) +add_executable(recursive_qpsk_test recursive_qpsk_test.c) +target_link_libraries(recursive_qpsk_test liquid-shared) +add_executable(resamp2_crcf_filterbank_test resamp2_crcf_filterbank_test.c) +target_link_libraries(resamp2_crcf_filterbank_test liquid-shared) +add_executable(resamp2_crcf_interp_recreate_test resamp2_crcf_interp_recreate_test.c) +target_link_libraries(resamp2_crcf_interp_recreate_test liquid-shared) +add_executable(reverse_byte_gentab reverse_byte_gentab.c) +target_link_libraries(reverse_byte_gentab liquid-shared) +add_executable(rkaiser2_test rkaiser2_test.c) +target_link_libraries(rkaiser2_test liquid-shared) +add_executable(shadowing_test shadowing_test.c) +target_link_libraries(shadowing_test liquid-shared) +add_executable(simplex_test simplex_test.c) +target_link_libraries(simplex_test liquid-shared) +add_executable(symsync_crcf_test symsync_crcf_test.c) +target_link_libraries(symsync_crcf_test liquid-shared) +add_executable(symsync_eqlms_test symsync_eqlms_test.c) +target_link_libraries(symsync_eqlms_test liquid-shared) +add_executable(svd_test svd_test.c) +target_link_libraries(svd_test liquid-shared) +add_executable(thiran_allpass_iir_test thiran_allpass_iir_test.c) +target_link_libraries(thiran_allpass_iir_test liquid-shared) +add_executable(vectorcf_test vectorcf_test.c) +target_link_libraries(vectorcf_test liquid-shared) + +#add_executable(packetizer_persistent_ber_test packetizer_persistent_ber_test.c) +#target_link_libraries(packetizer_persistent_ber_test liquid-shared) +#add_executable(firpfbch_analysis_test firpfbch_analysis_test.c) +#target_link_libraries(firpfbch_analysis_test liquid-shared) +#add_executable(ofdmoqam_firpfbch_cfo_test ofdmoqam_firpfbch_cfo_test.c) +#target_link_libraries(ofdmoqam_firpfbch_cfo_test liquid-shared) +#add_executable(mdct_test mdct_test.c) +#target_link_libraries(mdct_test liquid-shared) +#add_executable(fct_test fct_test.c) +#target_link_libraries(fct_test liquid-shared)