forked from TTimo/GtkRadiant
/
SConscript.module
64 lines (55 loc) · 1.67 KB
/
SConscript.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# -*- mode: python -*-
# ZeroRadiant build scripts
# TTimo <ttimo@idsoftware.com>
# http://scons.sourceforge.net
import os
Import( [ 'utils', 'config', 'settings', 'project', 'shlib_objects' ] )
( libpath, libname ) = os.path.split( project )
libname = os.path.splitext( libname )[0]
env = Environment()
# useJPEG = False
# useGtk = False
# useZ = False
# usePNG = False
# if ( libname == 'image' ):
# useJPEG = True
# if ( libname == 'surface' ):
# useGtk = True
# if ( libname == 'surface_ufoai' ):
# useGtk = True
# if ( libname == 'surface_quake2' ):
# useGtk = True
# if ( libname == 'surface_heretic2' ):
# useGtk = True
# if ( libname == 'bkgrnd2d' ):
# useGtk = True
# if ( libname == 'gtkgensurf' ):
# useGtk = True
# if ( libname == 'bobtoolz' ):
# useGtk = True
# if ( libname == 'camera' ):
# useGtk = True
# if ( libname == 'prtview' ):
# useGtk = True
# if ( libname == 'spritemodel' ):
# useGtk = True
# if ( libname == 'model' ):
# useGtk = True
# if ( libname == 'textool' ):
# useGtk = True
# if ( libname == 'imagepng' ):
# usePNG = True
useJPEG = True
useGtk = True
useZ = True
usePNG = True
settings.SetupEnvironment( env, config['name'], useGtk = useGtk, useJPEG = useJPEG, useZ = useZ, usePNG = usePNG )
proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) )
# some filtering. may need to improve that
add_sources = []
( drop, files ) = proj.filterSource( r'.*l_net_wins\.c' )
if ( len( drop ) != 0 ):
add_sources.append( 'l_net_berkeley.c' )
module_base = env.SharedLibrary( os.path.join( 'modules', libname ), shlib_objects + [ os.path.join( libpath, i ) for i in files ] )
module = env.AddPostAction( module_base, utils.CheckUnresolved )
Return( 'module' )