From 528b5738d64a783c39c87b739d9bbdd3b8790854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Agsj=C3=B6?= Date: Thu, 8 Feb 2024 11:58:19 +0100 Subject: [PATCH] Better handling of dynamic include --- src/amy.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/amy.h b/src/amy.h index 40d96ce..8ab24a8 100644 --- a/src/amy.h +++ b/src/amy.h @@ -19,13 +19,15 @@ typedef struct { uint8_t midinote; } pcm_map_t; - -#ifdef AMY_CONFIG_H -#include AMY_CONFIG_H -#else -#include "amy_config.h" +#ifndef AMY_CONFIG_H +#define AMY_CONFIG_H amy_config.h #endif +#define QUOTED(x) #x +#define INCLUDE(x) QUOTED(x) + +#include INCLUDE(AMY_CONFIG_H) + // Rest of amy setup #define SAMPLE_MAX 32767 #define MAX_ALGO_OPS 6