From: Maxim Mamontov Date: Mon, 19 Mar 2018 08:52:24 +0000 (+0200) Subject: Minor changes for Darwin. X-Git-Tag: 2.409~19 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/9ac51161f6093558c61f3edaa134831df2b5b38c?hp=--cc Minor changes for Darwin. --- 9ac51161f6093558c61f3edaa134831df2b5b38c 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