249
|
1 |
diff -ur dangerdeep-0.2.0-orig/SConstruct dangerdeep-0.2.0/SConstruct
|
|
2 |
--- dangerdeep-0.2.0-orig/SConstruct 2006-10-13 01:44:44.000000000 +0700
|
|
3 |
+++ dangerdeep-0.2.0/SConstruct 2007-04-23 13:10:31.248136721 +0700
|
|
4 |
@@ -115,6 +115,58 @@
|
|
5 |
env.Append(LINKFLAGS = '--unresolved-symbols=ignore-all')
|
|
6 |
env.Append(LINKFLAGS = '-Xlinker --unresolved-symbols -Xlinker ignore-all')
|
|
7 |
|
|
8 |
+elif (sys.platform == 'sunos5'):
|
|
9 |
+ print "Compiling for Solaris Environment"
|
|
10 |
+ env = Environment(ENV = os.environ)
|
|
11 |
+ env.Replace(CC = os.environ['CC'])
|
|
12 |
+ env.Replace(CXX = os.environ['CXX'])
|
|
13 |
+ env.Replace(CCFLAGS = os.environ['CFLAGS'])
|
|
14 |
+ env.Replace(CXXFLAGS = os.environ['CXXFLAGS'])
|
|
15 |
+ env.Replace(LINKFLAGS = os.environ['LDFLAGS'])
|
|
16 |
+ env.Append(CPPPATH = ['/usr/include/SDL', '/usr/include/GL'])
|
|
17 |
+ libpath = ['/usr/X11R6/lib']
|
|
18 |
+ gllibs = ['GL', 'GLU']
|
|
19 |
+ sdllibs = ['SDL', 'SDL_image']
|
|
20 |
+ ccflags = '`sdl-config --cflags` -I/usr/X11/include'
|
|
21 |
+ env.Append(LINKFLAGS = '-L/usr/X11/lib')
|
|
22 |
+ mmxsupported = False
|
|
23 |
+ ssesupported = False
|
|
24 |
+ if (usex86sse == 0) and (mmxsupported and ssesupported):
|
|
25 |
+ usex86sse = 1
|
|
26 |
+ if usex86sse >= 1:
|
|
27 |
+ env.Append(CPPDEFINES = ['USE_SSE'])
|
|
28 |
+ osspecificsrc += ['water_sse.cpp']
|
|
29 |
+ if (usex86sse >= 3):
|
|
30 |
+ env.Append(CPPDEFINES = ['USE_SSE_INTRINSICS', 'USE_SSE_ALWAYS'])
|
|
31 |
+ env.Append(CCFLAGS = '-msse')
|
|
32 |
+ print 'Using x86 SSE/MMX optimizations with GCC intrinsics ALWAYS WITHOUT DETECTION!'
|
|
33 |
+ elif (usex86sse >= 2):
|
|
34 |
+ env.Append(CPPDEFINES = ['USE_SSE_INTRINSICS'])
|
|
35 |
+ env.Append(CCFLAGS = '-msse')
|
|
36 |
+ print 'Using x86 SSE/MMX optimizations with GCC intrinsics.'
|
|
37 |
+ else:
|
|
38 |
+ print 'Using x86 SSE/MMX optimizations.'
|
|
39 |
+ env.Append(CCFLAGS = ccflags)
|
|
40 |
+ datadir = '/usr/share/dangerdeep'
|
|
41 |
+ build_dir = 'sunos5'
|
|
42 |
+ # check for broken libGL, ignore undefined symbols then
|
|
43 |
+ if (os.system('grep glBindProgram /usr/include/GL/gl*.h > /dev/null') == 0):
|
|
44 |
+ gllibdirs = ['/usr/X11/lib/', '/usr/lib/']
|
|
45 |
+ gllibdir = ''
|
|
46 |
+ for i in gllibdirs:
|
|
47 |
+ if (os.system('test -f '+i+'libGL.so') == 0):
|
|
48 |
+ gllibdir = i
|
|
49 |
+ break
|
|
50 |
+ if (gllibdir == ''):
|
|
51 |
+ print 'ERROR: no libGL.so detected!'
|
|
52 |
+ else:
|
|
53 |
+ print 'Found GL library "'+gllibdir+'libGL.so"'
|
|
54 |
+ if (os.system('grep glBindProgram '+gllibdir+'libGL.so > /dev/null') != 0):
|
|
55 |
+ print 'GL headers declare glBindProgram, but libGL.so has no such symbol! Ignoring all undefined symbols...'
|
|
56 |
+ # I'm not sure which option will hopefully fix the problem... so i use both...
|
|
57 |
+ env.Append(LINKFLAGS = ' -z ignore')
|
|
58 |
+
|
|
59 |
+
|
|
60 |
else:
|
|
61 |
print "Compiling for Unix/Posix/Linux Environment"
|
|
62 |
env = Environment(ENV = os.environ)
|