Skip to content

Instantly share code, notes, and snippets.

@rchatsiri
Created October 25, 2011 16:06
Show Gist options
  • Save rchatsiri/1313276 to your computer and use it in GitHub Desktop.
Save rchatsiri/1313276 to your computer and use it in GitHub Desktop.
SConstruct for scons
#clam av library path
CLAMAV_LIBPATH = ['/home/chatsiri/clamav/clamav-devel/libclamav/',
'/home/chatsiri/Download2/boost/boost_1_43_0/stage/lib/',
'/home/chatsiri/Download2/boost/boost_1_43_0/bin.v2/libs/log/build/gcc-4.4.3/debug/link-static/runtime-link-static/']
#include c++ header
INCLUDE_CPPPATH = ['/usr/include/c++/4.5.2/',
'/home/chatsiri/Download2/boost/boost_1_43_0/',
'/home/chatsiri/workspace/clamav_cpp/clamavservices/',
'/home/chatsiri/workspace/clamav_cpp/clamavlogger/',
'/home/chatsiri/Download2/boost/boost_1_43_0/boost-log-1.0/',
'/home/chatsiri/clamav/clamav-devel/libclamav/',
'/home/chatsiri/clamav/clamav-devel/shared/']
#libclamav
CLAMAV_USED_LIBS = ['libclamav','libboost_thread','libboost_regex','libboost_log','libboost_log_setup','libboost_log','boost_system','boost_filesystem']
#main source files.
SOURCES_FILES = ['clamav_optm.cpp']
#set environment
env = Environment()
#add lib,lib path, include path
env.Append(CCFLAGS = ['-g'])
env.Append(CPPPATH = INCLUDE_CPPPATH)
env.Append(LIBPATH = CLAMAV_LIBPATH)
env.Append(LIBS = CLAMAV_USED_LIBS)
object_list = env.Object(source = SOURCES_FILES)
env.Program(target='clamav_optm',source = object_list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment