From 0b237a47cb9af5ae783c47308e97935bbc186050 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Sun, 17 Oct 2021 19:25:42 +0200 Subject: [PATCH] Initial commit: infrastructure --- impl/.gitignore | 1 + impl/CMakeLists.txt | 40 ++++++++++++++++++++++++++++++++++++++++ impl/compile_flags.txt | 6 ++++++ impl/make.sh | 6 ++++++ 4 files changed, 53 insertions(+) create mode 100644 impl/.gitignore create mode 100644 impl/CMakeLists.txt create mode 100644 impl/compile_flags.txt create mode 100755 impl/make.sh diff --git a/impl/.gitignore b/impl/.gitignore new file mode 100644 index 0000000..567609b --- /dev/null +++ b/impl/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/impl/CMakeLists.txt b/impl/CMakeLists.txt new file mode 100644 index 0000000..fef02bd --- /dev/null +++ b/impl/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required (VERSION 3.2) +project (hamnet70 VERSION 0.1 LANGUAGES C) + +set(CMAKE_C_STANDARD 99) +set(CMAKE_C_FLAGS "-Wall -pedantic -Wextra -DDEBUG_LIQUID") + +include_directories(src) + +# put all .cpp and .h files into the sources variable +set(sources + src/utils.c + src/utils.h + src/main.c + src/packet_mod.h + src/results.h + src/packet_mod.c + src/config.h + src/preamble.h + src/preamble.c +) + +include_directories( + ${CMAKE_PROJECT_NAME} +) + +add_executable( + ${CMAKE_PROJECT_NAME} + ${sources} +) + +# use static linking for liquid, as dynamic linking currently does not work +# with liquid_error_info(). See github issue +# https://github.com/jgaeddert/liquid-dsp/issues/260. +target_link_libraries( + ${CMAKE_PROJECT_NAME} + libliquid.a + m + fftw3f + fec +) diff --git a/impl/compile_flags.txt b/impl/compile_flags.txt new file mode 100644 index 0000000..3ae5280 --- /dev/null +++ b/impl/compile_flags.txt @@ -0,0 +1,6 @@ +-I./src +-Wall +-pedantic +-Wextra +-std=c99 +-DDEBUG_LIQUID diff --git a/impl/make.sh b/impl/make.sh new file mode 100755 index 0000000..e80f080 --- /dev/null +++ b/impl/make.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +mkdir -p build +cd build +cmake .. +make