From 9f6fa1792843dfd3a6dafb61b56ee0a8db0f9976 Mon Sep 17 00:00:00 2001 From: fG! Date: Fri, 19 May 2023 12:22:57 +0100 Subject: [PATCH] Add missing arm64 to Darwin LIBARCHS and remove dependencies tracking if building universal binary (dependencies not compatible with fat binaries) --- Makefile | 2 +- functions.mk | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a971f5524..e288e4305 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ V ?= 0 OS := $(shell uname) ifeq ($(OS),Darwin) -LIBARCHS ?= x86_64 +LIBARCHS ?= x86_64 arm64 PREFIX ?= /usr/local endif diff --git a/functions.mk b/functions.mk index d734ce5d5..a5698f9c9 100644 --- a/functions.mk +++ b/functions.mk @@ -2,7 +2,9 @@ # Common functions used by Makefile & tests/Makefile define compile - @$(CC) -MM -MP -MT $@ -MT $(@:.o=.d) $(CFLAGS) $< > $(@:.o=.d) + $(ifeq ($(MACOS_UNIVERSAL),no), + @$(CC) -MM -MP -MT $@ -MT $(@:.o=.d) $(CFLAGS) $< > $(@:.o=.d) + ) ${CC} ${CFLAGS} -c $< -o $@ endef