From 72feb2f614e250b34cb77d1840082abb14e75a09 Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Thu, 8 Apr 2021 22:18:11 +0200 Subject: [PATCH] - updated Makefiles to compile code for latest version of MacOs --- Makefile | 7 +++++++ make/target_system.mk | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 792aafa6..db06c7f8 100644 --- a/Makefile +++ b/Makefile @@ -53,6 +53,13 @@ LIB_SOURCE_DIRS += hal/ethernet/bsd LIB_SOURCE_DIRS += hal/filesystem/linux LIB_SOURCE_DIRS += hal/time/unix LIB_SOURCE_DIRS += hal/memory +else ifeq ($(HAL_IMPL), MACOS) +LIB_SOURCE_DIRS += hal/socket/bsd +LIB_SOURCE_DIRS += hal/thread/macos +LIB_SOURCE_DIRS += hal/ethernet/bsd +LIB_SOURCE_DIRS += hal/filesystem/linux +LIB_SOURCE_DIRS += hal/time/unix +LIB_SOURCE_DIRS += hal/memory endif LIB_INCLUDE_DIRS += config LIB_INCLUDE_DIRS += hal/inc diff --git a/make/target_system.mk b/make/target_system.mk index 8e9b7c1e..1c35c642 100644 --- a/make/target_system.mk +++ b/make/target_system.mk @@ -20,7 +20,7 @@ TARGET=POSIX else ifeq ($(findstring MINGW,$(UNAME)), MINGW) TARGET=WIN32 else ifeq ($(UNAME), Darwin) -TARGET=BSD +TARGET=MACOS else ifeq ($(UNAME), FreeBSD) TARGET=BSD endif @@ -117,10 +117,14 @@ endif else ifeq ($(TARGET), BSD) HAL_IMPL = BSD +else ifeq ($(TARGET), MACOS) +HAL_IMPL = MACOS else HAL_IMPL = POSIX endif + + LDLIBS = -lpthread ifeq ($(TARGET), LINUX-MIPSEL) @@ -174,7 +178,11 @@ else ifeq ($(TARGET), BSD) DYN_LIB_NAME = $(LIB_OBJS_DIR)/libiec61850.dylib else +ifeq ($(TARGET), MACOS) +DYN_LIB_NAME = $(LIB_OBJS_DIR)/libiec61850.dylib +else DYN_LIB_NAME = $(LIB_OBJS_DIR)/libiec61850.so endif +endif endif