From 00a24fa94141c3af183ff20570ffc6ce93eb61a3 Mon Sep 17 00:00:00 2001 From: Doug Cooper Date: Tue, 1 Jan 2019 09:16:49 -0500 Subject: [PATCH] Fix: Issue with makefile on 64-bit MacOS (Mojave) since 32-bit is now unsupported. --- .gitignore | 2 ++ Makefile | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e26aed3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +hdhomerun_config +libhdhomerun.dylib diff --git a/Makefile b/Makefile index 20dc096..1bda968 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,11 @@ else LDFLAGS += -lsocket endif ifeq ($(OS),Darwin) - CFLAGS += -arch i386 -arch x86_64 + ifeq ($(shell uname -m),x86_64) + CFLAGS += -arch x86_64 + else + CFLAGS += -arch i386 + endif LIBEXT := .dylib SHARED := -dynamiclib -install_name libhdhomerun$(LIBEXT) endif