[DEV] add ptherd for Windows cross compile
This commit is contained in:
parent
13e6d98ac4
commit
e148a7e204
43
lutin/z_system/lutinSystem_Windows_pthread.py
Normal file
43
lutin/z_system/lutinSystem_Windows_pthread.py
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##
|
||||||
|
## @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
|
||||||
|
from lutin import env
|
||||||
|
import os
|
||||||
|
|
||||||
|
class System(system.System):
|
||||||
|
def __init__(self, target):
|
||||||
|
system.System.__init__(self)
|
||||||
|
# create some HELP:
|
||||||
|
self.set_help("pthread : Generic multithreading system\n Can be install with the package:\n - pthread-dev")
|
||||||
|
# check if the library exist:
|
||||||
|
if not os.path.isfile("/usr/" + target.base_path + "/include/pthread.h"):
|
||||||
|
# we did not find the library reqiested (just return) (automaticly set at false)
|
||||||
|
return;
|
||||||
|
self.set_valid(True)
|
||||||
|
# todo : create a searcher of the presence of the library:
|
||||||
|
self.add_flag("link-lib", "pthread")
|
||||||
|
self.add_depend([
|
||||||
|
'c'
|
||||||
|
])
|
||||||
|
if env.get_isolate_system() == True:
|
||||||
|
self.add_header_file([
|
||||||
|
"/usr/" + target.base_path + "/include/sched.h",
|
||||||
|
"/usr/" + target.base_path + "/include/pthread_compat.h",
|
||||||
|
"/usr/" + target.base_path + "/include/pthread.h",
|
||||||
|
"/usr/" + target.base_path + "/include/pthread_signal.h",
|
||||||
|
"/usr/" + target.base_path + "/include/pthread_time.h",
|
||||||
|
"/usr/" + target.base_path + "/include/pthread_unistd.h"
|
||||||
|
],
|
||||||
|
clip_path="/usr/" + target.base_path + "/include/")
|
||||||
|
|
||||||
|
|
@ -43,10 +43,14 @@ class Target(target.Target):
|
|||||||
if self.config["bus-size"] == "64":
|
if self.config["bus-size"] == "64":
|
||||||
# 64 bits
|
# 64 bits
|
||||||
self.set_cross_base("x86_64-w64-mingw32-")
|
self.set_cross_base("x86_64-w64-mingw32-")
|
||||||
|
self.base_path = "x86_64-w64-mingw32"
|
||||||
else:
|
else:
|
||||||
# 32 bits
|
# 32 bits
|
||||||
self.set_cross_base("i686-w64-mingw32-")
|
self.set_cross_base("i686-w64-mingw32-")
|
||||||
|
self.base_path = "i686-w64-mingw32"
|
||||||
|
self.add_flag("c", [
|
||||||
|
"-DWIN32=1"
|
||||||
|
])
|
||||||
self.pkg_path_data = "data"
|
self.pkg_path_data = "data"
|
||||||
self.pkg_path_bin = ""
|
self.pkg_path_bin = ""
|
||||||
self.pkg_path_lib = "lib"
|
self.pkg_path_lib = "lib"
|
||||||
|
Loading…
Reference in New Issue
Block a user