Makefile: Add L_CXXONLYFLAGS, and use it to pass "-static-libstdc++" on Windows.

git-svn-id: https://svn.eduke32.com/eduke32@5752 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-05-23 04:47:12 +00:00
parent d8c23261a6
commit 1208af001c
2 changed files with 7 additions and 3 deletions

View file

@ -578,7 +578,7 @@ makesdlkeytrans$(EXESUFFIX): $(ENGINE_OBJ)/makesdlkeytrans.$o
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(SDL_INCLUDES) $(RECIPE_RESULT_ONESTEP)
arttool$(EXESUFFIX): $(ENGINE_OBJ)/arttool.$o
$(ONESTEP_STATUS)
$(RECIPE_IF) $(L_CXX) $(CXXONLYFLAGS) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STDCPPLIB) $(RECIPE_RESULT_ONESTEP)
$(RECIPE_IF) $(L_CXX) $(CXXONLYFLAGS) $(L_CXXONLYFLAGS) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STDCPPLIB) $(RECIPE_RESULT_ONESTEP)
#### Lunatic

View file

@ -281,6 +281,7 @@ CXXONLYFLAGS= -fno-exceptions -fno-rtti
ASFORMAT=elf$(SYSBITS)
ASFLAGS=-s -f $(ASFORMAT) #-g
LINKERFLAGS=
L_CXXONLYFLAGS=
LIBS=-lm
GUI_LIBS=
LIBDIRS=
@ -775,6 +776,9 @@ endif
ifeq ($(PLATFORM),WINDOWS)
COMPILERFLAGS+= -DUNDERSCORES -DHAVE_INTTYPES -Iplatform/Windows/include
LINKERFLAGS+= -static-libgcc
ifeq (0,$(CLANG))
L_CXXONLYFLAGS += -static-libstdc++
endif
ASFORMAT=win$(SYSBITS)
ASFLAGS+= -DUNDERSCORES
@ -1080,10 +1084,10 @@ endif
COMPILER=$(CC) $(CONLYFLAGS)
COMPILER_OBJC=$(COBJC) $(CONLYFLAGS)
LINKER=$(L_CC)
LINKER=$(L_CC) $(CONLYFLAGS)
ifneq ($(CPLUSPLUS),0)
COMPILER=$(CXX) $(CXXONLYFLAGS)
LINKER=$(L_CXX)
LINKER=$(L_CXX) $(CXXONLYFLAGS) $(L_CXXONLYFLAGS)
endif
ifneq (,$(CUSTOMOPT))