Helps with cross compilation when correct lib and include files are used. Signed-off-by: Mikko Rapeli <mikko.rapeli@xxxxxx> --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index eb7ac9a..037a04e 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,10 @@ CC := gcc CC := $(CROSS_COMPILE)$(CC) LD := $(CROSS_COMPILE)$(LD) -CFLAGS = -Wall -W -g -O2 -I. -Iinclude/ -Wimplicit -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE +CFLAGS := -Wall -W -g -O2 -I. -Iinclude/ -Wimplicit -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE +ifneq ($(SYSROOT),) +CFLAGS += --sysroot=$(SYSROOT) +endif #CFLAGS += $(shell if $(CC) -m32 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-m32"; fi) CFLAGS += -Wdeclaration-after-statement CFLAGS += -Wformat=2 -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe trinity" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html