Simutrans Forum Archive

The International Simutrans Forum > Resources & Development > Source code, Patches, and Nightly Builds > Compiling Simutrans > Topic: MAC - Compiling 0.99.12 - howto
Author
Topic: MAC - Compiling 0.99.12 - howto  (Read 1697 times)
claire
Member
*
*
Gender: Female
Posts: 299
Stranger in an even stranger land
clair_rand
MAC - Compiling 0.99.12 - howto
Last Edit: July 17, 2007, 02:45:25 PM by prissi
Now you need to download and extract the source for simutrans, this is in the release directory along with binaries for other platforms and the 'pak' downloads required.

now you need to edit a few files in this extracted folder, covered one at a time, in order to make this build.

config.template
open this file in textedit, and save with the name config.default, now edit it to show the following

BACKEND=sdl
COLOR_DEPTH=16
OSTYPE=macintel
SDL_CONFIG = sdl-config
FLAGS  = -DLITTLE_ENDIAN

you may have to add the macintel line, ensure other lines are commented out with a '#' character in front of them

now save this file as config.default

makefile
change the name of this file to makefile.old and create a new empty text file called makefile, in text edit copy the following into this file:

# start of makefile
CONFIG ?= config.default
-include $(CONFIG)


BACKENDS      = allegro gdi sdl x11
COLOUR_DEPTHS = 8 16
OSTYPES       = beos cygwin freebsd linux mingw macintel



ifeq ($(OSTYPE),macintel)
  CFLAGS   += -DUSE_HW -DUSE_C
  STD_LIBS ?= -lz
endif

SDL_CONFIG     ?= sdl-config


ifneq ($(OPTIMISE),)
  CFLAGS   += -O3 -fomit-frame-pointer -fschedule-insns2 -fexpensive-optimizations -fgcse -fstrict-aliasing -minline-all-stringops
  CXXFLAGS += -O3 -fomit-frame-pointer -fschedule-insns2 -fregmove -freorder-blocks -falign-functions
else
  CFLAGS   += -O
  CXXFLAGS += -O
endif

ifneq ($(DEBUG),)
  CFLAGS   += -DDEBUG -g -fno-omit-frame-pointer
  CXXFLAGS += -DDEBUG -g -fno-omit-frame-pointer
endif

ifneq ($(PROFILE),)
  CFLAGS   += -pg
  CXXFLAGS += -pg
  LDFLAGS  += -pg
endif

CFLAGS   += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -Wstrict-prototypes $(OS_INC) $(OS_OPT) $(FLAGS)
CXXFLAGS += -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align $(OS_INC) $(OS_OPT) $(FLAGS)


