diff --git a/Makefile b/Makefile index e3b9bb1..790e889 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,23 @@ endif # MOD builds MOD_WORKDIR ?= $(HOME)/mod-workdir -MOD_ENVIRONMENT = AR=${1}/host/usr/bin/${2}-gcc-ar CC=${1}/host/usr/bin/${2}-gcc CPP=${1}/host/usr/bin/${2}-cpp CXX=${1}/host/usr/bin/${2}-g++ LD=${1}/host/usr/bin/${2}-ld PKG_CONFIG=${1}/host/usr/bin/pkg-config STRIP=${1}/host/usr/bin/${2}-strip CFLAGS="-I${1}/staging/usr/include" CPPFLAGS= CXXFLAGS="-I${1}/staging/usr/include" LDFLAGS="-L${1}/staging/usr/lib" \ EXE_WRAPPER="qemu-${3}-static -L ${1}/target" HEADLESS=true MOD_BUILD=true NOOPT=true STATIC_BUILD=true +MOD_ENVIRONMENT = \ + AR=${1}/host/usr/bin/${2}-gcc-ar \ + CC=${1}/host/usr/bin/${2}-gcc \ + CPP=${1}/host/usr/bin/${2}-cpp \ + CXX=${1}/host/usr/bin/${2}-g++ \ + LD=${1}/host/usr/bin/${2}-ld \ + PKG_CONFIG=${1}/host/usr/bin/pkg-config \ + STRIP=${1}/host/usr/bin/${2}-strip \ + CFLAGS="-I${1}/staging/usr/include -fsingle-precision-constant" \ + CPPFLAGS= \ + CXXFLAGS="-I${1}/staging/usr/include -I../include/single-precision -fsingle-precision-constant -Wno-attributes" \ + LDFLAGS="-L${1}/staging/usr/lib" \ + EXE_WRAPPER="qemu-${3}-static -L ${1}/target" \ + HEADLESS=true \ + MOD_BUILD=true \ + NOOPT=true \ + STATIC_BUILD=true modduo: $(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduo-static,arm-mod-linux-gnueabihf.static,arm) diff --git a/include/single-precision/algorithm b/include/single-precision/algorithm new file mode 100644 index 0000000..b6f58d0 --- /dev/null +++ b/include/single-precision/algorithm @@ -0,0 +1,46 @@ +/* + * DISTRHO Cardinal Plugin + * Copyright (C) 2021-2022 Filipe Coelho + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 3 of + * the License, or any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * For a full copy of the GNU General Public License see the LICENSE file. + */ + +#pragma once +#include_next +#include_next + +namespace std { + +static inline +float max(const float a, const double b) { + return std::max(a, static_cast(b)); +} + +static inline +std::complex operator*(const std::complex& a, const float b) { + return static_cast>(a) * b; +} + +static inline +std::complex operator*(const float a, const std::complex& b) { + return a * static_cast>(b); +} + +static inline +std::complex operator/(const std::complex& a, const std::complex& b) { + return static_cast>(a) / b; +} + +} + +// std::complex diff --git a/plugins/BaconPlugs b/plugins/BaconPlugs index c7eb417..0a6c390 160000 --- a/plugins/BaconPlugs +++ b/plugins/BaconPlugs @@ -1 +1 @@ -Subproject commit c7eb417fa18fd87fe4e49eee22af1ed51547a4ce +Subproject commit 0a6c390eedf98884393f82cb066038a78a316ea5 diff --git a/plugins/repelzen b/plugins/repelzen index b8fbeae..185e07e 160000 --- a/plugins/repelzen +++ b/plugins/repelzen @@ -1 +1 @@ -Subproject commit b8fbeae247f873cd20a3a2598907c4391f0d8171 +Subproject commit 185e07ea94086a04b3daacb4bf94c0fbd3544725