Permalink
Browse files

Compiled freelan

  • Loading branch information...
1 parent 60831cf commit 9e31048ad177367814f0df1ccef1f64c2d146376 @ereOn ereOn committed Mar 31, 2014
File renamed without changes.
View
@@ -37,12 +37,12 @@ for x in Glob('libs/*'):
apps = []
-for x in []:
-#for x in Glob('apps/*'):
+for x in Glob('apps/*'):
sconscript_path = x.File('SConscript')
if sconscript_path.exists():
- apps.extend(SConscript(sconscript_path, exports='env'))
+ name = os.path.basename(str(x))
+ apps.extend(SConscript(sconscript_path, exports='env dirs name'))
samples = []
@@ -1,2 +0,0 @@
-.gitattributes export-ignore
-.gitignore export-ignore
@@ -1,18 +0,0 @@
-.sconsign.dblite
-variables.cache
-*.pyc
-*.o
-*.os
-*.obj
-*.sobj
-bin/*
-build
-*.cfg
-
-# Microsoft Visual Studio (tm) files
-*.suo
-*.sdf
-*.opensdf
-*.vcxproj.user
-/build/
-/install/
@@ -1,124 +1,31 @@
-"""
-The main SConscript file.
-"""
-
-name = 'freelan'
-
-major = '1'
-minor = '2'
-libraries = []
-
-# You should not need to modify anything below this line
-
-Import('env')
-
-env = env.Clone()
-
import os
-import sys
-import datetime
-
-from freelan.buildtools import ProgramProject
-import freelan.file_tools as file_tools
-
-if sys.platform.startswith('win32') and env['CC'] != 'gcc':
- env['CXXFLAGS'].append('/DFREELAN_VERSION_MAJOR=%s' % major)
- env['CXXFLAGS'].append('/DFREELAN_VERSION_MINOR=%s' % minor)
- env['CXXFLAGS'].append(r"/DFREELAN_DATE=\"%s\"" % datetime.date.today().strftime('%a %d %b %Y'))
-else:
- env['CXXFLAGS'].append('-DFREELAN_VERSION_MAJOR=%s' % major)
- env['CXXFLAGS'].append('-DFREELAN_VERSION_MINOR=%s' % minor)
- env['CXXFLAGS'].append(r"-DFREELAN_DATE=\"%s\"" % datetime.date.today().strftime('%a %d %b %Y'))
-if sys.platform.startswith('win32'):
- libraries.append('freelan_static')
- libraries.append('asiotap_static')
- libraries.append('fscp_static')
- libraries.append('cryptoplus_static')
- libraries.append('kfather_static')
- libraries.append('iconvplus_static')
- libraries.append('iconv')
-elif sys.platform.startswith('linux2'):
- libraries.append('freelan')
- libraries.append('asiotap')
- libraries.append('fscp')
- libraries.append('cryptoplus')
- libraries.append('kfather')
- libraries.append('iconvplus')
-else:
- libraries.append('freelan_static')
- libraries.append('asiotap_static')
- libraries.append('fscp_static')
- libraries.append('cryptoplus_static')
- libraries.append('kfather_static')
- libraries.append('iconvplus_static')
- libraries.append('iconv')
- libraries.append('ldap')
- libraries.append('ssl')
- libraries.append('z')
-libraries.append('boost_system')
-libraries.append('boost_thread')
-libraries.append('boost_program_options')
-libraries.append('boost_filesystem')
-libraries.append('boost_date_time')
-libraries.append('crypto')
+Import('env dirs name')
+
+libraries = [
+ 'freelan',
+ 'asiotap',
+ 'fscp',
+ 'cryptoplus',
+ 'iconvplus',
+ 'kfather',
+ 'boost_system',
+ 'boost_thread',
+ 'boost_filesystem',
+ 'boost_date_time',
+ 'boost_program_options',
+ 'curl',
+ 'ssl',
+ 'crypto',
+ 'ldap',
+ 'z',
+]
-if sys.platform.startswith('win32'):
-
- if env['CC'] == 'gcc':
- libraries.append('curl')
- libraries.append('ssl')
- libraries.append('crypto')
- env['CXXFLAGS'].append('-DBOOST_THREAD_USE_LIB')
- env['CXXFLAGS'].append('-DBOOST_USE_WINDOWS_H')
- env['CXXFLAGS'].append('-D_WIN32_WINNT=0x0501')
- env['CXXFLAGS'].append('-D_WIN32_IE=0x0500')
- env['CXXFLAGS'].append('-DUNICODE')
- else:
- libraries.remove('libcurl_a')
- libraries.remove('ssl')
- libraries.remove('crypto')
- libraries.append('libeay32')
- libraries.append('advapi32')
- libraries.append('shell32')
-
- env['CXXFLAGS'].append('/DBOOST_THREAD_USE_LIB')
- env['CXXFLAGS'].append('/DBOOST_USE_WINDOWS_H')
- env['CXXFLAGS'].append('/D_WIN32_WINNT=0x0501')
- env['CXXFLAGS'].append('/D_WIN32_IE=0x0500')
- env['CXXFLAGS'].append('/DUNICODE')
-
- libraries.append('ws2_32')
- libraries.append('gdi32')
- libraries.append('iphlpapi')
-else:
- libraries.append('pthread')
- libraries.append('curl')
- libraries.append('ssl')
- libraries.append('crypto')
-
-common_source_files = Glob('src/common/*.cpp')
-env.VariantDir('build/service', 'src')
-env.VariantDir('build/daemon', 'src')
-
-source_files = Glob('src/*.cpp')
-
-if sys.platform.startswith('win32'):
- source_files = source_files + Glob('src/win32/*.cpp')
-else:
- source_files = source_files + Glob('src/posix/*.cpp')
-
-project = ProgramProject(Dir('.'), name, major, minor, libraries, source_files = source_files)
-
-build = env.FreelanProject(project)
-install = env.FreelanProjectInstall(project)
-indent = env.FreelanProjectIndent(project)
+env = env.Clone()
+env.Append(LIBS=libraries)
-targets = {
- 'build': build,
- 'install': install,
- 'indent': indent,
-}
+sources = list(set(env.RGlob('src', '*.cpp')) - set(env.RGlob(os.path.join('src', 'windows'), '*.cpp')))
+app = env.Program(target=os.path.join(str(dirs['bin']), name), source=sources)
-Return('targets')
+Return('app')
@@ -1,14 +0,0 @@
-"""The SConstruct file"""
-
-import os
-
-from freelan.buildtools import Environment
-
-env = Environment(ENV=os.environ.copy(), ARGUMENTS=ARGUMENTS)
-
-targets = SConscript('SConscript', variant_dir=env.get_variant_dir(Dir('.')), exports='env')
-
-for name, target in targets.items():
- env.Alias(name, target)
-
-env.Default(targets['build'])
Oops, something went wrong.

0 comments on commit 9e31048

Please sign in to comment.