SOURCES += bauer/brueckenbauer.cc
SOURCES += bauer/fabrikbauer.cc
SOURCES += bauer/hausbauer.cc
SOURCES += bauer/tunnelbauer.cc
SOURCES += bauer/vehikelbauer.cc
SOURCES += bauer/warenbauer.cc
SOURCES += bauer/wegbauer.cc
SOURCES += besch/bild_besch.cc
SOURCES += besch/bruecke_besch.cc
SOURCES += besch/grund_besch.cc
SOURCES += besch/haus_besch.cc
SOURCES += besch/reader/bridge_reader.cc
SOURCES += besch/reader/building_reader.cc
SOURCES += besch/reader/citycar_reader.cc
SOURCES += besch/reader/crossing_reader.cc
SOURCES += besch/reader/factory_reader.cc
SOURCES += besch/reader/good_reader.cc
SOURCES += besch/reader/ground_reader.cc
SOURCES += besch/reader/image_reader.cc
SOURCES += besch/reader/imagelist2d_reader.cc
SOURCES += besch/reader/imagelist_reader.cc
SOURCES += besch/reader/obj_reader.cc
SOURCES += besch/reader/pedestrian_reader.cc
SOURCES += besch/reader/roadsign_reader.cc
SOURCES += besch/reader/root_reader.cc
SOURCES += besch/reader/sim_reader.cc
SOURCES += besch/reader/skin_reader.cc
SOURCES += besch/reader/sound_reader.cc
SOURCES += besch/reader/text_reader.cc
SOURCES += besch/reader/tree_reader.cc
SOURCES += besch/reader/tunnel_reader.cc
SOURCES += besch/reader/vehicle_reader.cc
SOURCES += besch/reader/way_obj_reader.cc
SOURCES += besch/reader/way_reader.cc
SOURCES += besch/reader/xref_reader.cc
SOURCES += besch/sound_besch.cc
SOURCES += besch/tunnel_besch.cc
SOURCES += besch/ware_besch.cc
SOURCES += boden/boden.cc
SOURCES += boden/brueckenboden.cc
SOURCES += boden/fundament.cc
SOURCES += boden/grund.cc
SOURCES += boden/monorailboden.cc
SOURCES += boden/tunnelboden.cc
SOURCES += boden/wasser.cc
SOURCES += boden/wege/kanal.cc
SOURCES += boden/wege/monorail.cc
SOURCES += boden/wege/runway.cc
SOURCES += boden/wege/schiene.cc
SOURCES += boden/wege/strasse.cc
SOURCES += boden/wege/weg.cc
SOURCES += dataobj/dingliste.cc
SOURCES += dataobj/einstellungen.cc
SOURCES += dataobj/fahrplan.cc
SOURCES += dataobj/freelist.cc
SOURCES += dataobj/koord.cc
SOURCES += dataobj/koord3d.cc
SOURCES += dataobj/loadsave.cc
SOURCES += dataobj/marker.cc
SOURCES += dataobj/powernet.cc
SOURCES += dataobj/ribi.cc
SOURCES += dataobj/route.cc
SOURCES += dataobj/tabfile.cc
SOURCES += dataobj/translator.cc
SOURCES += dataobj/umgebung.cc
SOURCES += dataobj/warenziel.cc
SOURCES += dings/baum.cc
SOURCES += dings/bruecke.cc
SOURCES += dings/crossing.cc
SOURCES += dings/dummy.cc
SOURCES += dings/gebaeude.cc
SOURCES += dings/field.cc
SOURCES += dings/label.cc
SOURCES += dings/leitung2.cc
SOURCES += dings/pillar.cc
SOURCES += dings/roadsign.cc
SOURCES += dings/signal.cc
SOURCES += dings/tunnel.cc
SOURCES += dings/wayobj.cc
SOURCES += dings/wolke.cc
SOURCES += dings/zeiger.cc
SOURCES += gui/components/gui_button.cc
SOURCES += gui/components/gui_chart.cc
SOURCES += gui/components/gui_combobox.cc
SOURCES += gui/components/gui_flowtext.cc
SOURCES += gui/components/gui_image_list.cc
SOURCES += gui/components/gui_label.cc
SOURCES += gui/components/gui_scrollbar.cc
SOURCES += gui/components/gui_scrolled_list.cc
SOURCES += gui/components/gui_scrollpane.cc
SOURCES += gui/components/gui_speedbar.cc
SOURCES += gui/components/gui_tab_panel.cc
SOURCES += gui/components/gui_textarea.cc
SOURCES += gui/components/gui_textinput.cc
SOURCES += gui/components/gui_world_view_t.cc
SOURCES += gui/banner.cc
SOURCES += gui/citylist_frame_t.cc
SOURCES += gui/citylist_stats_t.cc
SOURCES += gui/climates.cc
SOURCES += gui/colors.cc
SOURCES += gui/convoi_detail_t.cc
SOURCES += gui/convoi_filter_frame.cc
SOURCES += gui/convoi_frame.cc
SOURCES += gui/convoi_info_t.cc
SOURCES += gui/curiositylist_frame_t.cc
SOURCES += gui/curiositylist_stats_t.cc
SOURCES += gui/depot_frame.cc
SOURCES += gui/fabrik_info.cc
SOURCES += gui/factorylist_frame_t.cc
SOURCES += gui/factorylist_stats_t.cc
SOURCES += gui/fahrplan_gui.cc
SOURCES += gui/goods_frame_t.cc
SOURCES += gui/goods_stats_t.cc
SOURCES += gui/ground_info.cc
SOURCES += gui/gui_container.cc
SOURCES += gui/gui_convoiinfo.cc
SOURCES += gui/gui_frame.cc
SOURCES += gui/halt_detail.cc
SOURCES += gui/halt_info.cc
SOURCES += gui/halt_list_filter_frame.cc
SOURCES += gui/halt_list_frame.cc
SOURCES += gui/halt_list_stats.cc
SOURCES += gui/help_frame.cc
SOURCES += gui/jump_frame.cc
SOURCES += gui/karte.cc
SOURCES += gui/kennfarbe.cc
SOURCES += gui/label_frame.cc
SOURCES += gui/line_management_gui.cc
SOURCES += gui/load_relief_frame.cc
SOURCES += gui/loadsave_frame.cc
SOURCES += gui/map_frame.cc
SOURCES += gui/message_frame_t.cc
SOURCES += gui/message_option_t.cc
SOURCES += gui/message_stats_t.cc
SOURCES += gui/messagebox.cc
SOURCES += gui/money_frame.cc
SOURCES += gui/optionen.cc
SOURCES += gui/player_frame_t.cc
SOURCES += gui/savegame_frame.cc
SOURCES += gui/schedule_list.cc
SOURCES += gui/sound_frame.cc
SOURCES += gui/sprachen.cc
SOURCES += gui/stadt_info.cc
SOURCES += gui/thing_info.cc
SOURCES += gui/welt.cc
SOURCES += gui/werkzeug_parameter_waehler.cc
SOURCES += sucher/platzsucher.cc
SOURCES += tpl/debug_helper.cc
SOURCES += utils/cbuffer_t.cc
SOURCES += utils/cstring_t.cc
SOURCES += utils/log.cc
SOURCES += utils/searchfolder.cc
SOURCES += utils/simstring.c
SOURCES += utils/tocstring.cc
SOURCES += font.cc
SOURCES += freight_list_sorter.cc
SOURCES += old_blockmanager.cc
SOURCES += simcity.cc
SOURCES += simconvoi.cc
SOURCES += simdebug.cc
SOURCES += simdepot.cc
SOURCES += simdings.cc
SOURCES += simdisplay.c
SOURCES += simevent.c
SOURCES += simfab.cc
SOURCES += simhalt.cc
SOURCES += simintr.cc
SOURCES += simio.cc
SOURCES += simline.cc
SOURCES += simlinemgmt.cc
SOURCES += simmain.cc
SOURCES += simmem.cc
SOURCES += simmenu.cc
SOURCES += simmesg.cc
SOURCES += simpeople.cc
SOURCES += simplan.cc
SOURCES += simplay.cc
SOURCES += simskin.cc
SOURCES += simsound.cc
SOURCES += simticker.cc
SOURCES += simtools.c
SOURCES += simvehikel.cc
SOURCES += simverkehr.cc
SOURCES += simview.cc
SOURCES += simware.cc
SOURCES += simwerkz.cc
SOURCES += simwin.cc
SOURCES += simworld.cc
SOURCES += unicode.c
SOURCES += simgraph$(COLOUR_DEPTH).c


