build_dir:=./build
sources:= test.c ../signalProcessing/signal_path.c

#compile_cmd:=clang-17 -std=c2x -g -lm
compile_cmd_append:=-lm
compile_cmd_opt?=-g
compile_cmd:=gcc $(compile_cmd_opt)

#extra_defines:= -DDEBUG_PRINTS
pre_build_cmd:=mkdir -p $(build_dir)


$(build_dir)/cSensor_processing_single: $(sources)
	$(pre_build_cmd)
	$(compile_cmd) $(sources) -o $(build_dir)/cSensor_processing_single $(extra_defines) -DPLATFORM_GENERIC -DBLOCK_LEN=1 -DMAX_FIR_COEFFS=128 $(compile_cmd_append)
$(build_dir)/cSensor_processing_block: $(sources)
	$(pre_build_cmd)
	$(compile_cmd) $(sources) -o $(build_dir)/cSensor_processing_block $(extra_defines) -DPLATFORM_GENERIC -DBLOCK_LEN=2 -DMAX_FIR_COEFFS=128 $(compile_cmd_append)

clean:
	rm -f $(build_dir)/cSensor_processing_single $(build_dir)/cSensor_processing_block
