Skip to content

Instantly share code, notes, and snippets.

@suitougreentea
Last active April 27, 2018 15:27
Show Gist options
  • Save suitougreentea/703d851c123095e885a9f34107111c21 to your computer and use it in GitHub Desktop.
Save suitougreentea/703d851c123095e885a9f34107111c21 to your computer and use it in GitHub Desktop.
Compile Simutrans-Extended with MinGW toolchain on Cygwin environment
CXX = i686-w64-mingw32-g++
C = i686-w64-mingw32-gcc
LD = i686-w64-mingw32-ld
SDL_CONFIG = /usr/i686-w64-mingw32/sys-root/mingw/bin/sdl-config
SDL2_CONFIG = /usr/i686-w64-mingw32/sys-root/mingw/bin/sdl2-config
BACKEND=gdi
COLOUR_DEPTH=16
OSTYPE=mingw32
#DEBUG = 1 # Level 1-3, higher number means more debug-friendly but slower, see Makefile
#MSG_LEVEL = 1 # Level 1-4, more runtime debug messages (without only warnings and errors)
#OPTIMISE = 1 # Add umpteen optimisation flags
#PROFILE = 1 # Enable profiling
#PROFILE = 2 # Enable profiling with optimisation flags, can be used with `OPTIMISE = 1'
WITH_REVISION = 1 # adds the commit number (truncated) from Github; important for network games
# if you do not use Github and the related scripts for setting the commit number automatically, add -DREVISION="1234" to the FLAGS below
#WIN32_CONSOLE = 1 # adds a console for windows debugging
MULTI_THREAD = 1 # Enable multithreading
#AV_FOUNDATION = 1 # Use AVFoundation instead of QTKit. If you are using macOS 10.12 or later, this must be enabled.
#VERBOSE = 1
# The following useful conditional compilation flags exist
#
# Needed to compile:
# USE_C: no assembler for copying (required for not using GCC on x86)
# SIM_BIG_ENDIAN: MUST be set for PPC/Motorola byte order! (old mac, amiga)
# NO_INTPTR_T: must be set if intptr_t is not available
#
# Changing appearance:
# USE_SOFTPOINTER: emulate mouse pointer (set automatically in Makefile)
#
# Useful for debugging:
# DEBUG_ROUTES: show routing calculation information in minimap
# SHOW_FORE_GRUND: show which objects are drawn as foreground
# DEBUG_FLUSH_BUFFER: show the dirty areas on the screen
# USE_VALGRIND_MEMCHECK: make valgrind-memcheck aware of the memory allocation stuff in dataobj/freelist
# SYSLOG: send debug output to syslog
#
# Following flags alter game engine (and are off for standard builds)
# OTTD_LIKE: Enables half height tiles and crossconnects all industries
# AUTOMATIC_BRIDGES and AUTOMATIC_TUNNELS: will be built also for player
# AUTOJOIN_PUBLIC: stations next to a public stop will be joined to it
# USE_DIFFERENT_WIND: different airplane approach directions over the map
# DESTINATION_CITYCARS: Citycars can have a destination (enabled automatically - cannot be disabled)
#
# In order to use the flags, add a line like this: (-Dxxx)
# FLAGS = -DUSE_C
# The above flag is recommended for speed on modern CPUs: see http://forum.simutrans.com/index.php?topic=16773.msg159658#msg159658
# Output directories:
#
# use this put objects file in same directory, where the sources are (not recommended):
# ... otherwise defaults to 'build/default')
#
# BUILDDIR = $(shell pwd)
#
# use this to specify the target directory for the executable:
# .. otherwise defaults to BUILDDIR
#
# MAKEOBJ_PROGDIR = $(shell pwd)
# NETTOOL_PROGDIR = $(shell pwd)
# PROGDIR = $(shell pwd)
FLAGS = -DUSE_C -fno-delete-null-pointer-checks -fno-strict-aliasing -std=c++11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment