From 28062739f2d5ee45dba583fa30fce0010aa6d6a3 Mon Sep 17 00:00:00 2001 From: Luca Toniolo Date: Tue, 31 Mar 2026 21:34:02 +0800 Subject: [PATCH] build: fix INCLUDE path for non-uspace builds (fixes #3873) RTDIR points to the realtime prefix (e.g. /usr/realtime-5.4.280-rtai-amd64 for RTAI), so -I$(RTDIR)/../include resolved to /usr/include instead of the project's include/ directory, breaking all and similar angle-bracket includes for userspace objects in RTAI builds. Use $(EMC2_HOME)/include which always resolves to the project's include/ directory regardless of build system. --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 1f46e9e8659..c17e1fdbe69 100644 --- a/src/Makefile +++ b/src/Makefile @@ -245,7 +245,7 @@ $(shell $(VECHO) 1>&2 Done reading dependencies) endif # Each directory in $(INCLUDES) is passed as a -I directory when compiling. -INCLUDE := $(patsubst %,-I%, $(INCLUDES)) -I$(RTDIR)/../include +INCLUDE := $(patsubst %,-I%, $(INCLUDES)) -I$(EMC2_HOME)/include INCLUDE += $(PYTHON_CPPFLAGS) INCLUDE += $(LIBTIRPC_CFLAGS)