SConscript.curl 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # -*- mode: python -*-
  2. # DOOM build script
  3. # TTimo <ttimo@idsoftware.com>
  4. # http://scons.sourceforge.net
  5. import os
  6. import scons_utils
  7. Import( 'GLOBALS' )
  8. Import( GLOBALS )
  9. class idBuildCurl( scons_utils.idSetupBase ):
  10. def Compile( self, target = None, source = None, env = None ):
  11. self.TrySimpleCommand( 'cd curl ; make clean' )
  12. cmd = 'cd curl ; CC=\'' + env['CC'] + '\' ./configure --enable-shared=no --enable-static=yes --enable-http --enable-ftp --disable-gopher --enable-file --disable-ldap --disable-dict --disable-telnet --disable-manual --enable-libgcc --disable-ipv6 --without-ssl '
  13. if ( self.debug ):
  14. cmd += '--enable-debug'
  15. else:
  16. cmd += '--disable-debug'
  17. os.system( cmd )
  18. os.system( 'cd curl ; make' )
  19. if ( self.debug ):
  20. os.system( 'cd curl ; mv ./lib/.libs/libcurl.a ./lib/.libs/libcurl-debug.a' )
  21. else:
  22. os.system( 'cd curl ; mv ./lib/.libs/libcurl.a ./lib/.libs/libcurl-release.a' )
  23. return 0
  24. build = idBuildCurl()
  25. if ( local_curl == 1 ):
  26. build.debug = 1
  27. target_name = '#curl/lib/.libs/libcurl-debug.a'
  28. else:
  29. build.debug = 0
  30. target_name = '#curl/lib/.libs/libcurl-release.a'
  31. g_env.Command( target_name, None, Action( build.Compile ) )
  32. curl_libs = [ target_name, '/usr/lib/libz.a' ]
  33. Return( 'curl_libs' )