diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..daef0736f09645cb1c8a134c3fb2e8178b9620c7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.os +build +.sconsign.dblite diff --git a/SConscript b/SConscript index 6d313e211d95ac4bd441d37bd5ae6be80ec8b9ba..c9c8cff0609af04313b5b401affd1a9aa418fc6b 100644 --- a/SConscript +++ b/SConscript @@ -8,7 +8,7 @@ Import('env') myenv=env.Clone() cpppath=''' - $SECURITY_TRANSFORMS_HOME/third_party/elfio-code + $PEASOUP_HOME/irdb-libs/third_party/elfio-code $PEASOUP_HOME/irdb-libs/libEXEIO/include $IRDB_SDK/include ''' @@ -19,11 +19,11 @@ files=Glob( Dir('.').srcnode().abspath+"/*.cpp") pgm="move_globals.so" -LIBPATH="$SECURITY_TRANSFORMS_HOME/lib" +LIBPATH="$PEASOUP_HOME/irdb-libs/lib" LIBS=Split("irdb-core irdb-cfg irdb-util irdb-transform irdb-deep StructDiv EXEIO ") myenv.Append(CPPPATH=Split(cpppath)) pgm=myenv.SharedLibrary(pgm, files, LIBPATH=LIBPATH, LIBS=LIBS) -install=myenv.Install("$SECURITY_TRANSFORMS_HOME/plugins_install/", pgm) +install=myenv.Install("$MG_HOME/plugins_install/", pgm) Default(install) Return('install') diff --git a/SConstruct b/SConstruct index c96332f0422ad5df0853931209219d9a2e20bc17..863481ad3159fe83dcd0e9347efcc643f8a1d84c 100644 --- a/SConstruct +++ b/SConstruct @@ -1,6 +1,65 @@ +# +# Copyright 2017-2019 University of Virginia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Scons is python based. We import OS to get at the environment. +# +import os + +# +# create a basic scons environment +# env=Environment() + +# +# Include environment variables. These lines throw semi-readable errors if the environment is not defined properly. +# +env.Replace(IRDB_SDK= os.environ['IRDB_SDK'] ) # IRDB_SDK and IRDB_LIB by convention to find headers and libraries. +env.Replace(PEASOUP_HOME= os.environ['PEASOUP_HOME'] ) # IRDB_SDK and IRDB_LIB by convention to find headers and libraries. +env.Replace(IRDB_LIBS= os.environ['IRDB_LIBS'] ) +env.Replace(MG_HOME= os.environ['MG_HOME'] ) + + +# +# Check for "debug=1" on the scons command line +# +env.Replace(debug=ARGUMENTS.get("debug",0)) # build in debug mode? + +# +# Required: need these flag to appropriately include/link IRDB files. +# +env.Append(CXXFLAGS=" -std=c++11 ") # enable c++11 +env.Append(LINKFLAGS=" -Wl,-unresolved-symbols=ignore-in-shared-libs ") # irdb libs may have symbols that resolve OK at runtime, but not linktime. + + +# if we are building in debug mode, use -g, else use -O +if int(env['debug']) == 1: + env.Append(CFLAGS= " -g ") + env.Append(CXXFLAGS= " -g ") + env.Append(LINKFLAGS= " -g ") + env.Append(SHLINKFLAGS=" -g ") +else: + env.Append(CFLAGS= " -O ") + env.Append(CXXFLAGS= " -O ") + env.Append(LINKFLAGS= " -O ") + env.Append(SHLINKFLAGS=" -O ") + + Export('env') -lib=SConscript("SConscript") +SConscript("SConscript", variant_dir='build') + diff --git a/plugins_install/libmove_globals.so b/plugins_install/libmove_globals.so new file mode 100755 index 0000000000000000000000000000000000000000..2e5ea87f0e94ae45016947fa8fe0e808858a933d Binary files /dev/null and b/plugins_install/libmove_globals.so differ diff --git a/set_env_vars b/set_env_vars new file mode 100644 index 0000000000000000000000000000000000000000..b579b5f02bd49186d5a55187cb5d62b87f567607 --- /dev/null +++ b/set_env_vars @@ -0,0 +1,7 @@ + + +# +# Tell pszr where to search for plugins +# +export MG_HOME=$PWD +export PSPATH=$PSPATH:$MG_HOME/plugins_install