diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index b1f201360..79a3138a8 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -285,7 +285,7 @@ notice: eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB) $(ENETDIR)/$(ENETLIB) $(MISCGAMEDEPS) $(LINK_STATUS) - if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(STDCPPLIB) $(MISCLINKOPTS); then $(LINK_OK); else $(LINK_FAILED); fi + if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(STATICSTDCPP) $(STDCPPLIB) $(MISCLINKOPTS); then $(LINK_OK); else $(LINK_FAILED); fi ifeq (1,$(RELEASE)) ifeq (0,$(DEBUGANYWAY)) $(STRIP) eduke32$(EXESUFFIX) @@ -299,7 +299,7 @@ endif mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)/$(EDITORLIB) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB) $(LINK_STATUS) - if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(STDCPPLIB) $(MISCLINKOPTS); then $(LINK_OK); else $(LINK_FAILED); fi + if $(CC) $(CFLAGS) $(OURCONLYFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(STATICSTDCPP) $(STDCPPLIB) $(MISCLINKOPTS); then $(LINK_OK); else $(LINK_FAILED); fi ifeq (1,$(RELEASE)) ifeq (0,$(DEBUGANYWAY)) $(STRIP) mapster32$(EXESUFFIX) diff --git a/polymer/eduke32/build/Makefile b/polymer/eduke32/build/Makefile index 298a35212..b28792917 100644 --- a/polymer/eduke32/build/Makefile +++ b/polymer/eduke32/build/Makefile @@ -237,7 +237,7 @@ enumdisplay$(EXESUFFIX): $(OBJ)/enumdisplay.$o $(UTILADDOBJS) if $(CC) -o $@ $^ $(UTILLIBS) -I$(DXROOT)/include -lgdi32; then $(ONESTEP_OK); fi arttool$(EXESUFFIX): $(OBJ)/arttool.$o $(UTILADDOBJS) $(ONESTEP_STATUS) - if $(CXX) -o $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi + if $(CXX) -o $@ $^ $(STATICSTDCPP) $(UTILLIBS); then $(ONESTEP_OK); fi givedepth$(EXESUFFIX): $(OBJ)/givedepth.$o $(UTILADDOBJS) $(ONESTEP_STATUS) if $(CC) -o $@ $^ $(UTILLIBS); then $(ONESTEP_OK); fi diff --git a/polymer/eduke32/build/Makefile.shared b/polymer/eduke32/build/Makefile.shared index 0b324d9e1..6180254eb 100644 --- a/polymer/eduke32/build/Makefile.shared +++ b/polymer/eduke32/build/Makefile.shared @@ -234,6 +234,14 @@ ifneq ($(EXESUFFIX_OVERRIDE),) EXESUFFIX=$(EXESUFFIX_OVERRIDE) endif +STATICSTDCPP?= +ifeq (1,$(STATICSTDCPP)) + STATICSTDCPP= -static +endif +ifeq (0,$(STATICSTDCPP)) + STATICSTDCPP= -shared +endif + ifeq ($(PRETTY_OUTPUT),1) BUILD_STARTED = printf "\033[K\033[1;36mBuild started using \"$(CC) $(OURCFLAGS) $(OURCONLYFLAGS) $(OURCXXFLAGS)\"\033[0m\n" BUILD_ECHOFLAGS = printf "\033[K\033[1;36mEnded compilation in this directory using \"$(CC) $(OURCFLAGS) $(OURCONLYFLAGS) $(OURCXXFLAGS)\"\033[0m\n"