SOURCES  += simsys_s.c
CFLAGS   += -DUSE_16BIT_DIB
CXXFLAGS   += -DUSE_16BIT_DIB

SDL_CFLAGS := -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -Dmain=/usr/local/include/SDL
SDL_LDFLAGS := -L/usr/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa -lSDL_mixer


CFLAGS   += $(SDL_CFLAGS)
CXXFLAGS += $(SDL_CFLAGS)
LIBS     += $(SDL_LDFLAGS)


SOURCES += music/sdl_midi.c
SOURCES += sound/sdl_sound.c


PROG = sim-99-12


include common.mk


makeobj_prog:
   $(MAKE) -e -C makeobj

# end of makefile

save this as makefile, note that much of the original makefile has been removed, this will only compile for the intel mac with SDL, everything else has been removed. Also this is setup to work with the SDL libraries installed as per another post in the forum.

now point terminal at the simutrans source code directory, e.g.

cd ~/desktop/sinutrans-src-99-12

and type

make

a hell of a lot of text will scroll past, which should end with the line:

===> LD  sim-99-12

if there are no errors you now have a compiled version of simutrans, copy the file sim-99-12 into the folder with the pak downloaded into it.. cd to that directory and type ./sim-99-12 the game should start..

of course you can also download simutrans-launch to handle the launching for you in a more graphical way, this application, co-written by moi, can be found at http://www.aleopardstail.com/simutrans-launch.php for the latest released version, which provides a graphical way of selecting startup options.

but however you start the game... have fun Smiley
Apple Macintosh  Using PAK 128
prissi
Member
*
*
*
*
*
*
*
*
Gender: Male
Posts: 5135
Re: Compiling 0.99.12 - howto
Why on earth you need to edit the makefile? There is not the way to do it. Just install sdl correctly should automagically add them to their link path. Or then add something to be done on an empty commandline with a macintel, in the Makefile sdl-section. But I am pretty sure you made a mistake somewhere.

Compiling for the mac should work like for any other system, just specify macintel in the config.default.

