News:

Want to praise Simutrans?
Your feedback is important for us ;D.

mingw makeobj link flags

Started by kierongreen, April 14, 2013, 06:49:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kierongreen

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?

TurfIt

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...