diff --git a/lutin/z_builder/lutinBuilder_binary.py b/lutin/z_builder/lutinBuilder_binary.py index 12e24bf..8a61438 100644 --- a/lutin/z_builder/lutinBuilder_binary.py +++ b/lutin/z_builder/lutinBuilder_binary.py @@ -122,6 +122,18 @@ def link(file, binary, target, depancy, flags, name, basic_path, static = False) cmd.append(target.global_flags_ld) except: pass + for view in ["local", "export"]: + if view not in flags: + continue + for type in ["link-lib"]: + if type in flags[view]: + cmd.append([("-l" + sss).replace("-l/", "/") for sss in flags[view][type] ]) + for type in ["link-lib"]: + if type in depancy.flags: + cmd.append([("-l" + sss).replace("-l/", "/") for sss in depancy.flags[type] ]) + for type in ["link-lib"]: + if type in target.global_flags: + cmd.append([("-l" + sss).replace("-l/", "/") for sss in target.global_flags[type] ]) cmd_line = tools.list_to_str(cmd) # check the dependency for this file : if depend.need_re_package(file_dst, file_src, True, file_cmd=file_cmd, cmd_line=cmd_line) == False \ diff --git a/lutin/z_builder/lutinBuilder_libraryDynamic.py b/lutin/z_builder/lutinBuilder_libraryDynamic.py index 8f40760..0ddb791 100644 --- a/lutin/z_builder/lutinBuilder_libraryDynamic.py +++ b/lutin/z_builder/lutinBuilder_libraryDynamic.py @@ -82,26 +82,19 @@ def link(file, binary, target, depancy, flags, name, basic_path, static=False): except: pass for view in ["local", "export"]: + if view not in flags: + continue for type in ["link", "link-dynamic"]: - try: + if type in flags[view]: cmd.append(flags[view][type]) - except: - pass for type in ["link", "link-dynamic"]: - try: + if type in depancy.flags: cmd.append(depancy.flags[type]) - except: - pass for type in ["link", "link-dynamic"]: - try: + if type in target.global_flags: cmd.append(target.global_flags[type]) - except: - pass - try: - # keep only compilated files ... + if 'src' in depancy.src: cmd.append(tools.filter_extention(depancy.src['src'], get_input_type())) - except: - pass try: cmd.append(list_static) except: @@ -118,6 +111,18 @@ def link(file, binary, target, depancy, flags, name, basic_path, static=False): cmd.append("-Wl,-R$ORIGIN/../lib/") except: pass + for view in ["local", "export"]: + if view not in flags: + continue + for type in ["link-lib"]: + if type in flags[view]: + cmd.append([("-l" + sss).replace("-l/", "/") for sss in flags[view][type] ]) + for type in ["link-lib"]: + if type in depancy.flags: + cmd.append([("-l" + sss).replace("-l/", "/") for sss in depancy.flags[type] ]) + for type in ["link-lib"]: + if type in target.global_flags: + cmd.append([("-l" + sss).replace("-l/", "/") for sss in target.global_flags[type] ]) cmdLine=tools.list_to_str(cmd) # check the dependency for this file : if depend.need_re_package(file_dst, file_src, True, file_cmd, cmdLine) == False \ diff --git a/lutin/z_system/lutinSystem_Android_SDK.py b/lutin/z_system/lutinSystem_Android_SDK.py index d78a4b9..47c89dd 100644 --- a/lutin/z_system/lutinSystem_Android_SDK.py +++ b/lutin/z_system/lutinSystem_Android_SDK.py @@ -23,8 +23,8 @@ class System(system.System): self.valid = True # todo : create a searcher of the presence of the library: self.add_export_sources(jar_file_path) - self.add_export_flag("link", "-ldl") - self.add_export_flag("link", "-llog") - self.add_export_flag("link", "-landroid") + self.add_export_flag("link-lib", "dl") + self.add_export_flag("link-lib", "log") + self.add_export_flag("link-lib", "android") diff --git a/lutin/z_system/lutinSystem_Android_m.py b/lutin/z_system/lutinSystem_Android_m.py new file mode 100644 index 0000000..f1ebe67 --- /dev/null +++ b/lutin/z_system/lutinSystem_Android_m.py @@ -0,0 +1,25 @@ +#!/usr/bin/python +## +## @author Edouard DUPIN +## +## @copyright 2012, Edouard DUPIN, all right reserved +## +## @license APACHE v2.0 (see license file) +## + +from lutin import debug +from lutin import system +from lutin import tools +import os + +class System(system.System): + def __init__(self, target): + system.System.__init__(self) + # create some HELP: + self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic" + # No check ==> on the basic std libs: + self.valid = True + # todo : create a searcher of the presence of the library: + self.add_export_flag("link-lib", "m") + + diff --git a/lutin/z_system/lutinSystem_IOs_m.py b/lutin/z_system/lutinSystem_IOs_m.py new file mode 100644 index 0000000..f1ebe67 --- /dev/null +++ b/lutin/z_system/lutinSystem_IOs_m.py @@ -0,0 +1,25 @@ +#!/usr/bin/python +## +## @author Edouard DUPIN +## +## @copyright 2012, Edouard DUPIN, all right reserved +## +## @license APACHE v2.0 (see license file) +## + +from lutin import debug +from lutin import system +from lutin import tools +import os + +class System(system.System): + def __init__(self, target): + system.System.__init__(self) + # create some HELP: + self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic" + # No check ==> on the basic std libs: + self.valid = True + # todo : create a searcher of the presence of the library: + self.add_export_flag("link-lib", "m") + + diff --git a/lutin/z_system/lutinSystem_Linux_alsa.py b/lutin/z_system/lutinSystem_Linux_alsa.py index 3b34e22..1e10201 100644 --- a/lutin/z_system/lutinSystem_Linux_alsa.py +++ b/lutin/z_system/lutinSystem_Linux_alsa.py @@ -24,6 +24,6 @@ class System(system.System): return; self.valid = True # todo : create a searcher of the presence of the library: - self.add_export_flag("link", "-lasound") + self.add_export_flag("link-lib", "asound") diff --git a/lutin/z_system/lutinSystem_Linux_boost.py b/lutin/z_system/lutinSystem_Linux_boost.py index a1c5709..fc35a21 100644 --- a/lutin/z_system/lutinSystem_Linux_boost.py +++ b/lutin/z_system/lutinSystem_Linux_boost.py @@ -23,10 +23,10 @@ class System(system.System): return; self.valid = True # todo : create a searcher of the presence of the library: - self.add_export_flag("link", [ - "-lboost_system", - "-lboost_thread", - "-lboost_chrono" + self.add_export_flag("link-lib", [ + "boost_system", + "boost_thread", + "boost_chrono" ]) diff --git a/lutin/z_system/lutinSystem_Linux_jack.py b/lutin/z_system/lutinSystem_Linux_jack.py index 032d40f..6c92131 100644 --- a/lutin/z_system/lutinSystem_Linux_jack.py +++ b/lutin/z_system/lutinSystem_Linux_jack.py @@ -23,6 +23,6 @@ class System(system.System): return; self.valid = True # todo : create a searcher of the presence of the library: - self.add_export_flag("link", "-ljack") + self.add_export_flag("link-lib", "jack") diff --git a/lutin/z_system/lutinSystem_Linux_m.py b/lutin/z_system/lutinSystem_Linux_m.py index 55e8c8c..f1ebe67 100644 --- a/lutin/z_system/lutinSystem_Linux_m.py +++ b/lutin/z_system/lutinSystem_Linux_m.py @@ -20,6 +20,6 @@ class System(system.System): # No check ==> on the basic std libs: self.valid = True # todo : create a searcher of the presence of the library: - self.add_export_flag("link", "-lm") + self.add_export_flag("link-lib", "m") diff --git a/lutin/z_system/lutinSystem_Linux_oss.py b/lutin/z_system/lutinSystem_Linux_oss.py index 0f947c0..f29e991 100644 --- a/lutin/z_system/lutinSystem_Linux_oss.py +++ b/lutin/z_system/lutinSystem_Linux_oss.py @@ -24,7 +24,7 @@ class System(system.System): return; self.valid = True # todo : create a searcher of the presence of the library: - self.add_export_flag("link", "-ljack") + self.add_export_flag("link-lib", "oss") """ diff --git a/lutin/z_system/lutinSystem_Linux_pulse.py b/lutin/z_system/lutinSystem_Linux_pulse.py index e5c2008..397c8c0 100644 --- a/lutin/z_system/lutinSystem_Linux_pulse.py +++ b/lutin/z_system/lutinSystem_Linux_pulse.py @@ -23,6 +23,6 @@ class System(system.System): return; self.valid = True # todo : create a searcher of the presence of the library: - self.add_export_flag("link", ["-lpulse-simple", "-lpulse"]) + self.add_export_flag("link-lib", ["pulse-simple", "pulse"]) diff --git a/lutin/z_system/lutinSystem_Linux_z.py b/lutin/z_system/lutinSystem_Linux_z.py index a2d3815..9f8e949 100644 --- a/lutin/z_system/lutinSystem_Linux_z.py +++ b/lutin/z_system/lutinSystem_Linux_z.py @@ -23,6 +23,6 @@ class System(system.System): return; self.valid = True # todo : create a searcher of the presence of the library: - self.add_export_flag("link", "-lz") + self.add_export_flag("link-lib", "z") diff --git a/lutin/z_system/lutinSystem_MacOs_m.py b/lutin/z_system/lutinSystem_MacOs_m.py new file mode 100644 index 0000000..f1ebe67 --- /dev/null +++ b/lutin/z_system/lutinSystem_MacOs_m.py @@ -0,0 +1,25 @@ +#!/usr/bin/python +## +## @author Edouard DUPIN +## +## @copyright 2012, Edouard DUPIN, all right reserved +## +## @license APACHE v2.0 (see license file) +## + +from lutin import debug +from lutin import system +from lutin import tools +import os + +class System(system.System): + def __init__(self, target): + system.System.__init__(self) + # create some HELP: + self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic" + # No check ==> on the basic std libs: + self.valid = True + # todo : create a searcher of the presence of the library: + self.add_export_flag("link-lib", "m") + + diff --git a/lutin/z_system/lutinSystem_Windows_ds.py b/lutin/z_system/lutinSystem_Windows_ds.py index df2eb82..937fd14 100644 --- a/lutin/z_system/lutinSystem_Windows_ds.py +++ b/lutin/z_system/lutinSystem_Windows_ds.py @@ -23,10 +23,10 @@ class System(system.System): return; self.valid = True # todo : create a searcher of the presence of the library: - self.add_export_flag("link",[ - "-ldsound", - "-lwinmm", - "-lole32" + self.add_export_flag("link-lib",[ + "dsound", + "winmm", + "ole32" ]) diff --git a/lutin/z_system/lutinSystem_Windows_m.py b/lutin/z_system/lutinSystem_Windows_m.py new file mode 100644 index 0000000..f1ebe67 --- /dev/null +++ b/lutin/z_system/lutinSystem_Windows_m.py @@ -0,0 +1,25 @@ +#!/usr/bin/python +## +## @author Edouard DUPIN +## +## @copyright 2012, Edouard DUPIN, all right reserved +## +## @license APACHE v2.0 (see license file) +## + +from lutin import debug +from lutin import system +from lutin import tools +import os + +class System(system.System): + def __init__(self, target): + system.System.__init__(self) + # create some HELP: + self.help="M : m library \n base of std libs (availlagle in GNU C lib and bionic" + # No check ==> on the basic std libs: + self.valid = True + # todo : create a searcher of the presence of the library: + self.add_export_flag("link-lib", "m") + +