All pastes #909189 Raw Edit

Miscellany

public python v1 · immutable
·published 2008-02-18 23:34 UTC
rendered paste body
#GENERAL CONFIG #Compilercc                      = "gcc"#Flagsccflags                 = ['-g','-Wall']#Pathsp_install               = "/var/www/game/"p_local_lib             = "/usr/local/lib/"p_local_inc             = "/usr/local/include/"p_cs_inc                = "/usr/local/include/ClearSilver/"p_db_lib                = "/usr/local/BerkeleyDB.4.6/lib/"p_db_inc                = "/usr/local/BerkeleyDB.4.6/include/"#Libsl_cs                    = ['neo_cgi','neo_cs','neo_utl', 'z']l_fcgi                  = ['fcgi']l_db                    = ['db']l_om                    = ['om']#TEMPLATES templateBuildpath       = "./templates/"templateInstallpath     = p_install + "/templates/"templates               = ['index.cs','register.cs']for i in templates:    Execute(Copy(templateInstallpath + i, templateBuildpath + i))#HDF hdfBuildpath            = "./hdf/"hdfInstallpath          = p_install + "/hdf/"hdfFiles                = ['index.hdf','header.hdf','footer.hdf','register.hdf']for i in hdfFiles:    Execute(Copy(hdfInstallpath + i, hdfBuildpath + i))######################################################SHARED LIBRARY# Configuration:libpaths                = ['.', p_local_lib]includepaths            = ['.', p_local_inc, p_cs_inc]libs                    = l_fcgi + l_csinstallname             = 'notused'# Build:sharedlib = Environment()sharedlibp = sharedlib.SharedLibrary(target = 'om', source = ['omcgi.c'], LIBS=libs, LIBPATH=libpaths, CPPPATH=includepaths)# Install:sharedlib.Command(installname, sharedlibp,[    Copy((p_local_lib + "libom.so"), "$SOURCE"),    Delete("$SOURCE")])#######################################################INDEX# Configuration:libpaths                = [p_local_lib]includepaths            = ['.', p_local_inc, p_cs_inc]libs                    = l_fcgi + l_cs + l_omfiles                   = ['index.c']name                    = 'temp-index'installname             = 'index.cst'# Build:index = Environment(CC = cc, CCFLAGS = ccflags)indexp = index.Program(name, files, LIBS=libs, LIBPATH=libpaths, CPPPATH=includepaths)index.Depends(indexp, sharedlibp)# Install:index.Command(installname, indexp,[    Copy((p_install + "$TARGET"), "$SOURCE"),    ("chown -R www-data:www-data " + p_install)])#######################################################REGISTER# Configuration:libpaths                = [p_local_lib]includepaths            = ['.', p_local_inc, p_cs_inc]libs                    = l_fcgi + l_cs + l_omfiles                   = ['register.c']name                    = 'temp-register'installname             = 'register.cst'# Build:register = Environment(CC = cc, CCFLAGS = ccflags)registerp = register.Program(name, files, LIBS=libs, LIBPATH=libpaths, CPPPATH=includepaths)register.Depends(registerp, sharedlibp)# Install:register.Command(installname, registerp,[    Copy((p_install + "$TARGET"), "$SOURCE"),    ("chown -R www-data:www-data " + p_install)])#######################################################DB# Configuration:installpath             = "./"libpaths                = ['/usr/local/BerkeleyDB.4.6/lib/']includepaths            = ['.','/usr/local/BerkeleyDB.4.6/include/']#csFiles                 = ['main.cs']libs                    = ['db']files                   = ['db.c']name                    = 'db-temp'installname             = 'db'# Build:#db = Environment(CC = 'gcc', CCFLAGS = ccflags)#dbp = db.Program(name, files, LIBS=libs, LIBPATH=libpaths, CPPPATH=includepaths)# Install:#env.Install(installpath,name)#env.Alias('install', installpath)#for i in csFiles:#    env.Execute(Copy(installpath + i, i))#db.Command(installname, dbp,[#    Copy((installpath + "$TARGET"), "$SOURCE"),#    ("chown -R bjorn:bjorn " + installpath)])