The International Simutrans Forum

 

Author Topic: mingw makeobj link flags  (Read 2394 times)

0 Members and 1 Guest are viewing this topic.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2346
mingw makeobj link flags
« 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?

Code: [Select]
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?

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1434
Re: mingw makeobj link flags
« Reply #1 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...