From 9ac51161f6093558c61f3edaa134831df2b5b38c Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Mon, 19 Mar 2018 10:52:24 +0200 Subject: [PATCH] Minor changes for Darwin. --- projects/sgconf_xml/Makefile | 7 ++++++- projects/sgconf_xml/build | 11 +++++++++-- projects/sgconv/build | 1 - 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/projects/sgconf_xml/Makefile b/projects/sgconf_xml/Makefile index a7058b89..e3eaa05d 100644 --- a/projects/sgconf_xml/Makefile +++ b/projects/sgconf_xml/Makefile @@ -40,7 +40,12 @@ OBJS = $(notdir $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))) CXXFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS) CFLAGS += $(DEFS) $(STGLIBS_INCS) $(SEARCH_DIRS) -LDFLAGS += -Wl,-E $(STGLIBS_LIBS) + +ifneq ($(OS),darwin) +LDFLAGS += -Wl,-E +endif + +LDFLAGS += $(STGLIBS_LIBS) .PHONY: all clean distclean libs install uninstall install-bin install-data uninstall-bin uninstall-data all: libs $(PROG) ../../Makefile.conf diff --git a/projects/sgconf_xml/build b/projects/sgconf_xml/build index a1084554..5aee9de3 100755 --- a/projects/sgconf_xml/build +++ b/projects/sgconf_xml/build @@ -83,13 +83,20 @@ else if [ "$OS" = "bsd" ] then DEFS="$DEFS -DFREE_BSD" + LIB_THREAD=-lc_r else - DEFS="$DEFS -DFREE_BSD5" if [ "$OS" = "bsd7" ] then + DEFS="$DEFS -DFREE_BSD5" LIB_THREAD=-lpthread else - LIB_THREAD=-lc_r + if [ "$OS" == "darwin" ] + then + DEFS="$DEFS -DDARWIN" + LIB_THREAD=-lpthread + else + LIB_THREAD=-lc_r + fi fi fi fi diff --git a/projects/sgconv/build b/projects/sgconv/build index 5fa0f23c..676bf74e 100755 --- a/projects/sgconv/build +++ b/projects/sgconv/build @@ -72,7 +72,6 @@ printf " Building sgconv for $sys $release\n" printf "#############################################################################\n" STG_LIBS="logger.lib - locker.lib crypto.lib common.lib conffiles.lib -- 2.44.2