mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-18 19:02:53 +09:00
89 lines
2.6 KiB
Python
89 lines
2.6 KiB
Python
# -------------------------------------------------------------------------- #
|
|
# Copyright 2002-2009, Distributed Systems Architecture Group, Universidad #
|
|
# Complutense de Madrid (dsa-research.org) #
|
|
# #
|
|
# 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. #
|
|
#--------------------------------------------------------------------------- #
|
|
|
|
import os
|
|
import sys
|
|
import shutil
|
|
sys.path.append("../../../share/scons")
|
|
from lex_bison import *
|
|
|
|
# This is the absolute path where the project is located
|
|
cwd="../../../"
|
|
|
|
# Environment that will be applied to each scons child
|
|
main_env=Environment()
|
|
main_env['ENV']['PATH']=os.environ['PATH']
|
|
|
|
# Add builders for flex and bison
|
|
add_lex(main_env)
|
|
add_bison(main_env)
|
|
|
|
# Include dirs
|
|
main_env.Append(CPPPATH=[
|
|
cwd + '/include',
|
|
'/usr/include/cppunit/'
|
|
])
|
|
|
|
# Library dirs
|
|
main_env.Append(LIBPATH=[
|
|
cwd + '/src/common',
|
|
cwd + '/src/template',
|
|
cwd + '/src/mad',
|
|
cwd + '/src/nebula',
|
|
cwd + '/src/authm',
|
|
cwd + '/src/sql',
|
|
cwd + '/src/log',
|
|
])
|
|
|
|
main_env.Append(LIBS=[
|
|
'nebula_template',
|
|
'nebula_common',
|
|
'nebula_core',
|
|
'nebula_mad',
|
|
'nebula_authm',
|
|
'nebula_sql',
|
|
'nebula_log',
|
|
'cppunit',
|
|
'dl',
|
|
'pthread',
|
|
'ssl'
|
|
])
|
|
|
|
# Compile flags
|
|
main_env.Append(CPPFLAGS=[
|
|
"-g",
|
|
"-Wall"
|
|
])
|
|
|
|
# MYSQL
|
|
main_env.Append(LIBPATH=["/usr/lib/mysql"])
|
|
main_env.Append(CPPPATH=["/usr/include/mysql"])
|
|
|
|
sqlite=ARGUMENTS.get('sqlite', 'yes')
|
|
if sqlite=='yes':
|
|
main_env.Append(CPPFLAGS=["-DSQLITE_DB"])
|
|
main_env.Append(LIBS=[ 'sqlite3', ])
|
|
|
|
# MySQL
|
|
mysql=ARGUMENTS.get('mysql', 'no')
|
|
if mysql=='yes':
|
|
main_env.Append(CPPFLAGS=["-DMYSQL_DB"])
|
|
main_env.Append(LIBS=[ 'mysqlclient', ])
|
|
|
|
main_env.Program('test','AuthManagerTest.cc')
|
|
#
|