From 34a56585644d1f72a08e9cf8a8398eb89b4dd3db Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sat, 9 May 2020 00:38:32 +0200 Subject: [PATCH] macos: Add system include dir for building libs we use xcrun to determine the correct path. In the future those should be determined at configure time or even runtime of tcc itself. --- lib/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Makefile b/lib/Makefile index 5f1e3c6..ea372a0 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -17,6 +17,10 @@ XFLAGS = $(XFLAGS$(XCFG)) -I$(TOP) XCFG = $(or $(findstring -win,$T),-unx) S = $(if $(findstring yes,$(SILENT)),@$(info * $@)) +ifdef CONFIG_OSX + XFLAGS += -I`xcrun --show-sdk-path`/usr/include +endif + # in order to use gcc, type: make -libtcc1-usegcc=yes arm-libtcc1-usegcc ?= no