revise build scripts
[platform/upstream/iotivity.git] / build_common / SConscript
index f56b166..3a3ac44 100644 (file)
@@ -128,8 +128,8 @@ if target_os in ['android', 'arduino']: # Android/Arduino always uses GNU compil
 else:
        env = Environment(variables = help_vars, tools = ['default', 'textfile'],
                        TARGET_ARCH = target_arch, TARGET_OS = target_os,
-                       PREFIX = GetOption('prefix'), INSTALL_ROOT = ARGUMENTS.get('INSTALL_ROOT', dir),
-                       LIB_INSTALL_DIR = ARGUMENTS.get('LIB_INSTALL_DIR', GetOption('prefix')+'/lib')
+                       PREFIX = GetOption('prefix'),
+                       LIB_INSTALL_DIR = ARGUMENTS.get('LIB_INSTALL_DIR', '/usr/lib')
                        )
 Help(help_vars.GenerateHelpText(env))
 
@@ -213,7 +213,7 @@ def __install(ienv, targets, name):
 def __installlib(ienv, targets, name):
        user_prefix = env.get('PREFIX')
        if user_prefix:
-               i_n = ienv.Install(env.get('INSTALL_ROOT') + env.get('LIB_INSTALL_DIR'), targets)
+               i_n = ienv.Install(env.get('LIB_INSTALL_DIR'), targets)
        else:
                i_n = ienv.Install(env.get('BUILD_DIR'), targets)
        ienv.Alias("install", i_n)
@@ -221,7 +221,7 @@ def __installlib(ienv, targets, name):
 def __installbin(ienv, targets, name):
        user_prefix = env.get('PREFIX')
        if user_prefix:
-               i_n = ienv.Install(env.get('INSTALL_ROOT') + user_prefix + '/bin', targets)
+               i_n = ienv.Install(user_prefix + '/bin', targets)
        else:
                i_n = ienv.Install(env.get('BUILD_DIR'), targets)
        ienv.Alias("install", i_n)
@@ -229,7 +229,7 @@ def __installbin(ienv, targets, name):
 def __installheader(ienv, targets, dir, name):
        user_prefix = env.get('PREFIX')
        if user_prefix:
-               i_n = ienv.Install(env.get('INSTALL_ROOT') + user_prefix + '/include/' + dir ,targets)
+               i_n = ienv.Install(user_prefix + '/include/' + dir, targets)
        else:
                i_n = ienv.Install(env.get('BUILD_DIR'), targets)
        ienv.Alias("install", i_n)
@@ -237,7 +237,7 @@ def __installheader(ienv, targets, dir, name):
 def __installpcfile(ienv, targets, name):
        user_prefix = env.get('PREFIX')
        if user_prefix:
-               i_n = ienv.Install(env.get('INSTALL_ROOT') + env.get('LIB_INSTALL_DIR') + '/pkgconfig', targets)
+               i_n = ienv.Install(env.get('LIB_INSTALL_DIR') + '/pkgconfig', targets)
        else:
                i_n = ienv.Install(env.get('BUILD_DIR'), targets)
        ienv.Alias("install", i_n)