aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMichael 'ASAP' Weinrich <michael@a5ap.net>2024-02-15 20:11:47 -0800
committerKevinOConnor <kevin@koconnor.net>2024-04-03 22:53:09 -0400
commit24c884e9f393fa42c37e38d12d3cedb1adb23776 (patch)
treef5b49b6e35227c598921eb83b51d06242b598191 /Makefile
parent75a40e817db4d5bc9d7d893fad499907d2b910a2 (diff)
downloadkutter-24c884e9f393fa42c37e38d12d3cedb1adb23776.tar.gz
kutter-24c884e9f393fa42c37e38d12d3cedb1adb23776.tar.xz
kutter-24c884e9f393fa42c37e38d12d3cedb1adb23776.zip
makefile: Replace CFLAGS -I with -iquote
The -iquote tells GCC to only search that path when resolving a quoted "include" (vs <angle brackets>) which by convention imples a include from the projects own soruce tree. This prevents a conflict between Klippers "sched.h" and "gpio.h" and <linux/gpio.h> and glibc <sched.h>. Signed-off-by: Michael 'ASAP' Weinrich <michael@a5ap.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6d018403..735d1863 100644
--- a/Makefile
+++ b/Makefile
@@ -29,8 +29,9 @@ dirs-y = src
cc-option=$(shell if test -z "`$(1) $(2) -S -o /dev/null -xc /dev/null 2>&1`" \
; then echo "$(2)"; else echo "$(3)"; fi ;)
-CFLAGS := -I$(OUT) -Isrc -I$(OUT)board-generic/ -std=gnu11 -O2 -MD \
- -Wall -Wold-style-definition $(call cc-option,$(CC),-Wtype-limits,) \
+CFLAGS := -iquote $(OUT) -iquote src -iquote $(OUT)board-generic/ \
+ -std=gnu11 -O2 -MD -Wall \
+ -Wold-style-definition $(call cc-option,$(CC),-Wtype-limits,) \
-ffunction-sections -fdata-sections -fno-delete-null-pointer-checks
CFLAGS += -flto=auto -fwhole-program -fno-use-linker-plugin -ggdb3