(And generally, I am not happy about this board, but that is another thing.)
claire
Member
*
*
Gender: Female
Posts: 299
Stranger in an even stranger land
clair_rand
Re: Compiling 0.99.12 - howto
the makefile, as supplied doesn't support the intel mac, there is no section to set the libraries up at all. for future releases its not too hard to add the required sections, there are two flavours, one for the frameworks and one for the unix style libraries, depending which you choose to install.

I'm all for adding one of these, it doesn't matter which, to the default makefile for future releases.

I realise your not too happy about these boards, not too sure they actually require sub boards for each OS but there you go.

I requested them since the fact the source didn't compile on the mac isn't a bug as such (well at the time i didn't think it was, just a config issue) specifically to avoid people seeing this sort of thing as a bug, once one person has found a way to make something work why should anyone else have to do the work again etc..

the SDL frameworks do not include the 'sdl-config' program, which the makefile uses to obtain the library paths to include
Apple Macintosh  Using PAK 128
prissi
Member
*
*
*
*
*
*
*
*
Gender: Male
Posts: 5135
Re: Compiling 0.99.12 - howto
If you build the SDL from source, there should be the SDL-config shell script then somewhere that will take care of the libaries and includes. It works even in mingw (although it is not too easy to set it up there too). As for includes and libs, these should go into

ifeq ($(OSTYPE),macintel)
  CFLAGS   += -DUSE_HW -DUSE_C
  STD_LIBS ?= -lz
endif

or

ifeq ($(BACKEND),sdl)
  SOURCES  += simsys_s.c
  CFLAGS   += -DUSE_16BIT_DIB
  CXXFLAGS   += -DUSE_16BIT_DIB
  ifeq ($(SDL_CONFIG),)
    SDL_CFLAGS  := -I$(MINGDIR)/include/SDL -Dmain=SDL_main
    SDL_LDFLAGS := -lmingw32 -lSDLmain -lSDL -mwindows
  else
    SDL_CFLAGS  := $(shell $(SDL_CONFIG) --cflags)
    SDL_LDFLAGS := $(shell $(SDL_CONFIG) --libs)
  endif

  SDL_LDFLAGS+= -lSDL_mixer

  CFLAGS   += $(SDL_CFLAGS)
  CXXFLAGS += $(SDL_CFLAGS)
  LIBS     += $(SDL_LDFLAGS)
endif

although in the latter also the ifeq ($(OSTYPE),mingw) is obviously missing.
claire
Member
*
*
Gender: Female
Posts: 299
Stranger in an even stranger land
clair_rand
Re: Compiling 0.99.12 - howto
that was most of the problem, getting 'sdl-config' both fink and building from source provided this, the frameworks don't.

from a sensibility point of view using 'normal' libraries makes sense here, since then you get the config script, which with luck will them work. for some strange reason it didn't here. still not figured that out, until i installed a unix style libraries linking to -Dmain=SDL_main failed everytime. with the source you get the required file for os x in objective-c required to get the program to actually start. the frameworks appear to have somethign similar but using it requires dragging the makefile into xcode, which i don't even want to think about.

with luck the next version will 'just work', because i now have the libraries installed.

I thought I'd do a 'walk through' since I know many people that use the apple mac won't be used to how to compile programs etc. cus.. well why should they etc..

as a humble muppet if you disagree with any of this being posted feel free to have it all nuked, I won't sulk.

personally i'm looking forward to entering the source directory and typing 'make' and it just working, ironically simutrans is the closest to actually using this i've ever come, not requiring stacks of strange libraries etc.

btw the makefile for makeobj doesn't consider the mac, but its easy to fix.
Apple Macintosh  Using PAK 128
prissi
Member
*
*
*
*
*
*
*
*
Gender: Male
Posts: 5135
Re: Compiling 0.99.12 - howto
I compile makeobj with the same makefile everywhere. These were the old makefiles, before the automatically mechanism. YOu just need libpng somewhere in your searchpath.

And for mac of course one can add to the makefile:
Code:
ifeq ($(BACKEND),sdl)
  SOURCES  += simsys_s.c
  CFLAGS   += -DUSE_16BIT_DIB
  CXXFLAGS   += -DUSE_16BIT_DIB
  ifeq ($(SDL_CONFIG),)
ifeq ($(OSTYPE),mingw)
    SDL_CFLAGS  := -I$(MINGDIR)/include/SDL -Dmain=SDL_main
    SDL_LDFLAGS := -lmingw32 -lSDLmain -lSDL -mwindows
else
ifeq ($(OSTYPE),macintel)
    SDL_CFLAGS := -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -Dmain=/usr/local/include/SDL
    SDL_LDFLAGS := -L/usr/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa -lSDL_mixer
else
    $(error SDL needs explicit pathes but none given!)
endif
endif
  else
    SDL_CFLAGS  := $(shell $(SDL_CONFIG) --cflags)
    SDL_LDFLAGS := $(shell $(SDL_CONFIG) --libs)
  endif

  SDL_LDFLAGS+= -lSDL_mixer

  CFLAGS   += $(SDL_CFLAGS)
  CXXFLAGS += $(SDL_CFLAGS)
  LIBS     += $(SDL_LDFLAGS)
endif
claire
Member
*
*
Gender: Female
Posts: 299
Stranger in an even stranger land
clair_rand
Re: Compiling 0.99.12 - howto
for makeobj this is basically what I did, a simple makefile tweak.

Given just how complex simutrans actually is, making it as cross platform as it already is.. well its frankly amazing.

I just wish my own coding skills were enough to actually help...
Apple Macintosh  Using PAK 128
Bjarni
Member
*
Gender: Male
Posts: 15
Re: Compiling 0.99.12 - howto
I really hope that you don't plan on forcing all macs to use the SDL framework. It should be optional with some sort of settings flag in the config file.
People, who tend to compile their software themselves should have unix style libs installed anyway as framework support isn't common. In fact I didn't even have the sdl framework installed until Simutrans demanded it (for the binary distribution).
claire
Member
*
*
Gender: Female
Posts: 299
Stranger in an even stranger land
clair_rand
Re: Compiling 0.99.12 - howto
i'd be tempted to say keep the *default* as to use the frameworks, which for most people will be a lot easier. people compiling from the source can probably adjust the makefile for the unix libs without too much trouble.

but this way keeps it easy for people who just want to play the game.. i.e. download the two frameworks and just copy the folders. as opposed to having to install the dev tools and use them.

personally I don't care if a program wants the frameworks or the unix style libs, I have both (now) and as long as its easy to see which is which it doesn't matter its not too hard to have instructions on how to make them work.
Apple Macintosh  Using PAK 128
Bjarni
Member
*
Gender: Male
Posts: 15
Re: Compiling 0.99.12 - howto
i'd be tempted to say keep the *default* as to use the frameworks, which for most people will be a lot easier. people compiling from the source can probably adjust the makefile for the unix libs without too much trouble.
I guess the only nice solution would be to add a flag to config.template (config.default) to tell if frameworks or unix style libs should be used.
prissi
Member
*
*
*
*
*
*
*
*
Gender: Male
Posts: 5135
Re: Compiling 0.99.12 - howto
Last Edit: June 16, 2007, 12:02:32 PM by prissi
@claire
Did you test my suggested addition to the makefile? If this works, I would submit it to the svn.
Bjarni
Member
*
Gender: Male
Posts: 15
Re: Compiling 0.99.12 - howto
@claire
Did you test my suggested addition to the makefile? If this works, I would submit it to the svn.
This will not work with my setup. I need it to use sdl-config to locate the right location for the sdl lib.

The nice solution to this would be to add a USE_FRAMEWORKS flag to the config. Otherwise it will force either frameworks or unix style libs on the user, which is a bad thing.
Bjarni
Member
*
Gender: Male
Posts: 15
Re: Compiling 0.99.12 - howto
@Claire:
you didn't link against your frameworks, you linked against SDL at a different location (still in unix style). I wrote a patch to do it with frameworks. It compiles, but then the linker reports that it fails to find main() and I don't see why. Since I don't have the time to look at that issue right now, I guess you might want to take a look at the patch. If not, then it will have to wait.
* framework.patch (0.91 KB - downloaded 20 times.)
prissi
Member
*
*
*
*
*
*
*
*
Gender: Male
Posts: 5135
Re: Compiling 0.99.12 - howto
Setting in config.default the path to sdl-config should take care about everything then automatically. Perhaps Timothy can enlighten us, since he wrote the Makefile extensions for the Mac.
Bjarni
Member
*
Gender: Male
Posts: 15
Re: Compiling 0.99.12 - howto
sdl-config works as it is now, but Claire wants to be able to use the frameworks instead of the unix style libs. The SDL framework lacks sdl-config. The only reason I can see for doing that would be for distribution reasons. However I think that's a concern for Timothy, not Claire Wink
claire
Member
*
*
Gender: Female
Posts: 299
Stranger in an even stranger land
clair_rand
Re: Compiling 0.99.12 - howto
the failure to find main() when linking vs the frameworks was the reason I went elsewhere and ended up with the unix style libraries.

I think you need them installed to compile, but not to play, since this gives you the source for the main() routine which you can then link against.

I've not yet tried getting things to work compiling vs the frameworks... I shall see what I can do..
Apple Macintosh  Using PAK 128
claire
Member
*
*
Gender: Female
Posts: 299
Stranger in an even stranger land
clair_rand
Re: Compiling 0.99.12 - howto
well the modifications suggested by prissi will work, but require the person building the game to download & compile the SDL libraries, this is not exactly *hard* but introduces a dependency into the binary program, making distributing the result somewhat hard.

I'd be temped to use the system Timothy used to compile, working against the frameworks by default.. but include the code required to use the linux style libraries, with as has been suggested a switch in the makefile.

Either way I think to actually get the build to work will require the unix libs, to provide the main() source file, in objective-c in order to allow SDL to start on the mac. this file is contained within the unix libs but the frameworks appear not to include them.

I think this is down to using the frameworks is aimed at programs developed via the xcode environment, the unix style libs are better aimed at projects such as this one. The problem being its harder to include the required libraries.

An alternative is to compile the SDL libraries staticly into the project, the binary gets bigger but all these problems vanish, and you are back to a single binary...
Apple Macintosh  Using PAK 128
prissi
Member
*
*
*
*
*
*
*
*
Gender: Male
Posts: 5135
Re: Compiling 0.99.12 - howto
Probably, given the problem with Mac for end-users, static is not the worsest idea. (But then allegro might be better?)
Bjarni
Member
*
Gender: Male
Posts: 15
Re: Compiling 0.99.12 - howto
I see 4 possible binaries:
1: dynamically linked against UNIX style libs (using sdl-config). This will demand that the user installs SDL in UNIX style. Most users don't want to do that.
2: dynamically linked against UNIX style libs and make the binary look for them in the current dir. This will allow the actual lib files to be distributed with the game and placed next to the binary (no need to install the libs). However this will leave library files in the game dir and you will have to consider what libraries the libs are dynamically linking against.
3: dynamically linked against frameworks. This will demand the frameworks to be present at runtime, but it's possible to download them as dmg files (you will need sdl and sdl-mixer, so 2 dmgs) and they are doubleclick to install stuff... most people can figure out how to install those.
4: statically linked against UNIX style libs. This will create a bit larger binaries, but then you will have to consider lisence stuff. This shouldn't be an issue as long as you always distribute the source you compiled against. Basically you have to give the user the ability to run your game/app and link it against some other version of the libraries if they like.

I say #4 is far the easiest one for the end user to use. #2 and #3 are ok as well, while #1 is a normal user killer.
#4 is ... interesting .. if you plan to make a universal binary, but not impossible to make. However I think this issue is minor compared to fixing the SimuTrans source code to allow big endian.

I use static linking for OpenTTD and it works rather nicely.
kierongreen
Member
*
*
*
Gender: Male
Posts: 1538
kierongreen@msn.com
Re: Compiling 0.99.12 - howto
Quote
4: statically linked against UNIX style libs. This will create a bit larger binaries, but then you will have to consider lisence stuff. This shouldn't be an issue as long as you always distribute the source you compiled against. Basically you have to give the user the ability to run your game/app and link it against some other version of the libraries if they like.
Now that the sourcecode is publicly available this isn't an issue. The libraries in question are supplied under the lGPL license - the sourcecode doesn't have to be supplied at the same time as a binary that is statically linked to a library, providing that it is freely available under a GPL compatible license (which it is).
claire
Member
*
*
Gender: Female
Posts: 299
Stranger in an even stranger land
clair_rand
Re: Compiling 0.99.12 - howto
given it may take a few simple lines in the makefile to control this.. I'd be very tempted to leave the makefile with a few options in it, controlled via a switch in the config.default file. which naturally is basically ignored by everything else, then everyone can get the version that best suits them. now we have the source being available its basically a case for operating systems not directly supported, i.e. no binary available for download its a build your own party :-)
Apple Macintosh  Using PAK 128
The International Simutrans Forum > Resources & Development > Source code, Patches, and Nightly Builds > Compiling Simutrans > Topic: MAC - Compiling 0.99.12 - howto