d5c0032c65
not have a VM compiler in SCons files to match sources. This should fix compilation on these architectures (others than i386, amd64 and powerpc). Reported by: pointyhat
52 lines
1.8 KiB
Text
52 lines
1.8 KiB
Text
--- SConscript_quake3.orig Mon Jun 4 23:40:27 2007
|
|
+++ SConscript_quake3 Mon Jun 4 23:44:57 2007
|
|
@@ -1,4 +1,4 @@
|
|
-import os, string, sys
|
|
+import os, string, sys, fnmatch
|
|
|
|
Import('env')
|
|
|
|
@@ -169,25 +169,29 @@
|
|
quake3_env.Append(CCFLAGS='-DBOTLIB')
|
|
quake3_env.Append(CCFLAGS='-DC_ONLY')
|
|
|
|
-if env['arch'] == 'linux-i386':
|
|
- quake3_env.Append(LIBPATH='/usr/X11R6/lib')
|
|
+if sys.platform != 'win32':
|
|
quake3_env.Append(LIBS=['X11', 'Xext', 'Xxf86dga', 'Xxf86vm'])
|
|
- quake3_env.Append(LIBS=['dl', 'm'])
|
|
+ quake3_env.Append(LIBS=['m', 'vorbisfile'])
|
|
+
|
|
+ # The "dl" library is needed on Linux
|
|
+ if fnmatch.fnmatch(sys.platform, 'linux*'):
|
|
+ quake3_env.Append(LIBS=['dl'])
|
|
|
|
- if env['vm'] == 1:
|
|
- vm_src += ['engine/qcommon/vm_x86.c']
|
|
+ if env['vm'] != 0 and env['vm_archs'].count(env['arch']) > 0:
|
|
+ vm_src += ['engine/qcommon/vm_' + env['arch'] + '.c']
|
|
else:
|
|
- quake3_env.Append(CCFLAGS='-DDLL_ONLY')
|
|
-
|
|
- if env['smp'] == 1:
|
|
+ quake3_env.Append(CCFLAGS='-DNO_VM_COMPILED')
|
|
+
|
|
+ if env['smp'] != 0:
|
|
quake3_env.Append(CCFLAGS='-DSMP')
|
|
quake3_env.Append(LIBS=['pthread'])
|
|
|
|
if env['sound'] == 'oss':
|
|
- quake3_env.Program('quake3.x86', [quake3_src, unix_src, linux_src, vm_src, 'engine/unix/linux_snd.c'])
|
|
+ quake3_env.Program('quake3', [quake3_src, unix_src, linux_src, vm_src, 'engine/unix/linux_snd.c'])
|
|
else:
|
|
- quake3_env.Append(CCFLAGS='`sdl-config --cflags`')
|
|
- quake3_env.Append(LINKFLAGS='`sdl-config --libs`')
|
|
- quake3_env.Program('quake3.x86', [quake3_src, unix_src, linux_src, vm_src, 'engine/unix/sdl_snd.c'])
|
|
-
|
|
- quake3_env.Install('#', 'quake3.x86')
|
|
+ quake3_env.Append(CCFLAGS='-DUSE_SDL_SOUND')
|
|
+ quake3_env.ParseConfig('sdl-config --cflags')
|
|
+ quake3_env.ParseConfig('sdl-config --libs')
|
|
+ quake3_env.Program('quake3', [quake3_src, unix_src, linux_src, vm_src, 'engine/unix/sdl_snd.c'])
|
|
+
|
|
+ quake3_env.Install('#', 'quake3')
|