From 73bb9b33391281840785fde7f864a27291562d6e Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sun, 26 Oct 2025 14:40:30 +0100 Subject: [PATCH] refactored Makefile --- .gitignore | 1 + src/Makefile => Makefile | 12 +++++++----- c_cpp_properties.json | 2 +- compile_commands.json | 1 + rebuild_compile_commands.sh | 4 ++++ submodules/make | 2 +- 6 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 .gitignore rename src/Makefile => Makefile (70%) create mode 100644 compile_commands.json create mode 100755 rebuild_compile_commands.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/src/Makefile b/Makefile similarity index 70% rename from src/Makefile rename to Makefile index 40ba3ee..f2072dc 100644 --- a/src/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -include ../make/defaults.mk +include make/defaults.mk NAME := Filter CONFIG ?= release TARGET ?= JayFilter.so @@ -7,19 +7,21 @@ CFLAGS += -fPIC CXXFLAGS += -fPIC CXXFLAGS += -std=c++11 -VST2_SDK_PATH := $(realpath ../sdk/vst/vstsdk2.4) -INCLUDES += -I $(realpath .) +VST2_SDK_PATH := $(realpath sdk/vst/vstsdk2.4) +INCLUDES += -I $(realpath src) INCLUDES += -I $(VST2_SDK_PATH) DEFINES += -DVST_2_4_EXTENSIONS=0 -DVST_2_3_EXTENSIONS=1 -GCC_SRCS := iir.c paramutils.c -CXX_SRCS := filter.cpp filterMain.cpp +GCC_SRCS := src/iir.c src/paramutils.c +CXX_SRCS := src/filter.cpp src/filterMain.cpp CXX_SRCS += $(VST2_SDK_PATH)/public.sdk/source/vst2.x/audioeffect.cpp CXX_SRCS += $(VST2_SDK_PATH)/public.sdk/source/vst2.x/audioeffectx.cpp LIBS := -lstdc++ LDFLAGS += $(TARGET_ARCH) $(LIBDIR) -shared +all: link + include $(MAKE_HOME)/compile.mk include $(MAKE_HOME)/link.mk diff --git a/c_cpp_properties.json b/c_cpp_properties.json index b626341..cf7145d 100644 --- a/c_cpp_properties.json +++ b/c_cpp_properties.json @@ -6,6 +6,6 @@ "-log=verbose", "-pretty", "--background-index", - "--compile-commands-dir=${workspaceFolder}/compile_commands.json" + "--compile-commands-dir=${workspaceFolder}/build/compile_commands.json" ] } diff --git a/compile_commands.json b/compile_commands.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/compile_commands.json @@ -0,0 +1 @@ +[] diff --git a/rebuild_compile_commands.sh b/rebuild_compile_commands.sh new file mode 100755 index 0000000..118bfcf --- /dev/null +++ b/rebuild_compile_commands.sh @@ -0,0 +1,4 @@ +#/usr/bin/env bash +export MAKE_HOME=$HOME/work/repos/JayFilter/submodules/make +make clean +bear --config /home/jens/work/repos/JayFilter/c_cpp_properties.json -- make diff --git a/submodules/make b/submodules/make index e07fbf1..98eddf6 160000 --- a/submodules/make +++ b/submodules/make @@ -1 +1 @@ -Subproject commit e07fbf1860f0ffc92fdb69cf646961ca8da10193 +Subproject commit 98eddf6cff76d8d6de7c52e17fd8dd780336fad9