Skip to content

Commit 2a337dd

Browse files
committed
Add support for macOS Catalina
But for now it requires macOS Mojave SDK to be installed
1 parent d09b7a5 commit 2a337dd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@ INSTALL_BIN_DIR = $(prefix)/bin
99
# Workaround for "cannot find crti.o" error (only for x86-64 Ubuntu systems).
1010
UBUNTU_LIB = /usr/lib/x86_64-linux-gnu
1111

12+
CONFIGURE_ARGS = --prefix=$(CURDIR)/$(BIN_DIR)/$(ASPECTATOR_BIN_DIR) --enable-languages=c --disable-libsanitizer --disable-multilib --enable-checking=release $(ASPECTATOR_CONFIGURE_OPTS)
13+
14+
# System headers are no longer located in /usr/include on macOS >= Mojave
15+
CONFIGURE_ARGS_MACOS = --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
16+
1217
LN_FLAGS = "-srf"
1318
ifeq ($(shell uname), Darwin)
1419
LN_FLAGS = "-sf"
20+
# System headers are no longer located in /usr/include in macOS >= Mojave
21+
CONFIGURE_ARGS += $(CONFIGURE_ARGS_MACOS)
1522
endif
1623

1724
.PHONY: all install test clean
@@ -22,7 +29,7 @@ all: $(BIN_DIR)/cif
2229
if [ ! -f $(BUILD_DIR)/Makefile ]; then \
2330
echo "Configure Aspectator for the first time"; \
2431
cd $(BUILD_DIR); \
25-
MAKEINFO=missing ../$(ASPECTATOR_SRC_DIR)/configure --prefix=$(CURDIR)/$(BIN_DIR)/$(ASPECTATOR_BIN_DIR) --enable-languages=c --disable-libsanitizer --disable-multilib --enable-checking=release $(ASPECTATOR_CONFIGURE_OPTS); \
32+
MAKEINFO=missing ../$(ASPECTATOR_SRC_DIR)/configure $(CONFIGURE_ARGS); \
2633
fi
2734
@echo "Begin to (re)build Aspectator"
2835
@if [[ -d $(UBUNTU_LIB) && ! -z LIBRARY_PATH ]]; then export LIBRARY_PATH=$(UBUNTU_LIB); fi

0 commit comments

Comments
 (0)