-
Notifications
You must be signed in to change notification settings - Fork 2
/
02-movement-config.patch
33 lines (31 loc) · 1008 Bytes
/
02-movement-config.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
diff --git a/movement/make/Makefile b/movement/make/Makefile
index bf9351e..0007df5 100644
--- a/movement/make/Makefile
+++ b/movement/make/Makefile
@@ -2,6 +2,10 @@
TOP = ../..
include $(TOP)/make.mk
+ifdef MOVEMENT_CONFIG
+CFLAGS += -DMOVEMENT_CONFIG='"$(MOVEMENT_CONFIG)"'
+endif
+
# If you add any other subdirectories with header files you wish to include, add them after ../
# Note that you will need to add a backslash at the end of any line you wish to continue, i.e.
# INCLUDES += \
diff --git a/movement/movement.c b/movement/movement.c
index 0ded11e..aacd09b 100644
--- a/movement/movement.c
+++ b/movement/movement.c
@@ -34,8 +34,12 @@
#include "filesystem.h"
#include "movement.h"
+#ifndef MOVEMENT_CONFIG
+#define MOVEMENT_CONFIG "movement_config.h"
+#endif
+
#ifndef MOVEMENT_FIRMWARE
-#include "movement_config.h"
+#include MOVEMENT_CONFIG
#elif MOVEMENT_FIRMWARE == MOVEMENT_FIRMWARE_STANDARD
#include "alt_fw/standard.h"
#elif MOVEMENT_FIRMWARE == MOVEMENT_FIRMWARE_ALT_TIME