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) $(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(SDL_INCLUDES) $(RECIPE_RESULT_ONESTEP)
arttool$(EXESUFFIX): $(ENGINE_OBJ)/arttool.$o arttool$(EXESUFFIX): $(ENGINE_OBJ)/arttool.$o
$(ONESTEP_STATUS) $(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 #### Lunatic

View file

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