The International Simutrans Forum

Development => Patches & Projects => Topic started by: kierongreen on April 14, 2013, 06:49:34 PM

Title: mingw makeobj link flags
Post by: kierongreen on April 14, 2013, 06:49:34 PM
I'm not sure if this is just a result of compiling with mingw under linux but makeobj executables I've created have required dlls to run. This change to the makeobj makefile seems to fix this, comments?

ifeq ($(OSTYPE),mingw)
  CC ?= gcc
  OS_OPT   ?= -DPNG_STATIC -DZLIB_STATIC -march=pentium
  # we need the libraries EXACTLY in this order to link
  STD_LIBS = -lmingw32 -lpng -lz

+  LDFLAGS = -static-libgcc -static-libstdc++
endif


Maybe that should be LDFLAGS += instead? Not that good on makefile syntax?
Title: Re: mingw makeobj link flags
Post by: TurfIt on April 14, 2013, 07:02:22 PM
Yes, this is fine (with += syntax which adds to existing). @r6454
I see prissi added to the main simutrans Makefile last year but missed makeobj. I've had the LDFLAGS added to config.default which applies to both so never noticed the missing...