From: Maxim Mamontov Date: Tue, 20 Mar 2018 09:58:18 +0000 (+0200) Subject: Fix build on Darwin. X-Git-Tag: 2.409~16 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/ce23bada2111a637074629161268ce1039d28a58 Fix build on Darwin. --- diff --git a/projects/libs/build b/projects/libs/build index 4c1fce9b..53e3b533 100755 --- a/projects/libs/build +++ b/projects/libs/build @@ -65,7 +65,7 @@ fi if [ "$sys" = "Darwin" ] then OS=darwin - MAKE="gmake" + MAKE="make" fi if [ "$OS" = "unknown" ] diff --git a/projects/rscriptd/build b/projects/rscriptd/build index 995a9373..8c12e527 100755 --- a/projects/rscriptd/build +++ b/projects/rscriptd/build @@ -55,7 +55,7 @@ if [ "$sys" = "Darwin" ] then OS=darwin ETC_DIR="./inst/freebsd/etc/stargazer" - MAKE="gmake" + MAKE="make" fi if [ "$OS" = "unknown" ] diff --git a/projects/sgauth/build b/projects/sgauth/build index 5f8821b0..3e5833fc 100755 --- a/projects/sgauth/build +++ b/projects/sgauth/build @@ -55,7 +55,7 @@ if [ "$sys" = "Darwin" ] then OS=darwin ETC_DIR="./inst/freebsd/etc/stargazer" - MAKE="gmake" + MAKE="make" CFLAGS="$CFLAGS -I/opt/local/include" CXXFLAGS="$CFLAGS -I/opt/local/include" LDFLAGS="$LDFLAGS -L/opt/local/lib" diff --git a/projects/sgauthstress/Makefile b/projects/sgauthstress/Makefile index 74c09b62..4415220f 100644 --- a/projects/sgauthstress/Makefile +++ b/projects/sgauthstress/Makefile @@ -30,7 +30,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 plugins all: libs plugins $(PROG) ../../Makefile.conf diff --git a/projects/sgauthstress/build b/projects/sgauthstress/build index dae35b74..125061d9 100755 --- a/projects/sgauthstress/build +++ b/projects/sgauthstress/build @@ -55,7 +55,7 @@ if [ "$sys" = "Darwin" ] then OS=darwin ETC_DIR="./inst/freebsd/etc/stargazer" - MAKE="gmake" + MAKE="make" CFLAGS="$CFLAGS -I/opt/local/include" CXXFLAGS="$CFLAGS -I/opt/local/include" LDFLAGS="$LDFLAGS -L/opt/local/lib" @@ -92,12 +92,18 @@ else 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/sgconf/build b/projects/sgconf/build index 7ac18e3c..559f53c5 100755 --- a/projects/sgconf/build +++ b/projects/sgconf/build @@ -55,7 +55,7 @@ if [ "$sys" = "Darwin" ] then OS=darwin ETC_DIR="./inst/freebsd/etc/stargazer" - MAKE="gmake" + MAKE="make" fi if [ "$OS" = "unknown" ] diff --git a/projects/sgconf_xml/build b/projects/sgconf_xml/build index 5aee9de3..eb782f9f 100755 --- a/projects/sgconf_xml/build +++ b/projects/sgconf_xml/build @@ -54,7 +54,7 @@ fi if [ "$sys" = "Darwin" ] then OS=darwin - MAKE="gmake" + MAKE="make" fi if [ "$OS" = "unknown" ] diff --git a/projects/sgconv/build b/projects/sgconv/build index 676bf74e..3eb6e033 100755 --- a/projects/sgconv/build +++ b/projects/sgconv/build @@ -56,7 +56,7 @@ if [ "$sys" = "Darwin" ] then OS=darwin ETC_DIR="./inst/freebsd/etc/stargazer" - MAKE="gmake" + MAKE="make" fi if [ "$OS" = "unknown" ] diff --git a/projects/stargazer/build b/projects/stargazer/build index 1fbb8a98..f54e5ffb 100755 --- a/projects/stargazer/build +++ b/projects/stargazer/build @@ -76,7 +76,7 @@ if [ "$sys" = "Darwin" ] then OS=darwin ETC_DIR="./inst/freebsd/etc/stargazer" - MAKE="gmake" + MAKE="make" fi if [ "$OS" = "unknown" ]