It works... All the static entries had to be determined dynamically.... well: maybe...
[supertux.git] / SConstruct
1 #
2 # A simple SConstruct file.
3 # See http://www.scons.org/ for more information about what SCons is and how it
4 # may help you... :-)
5 # I've never done anything with SCons before. Quite obviously this script is in
6 # a non-working state!! Maybe someone with more knowledge of the materia can
7 # take over....
8 #                                              - Benjamin P. 'litespeed' Jung -
9 #
10
11 # TODO: such static entries are obviously not what we want.
12 # Using e.g. 'sdl-config' to obtain parameters would be muuuuuch
13 # better.
14
15
16 DATA_PREFIX = '\\\"/usr/local/share/supertux\\\"'
17 LOCALEDIR = '\\\"/usr/local/share/locale\\\"'
18
19 CCFLAGS = [
20   '-O2',
21   '-DDATA_PREFIX=' + DATA_PREFIX,
22   '-DLOCALEDIR=' + LOCALEDIR
23 ]
24
25 CPPPATH = ['/usr/include/SDL', '/usr/include/X11', 'src', 'lib', 'intl', '.']
26
27 LIBPATH = [
28   'lib',
29   '/lib',
30   '/usr/lib',
31   '/usr/lib/X11',
32   '/usr/local/lib'
33 ]
34
35 LIBS = [
36   'supertux',
37   'SDL',
38   'SDL_gfx',
39   'SDL_image',
40   'SDL_mixer',
41   'SDL_sound',
42   'pthread',
43   'm',
44   'dl',
45   'asound',
46   'GL',
47   'GLU'
48 ]
49   
50
51 libsupertux_src = [
52   'lib/app/globals.cpp',
53   'lib/app/setup.cpp',
54   'lib/audio/musicref.cpp',
55   'lib/audio/sound_manager.cpp',
56   'lib/gui/button.cpp',
57   'lib/gui/menu.cpp',
58   'lib/gui/mousecursor.cpp',
59   'lib/math/physic.cpp',
60   'lib/math/vector.cpp',
61   'lib/special/game_object.cpp',
62   'lib/special/moving_object.cpp',
63   'lib/special/sprite.cpp',
64   'lib/special/sprite_manager.cpp',
65   'lib/special/timer.cpp',
66   'lib/special/frame_rate.cpp',
67   'lib/utils/configfile.cpp',
68   'lib/utils/lispreader.cpp',
69   'lib/utils/lispwriter.cpp',
70   'lib/video/drawing_context.cpp',
71   'lib/video/font.cpp',
72   'lib/video/screen.cpp',
73   'lib/video/surface.cpp'
74 ]
75
76 supertux_src = [
77   'src/background.cpp',
78   'src/badguy.cpp',
79   'src/badguy_specs.cpp',
80   'src/bitmask.cpp',
81   'src/camera.cpp',
82   'src/collision.cpp',
83   'src/door.cpp',
84   'src/gameloop.cpp',
85   'src/gameobjs.cpp',
86   'src/high_scores.cpp',
87   'src/interactive_object.cpp',
88   'src/intro.cpp',
89   'src/level.cpp',
90   'src/level_subset.cpp',
91   'src/leveleditor.cpp',
92   'src/misc.cpp',
93   'src/particlesystem.cpp',
94   'src/player.cpp',
95   'src/resources.cpp',
96   'src/scene.cpp',
97   'src/sector.cpp',
98   'src/special.cpp',
99   'src/statistics.cpp',
100   'src/supertux.cpp',
101   'src/tile.cpp',
102   'src/tile_manager.cpp',
103   'src/tilemap.cpp',
104   'src/title.cpp',
105   'src/worldmap.cpp'
106 ]
107                         
108
109 StaticLibrary(
110   target = 'lib/supertux',
111   source = libsupertux_src,
112   CPPPATH = CPPPATH,
113   CCFLAGS = CCFLAGS
114 )
115
116 Program(
117   target = 'src/supertux',
118   source = supertux_src,
119   CPPPATH = CPPPATH,
120   CCFLAGS = CCFLAGS,
121   LIBPATH = LIBPATH,
122   LIBS = LIBS
123 )