
import os
import sys
import eol_scons

tools = ['sqlitedb','doxygen','prefixoptions']
env = Environment(tools = ['default'] + tools)
platform = env['PLATFORM']
thisdir = env.Dir('.').srcnode().abspath

# define the tool
def spatialdb(env):
    env.AppendUnique(CPPPATH   =[thisdir,])
    env.AppendLibrary('spatialdb')
    env.AppendLibrary('geos')
    env.AppendLibrary('geos_c')
    env.AppendLibrary('proj')
    if (platform != 'posix'):
        env.AppendLibrary('iconv')
    env.Replace(CCFLAGS=['-g','-O2'])
    env.Require(tools)

Export('spatialdb')

# build the SpatialDB library
libsources = Split("""
SpatiaLiteDB.cpp
""")

headers = Split("""
SpatiaLiteDB.h
""")

libspatialdb = env.Library('spatialdb', libsources)
env.Default(libspatialdb)

html = env.Apidocs(libsources + headers,  DOXYFILE_DICT={'PROJECT_NAME':'SpatialDB', 'PROJECT_NUMBER':'1.0'})




import os
import sys
import eol_scons

tools = ['sqlitedb','doxygen','prefixoptions']
env = Environment(tools = ['default'] + tools)
platform = env['PLATFORM']
thisdir = env.Dir('.').srcnode().abspath

# define the tool
def spatialdb(env):
    env.AppendUnique(CPPPATH   =[thisdir,])
    env.AppendLibrary('spatialdb')
    env.AppendLibrary('geos')
    env.AppendLibrary('geos_c')
    env.AppendLibrary('proj')
    if (platform != 'posix'):
        env.AppendLibrary('iconv')
    env.Require(tools)

Export('spatialdb')

# build the SpatialDB library
libsources = Split("""
SpatiaLiteDB.cpp
""")

headers = Split("""
SpatiaLiteDB.h
""")

libspatialdb = env.Library('spatialdb', libsources)
env.Default(libspatialdb)

html = env.Apidocs(libsources + headers,  DOXYFILE_DICT={'PROJECT_NAME':'SpatialDB', 'PROJECT_NUMBER':'1.0'})



Use GLOBAL_TOOLs rather than Export/Import for project wide configuration.
Use GLOBAL_TOOLs rather than Export/Import for project wide configuration.


  
  import os
  import sys
  import eol_scons
  
  tools = ['sqlitedb','doxygen','prefixoptions']
  env = Environment(tools = ['default'] + tools)
  platform = env['PLATFORM']
  thisdir = env.Dir('.').srcnode().abspath
  
  # define the tool
  def spatialdb(env):
      env.AppendUnique(CPPPATH   =[thisdir,])
      env.AppendLibrary('spatialdb')
      env.AppendLibrary('geos')
      env.AppendLibrary('geos_c')
      env.AppendLibrary('proj')
      if (platform != 'posix'):
          env.AppendLibrary('iconv')
-     env.Replace(CCFLAGS=['-g','-O2'])
      env.Require(tools)
  
  Export('spatialdb')
  
  # build the SpatialDB library
  libsources = Split("""
  SpatiaLiteDB.cpp
  """)
  
  headers = Split("""
  SpatiaLiteDB.h
  """)
  
  libspatialdb = env.Library('spatialdb', libsources)
  env.Default(libspatialdb)
  
  html = env.Apidocs(libsources + headers,  DOXYFILE_DICT={'PROJECT_NAME':'SpatialDB', 'PROJECT_NUMBER':'1.0'})
  
  
  
Use GLOBAL_TOOLs rather than Export/Import for project wide configuration.
## Code Before:

import os
import sys
import eol_scons

tools = ['sqlitedb','doxygen','prefixoptions']
env = Environment(tools = ['default'] + tools)
platform = env['PLATFORM']
thisdir = env.Dir('.').srcnode().abspath

# define the tool
def spatialdb(env):
    env.AppendUnique(CPPPATH   =[thisdir,])
    env.AppendLibrary('spatialdb')
    env.AppendLibrary('geos')
    env.AppendLibrary('geos_c')
    env.AppendLibrary('proj')
    if (platform != 'posix'):
        env.AppendLibrary('iconv')
    env.Replace(CCFLAGS=['-g','-O2'])
    env.Require(tools)

Export('spatialdb')

# build the SpatialDB library
libsources = Split("""
SpatiaLiteDB.cpp
""")

headers = Split("""
SpatiaLiteDB.h
""")

libspatialdb = env.Library('spatialdb', libsources)
env.Default(libspatialdb)

html = env.Apidocs(libsources + headers,  DOXYFILE_DICT={'PROJECT_NAME':'SpatialDB', 'PROJECT_NUMBER':'1.0'})



## Instruction:
Use GLOBAL_TOOLs rather than Export/Import for project wide configuration.
## Code After:

import os
import sys
import eol_scons

tools = ['sqlitedb','doxygen','prefixoptions']
env = Environment(tools = ['default'] + tools)
platform = env['PLATFORM']
thisdir = env.Dir('.').srcnode().abspath

# define the tool
def spatialdb(env):
    env.AppendUnique(CPPPATH   =[thisdir,])
    env.AppendLibrary('spatialdb')
    env.AppendLibrary('geos')
    env.AppendLibrary('geos_c')
    env.AppendLibrary('proj')
    if (platform != 'posix'):
        env.AppendLibrary('iconv')
    env.Require(tools)

Export('spatialdb')

# build the SpatialDB library
libsources = Split("""
SpatiaLiteDB.cpp
""")

headers = Split("""
SpatiaLiteDB.h
""")

libspatialdb = env.Library('spatialdb', libsources)
env.Default(libspatialdb)

html = env.Apidocs(libsources + headers,  DOXYFILE_DICT={'PROJECT_NAME':'SpatialDB', 'PROJECT_NUMBER':'1.0'})


