Compare commits

...

6 Commits

5 changed files with 69 additions and 58 deletions

View File

@@ -14,24 +14,33 @@ addons:
packages:
- g++-4.9
- expect
- binutils-mingw-w64-i686
- binutils-mingw-w64-i686 # 32bit MinGW
- gcc-mingw-w64-i686
- g++-mingw-w64-i686
- binutils-mingw-w64-x86-64 # 64bit MinGW
- gcc-mingw-w64-x86-64
- g++-mingw-w64-x86-64
matrix:
include:
- os: linux
env: CONF=release BUILDER=gcc TARGET=Linux TAG=Linux
compiler: gcc
- os: linux
env: CONF=debug BUILDER=clang TARGET=Linux
compiler: clang
- os: linux
env: CONF=release BUILDER=gcc TARGET=Windows TAG=Mingw
compiler: gcc
- os: linux
env: CONF=release BUILDER=gcc TARGET=Android TAG=Android DISABLE_PACKAGE=-p
compiler: gcc
- os: osx
env: CONF=release BUILDER=clang TARGET=MacOs TAG=MacOs
compiler: clang
- os: osx
env: CONF=release BUILDER=clang TARGET=IOs TAG=IOs
compiler: clang
install:
- cd ..

View File

@@ -17,10 +17,12 @@ class System(system.System):
system.System.__init__(self)
# create some HELP:
self.help="SDK: Android SDK basic interface java\n"
# jar file:
jar_file_path=os.path.join(target.path_sdk, "platforms", "android-" + str(target.board_id), "android.jar")
# TODO : Check if the android sdk android.jar is present ...
self.valid = True
# todo : create a searcher of the presence of the library:
self.add_export_SRC(target.path_sdk + "/platforms/android-" + str(target.boardId) + "/android.jar")
self.add_export_SRC(jar_file_path)
self.add_export_flag_LD("-ldl")
self.add_export_flag_LD("-llog")
self.add_export_flag_LD("-landroid")

View File

@@ -91,14 +91,14 @@ class Target(target.Target):
self.board_id = int(os.getenv('PROJECT_NDK_BOARD_ID', "0"))
if self.board_id != 0:
# check if element existed :
if not os.path.isdir(self.path_ndk +"/platforms/android-" + str(self.board_id)):
if not os.path.isdir(self.path_sdk +"/platforms/android-" + str(self.board_id)):
debug.error("Specify PROJECT_NDK_BOARD_ID env variable and the BOARD_ID does not exit ... : " + str(self.board_id) + "==> auto-search")
self.board_id = 0
if self.board_id == 0:
debug.debug("Auto-search BOARD-ID")
for iii in reversed(range(0, 50)):
debug.debug("try: " + self.path_ndk +"/platforms/android-" + str(iii))
if os.path.isdir(self.path_ndk +"/platforms/android-" + str(iii)):
debug.debug("try: " + os.path.join(self.path_sdk, "platforms", "android-" + str(iii)))
if os.path.isdir(os.path.join(self.path_sdk, "platforms", "android-" + str(iii))):
debug.debug("Find BOARD-ID : " + str(iii))
self.board_id = iii
break;
@@ -107,11 +107,11 @@ class Target(target.Target):
self.global_flags_cc.append("-D__ANDROID_BOARD_ID__=" + str(self.board_id))
if arch == "armv5" or arch == "armv7":
self.global_include_cc.append("-I" + self.path_ndk +"/platforms/android-" + str(self.board_id) + "/arch-arm/usr/include/")
self.global_include_cc.append("-I" + os.path.join(self.path_ndk, "platforms", "android-" + str(self.board_id), "arch-arm", "usr", "include"))
elif arch == "mips":
self.global_include_cc.append("-I" + self.path_ndk +"/platforms/android-" + str(self.board_id) + "/arch-mips/usr/include/")
self.global_include_cc.append("-I" + os.path.join(self.path_ndk, "platforms", "android-" + str(self.board_id), "arch-mips", "usr", "include"))
elif arch == "x86":
self.global_include_cc.append("-I" + self.path_ndk +"/platforms/android-" + str(self.board_id) + "/arch-x86/usr/include/")
self.global_include_cc.append("-I" + os.path.join(self.path_ndk, "platforms", "android-" + str(self.board_id), "arch-x86", "usr", "include"))
if True:
if self.config["compilator"] == "clang":
@@ -119,64 +119,64 @@ class Target(target.Target):
debug.error("Clang work only with the board wersion >= 21 : android 5.x.x")
self.global_flags_cc.append("-D__STDCPP_LLVM__")
# llvm-libc++ : BSD | MIT
self.global_include_cc.append("-gcc-toolchain " + self.path_ndk +"/sources/android/support/include")
self.global_include_cc.append("-I" + self.path_ndk +"/sources/android/support/include")
self.global_include_cc.append("-I" + self.path_ndk +"/sources/cxx-stl/llvm-libc++/libcxx/include/")
self.global_include_cc.append("-gcc-toolchain " + os.path.join(self.path_ndk, "sources", "android", "support", "include"))
self.global_include_cc.append("-I" + os.path.join(self.path_ndk, "sources", "android", "support", "include"))
self.global_include_cc.append("-I" + os.path.join(self.path_ndk, "sources", "cxx-stl", "llvm-libc++", "libcxx", "include"))
if arch == "armv5":
stdCppBasePath = self.path_ndk +"/sources/cxx-stl/llvm-libc++/libcxx/libs/armeabi/"
self.global_include_cc.append("-I" + stdCppBasePath + "include/")
self.global_flags_ld.append( stdCppBasePath + "libc++_static.a")
stdCppBasePath = os.path.join(self.path_ndk, "sources", "cxx-stl", "llvm-libc++", "libcxx", "libs", "armeabi")
self.global_include_cc.append("-I" + os.path.join(stdCppBasePath, "include"))
self.global_flags_ld.append( os.path.join(stdCppBasePath, "libc++_static.a"))
elif arch == "armv7":
# The only one tested ... ==> but we have link error ...
self.global_flags_cc.append("-target armv7-none-linux-androideabi")
self.global_flags_cc.append("-march=armv7-a")
self.global_flags_cc.append("-mfpu=vfpv3-d16")
self.global_flags_cc.append("-mhard-float")
stdCppBasePath = self.path_ndk +"/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/"
self.global_flags_ld.append( stdCppBasePath + "thumb/libc++_static.a")
stdCppBasePath = os.path.join(self.path_ndk, "sources", "cxx-stl", "llvm-libc++", "libs", "armeabi-v7a")
self.global_flags_ld.append( os.path.join(stdCppBasePath, "thumb", "libc++_static.a"))
self.global_flags_ld.append("-target armv7-none-linux-androideabi")
self.global_flags_ld.append("-Wl,--fix-cortex-a8")
self.global_flags_ld.append("-Wl,--no-warn-mismatch")
self.global_flags_ld.append("-lm_hard")
elif arch == "mips":
stdCppBasePath = self.path_ndk +"/sources/cxx-stl/llvm-libc++/libcxx/libs/mips/"
self.global_include_cc.append("-I" + stdCppBasePath + "include/")
self.global_flags_ld.append( stdCppBasePath + "libc++_static.a")
stdCppBasePath = os.path.join(self.path_ndk, "sources", "cxx-stl", "llvm-libc++", "libcxx", "libs", "mips")
self.global_include_cc.append("-I" + os.path.join(stdCppBasePath + "include"))
self.global_flags_ld.append( os.path.join(stdCppBasePath + "libc++_static.a"))
elif arch == "x86":
stdCppBasePath = self.path_ndk +"/sources/cxx-stl/llvm-libc++/libcxx/libs/x86/"
self.global_include_cc.append("-I" + stdCppBasePath + "include/")
self.global_flags_ld.append( stdCppBasePath + "libc++_static.a")
stdCppBasePath = os.path.join(self.path_ndk, "sources", "cxx-stl", "llvm-libc++", "libcxx", "libs", "x86")
self.global_include_cc.append("-I" + os.path.join(stdCppBasePath, "include"))
self.global_flags_ld.append( os.path.join(stdCppBasePath, "libc++_static.a"))
else:
self.global_flags_cc.append("-D__STDCPP_GNU__")
# GPL v3 (+ exception link for gcc compilator)
self.global_include_cc.append("-I" + self.path_ndk +"/sources/cxx-stl/gnu-libstdc++/" + gccVersion + "/include/")
self.global_include_cc.append("-I" + self.path_ndk +"/sources/android/support/include/")
self.global_include_cc.append("-I" + os.path.join(self.path_ndk, "sources", "cxx-stl", "gnu-libstdc++", gccVersion, "include"))
self.global_include_cc.append("-I" + os.path.join(self.path_ndk, "sources", "android", "support", "include"))
if arch == "armv5":
stdCppBasePath = self.path_ndk +"/sources/cxx-stl/gnu-libstdc++/" + gccVersion + "/libs/armeabi/"
self.global_include_cc.append("-I" + stdCppBasePath + "include/")
self.global_flags_ld.append( stdCppBasePath + "thumb/libgnustl_static.a")
self.global_flags_ld.append( stdCppBasePath + "thumb/libsupc++.a")
stdCppBasePath = os.path.join(self.path_ndk, "sources", "cxx-stl", "gnu-libstdc++", gccVersion, "libs", "armeabi")
self.global_include_cc.append("-I" + os.path.join(stdCppBasePath, "include"))
self.global_flags_ld.append( os.path.join(stdCppBasePath, "thumb", "libgnustl_static.a"))
self.global_flags_ld.append( os.path.join(stdCppBasePath, "thumb", "libsupc++.a"))
elif arch == "armv7":
stdCppBasePath = self.path_ndk +"/sources/cxx-stl/gnu-libstdc++/" + gccVersion + "/libs/armeabi-v7a/"
self.global_include_cc.append("-I" + stdCppBasePath + "include/")
self.global_flags_ld.append( stdCppBasePath + "thumb/libgnustl_static.a")
self.global_flags_ld.append( stdCppBasePath + "thumb/libsupc++.a")
stdCppBasePath = os.path.join(self.path_ndk, "sources", "cxx-stl", "gnu-libstdc++", gccVersion, "libs", "armeabi-v7a")
self.global_include_cc.append("-I" + os.path.join(stdCppBasePath, "include"))
self.global_flags_ld.append( os.path.join(stdCppBasePath, "thumb", "libgnustl_static.a"))
self.global_flags_ld.append( os.path.join(stdCppBasePath, "thumb", "libsupc++.a"))
elif arch == "mips":
stdCppBasePath = self.path_ndk +"/sources/cxx-stl/gnu-libstdc++/" + gccVersion + "/libs/mips/"
self.global_include_cc.append("-I" + stdCppBasePath + "include/")
self.global_flags_ld.append( stdCppBasePath + "libgnustl_static.a")
self.global_flags_ld.append( stdCppBasePath + "libsupc++.a")
stdCppBasePath = os.path.join(self.path_ndk, "sources", "cxx-stl", "gnu-libstdc++", gccVersion, "libs", "mips")
self.global_include_cc.append("-I" + os.path.join(stdCppBasePath, "include/"))
self.global_flags_ld.append( os.path.join(stdCppBasePath, "libgnustl_static.a"))
self.global_flags_ld.append( os.path.join(stdCppBasePath, "libsupc++.a"))
elif arch == "x86":
stdCppBasePath = self.path_ndk +"/sources/cxx-stl/gnu-libstdc++/" + gccVersion + "/libs/x86/"
self.global_include_cc.append("-I" + stdCppBasePath + "include/")
self.global_flags_ld.append( stdCppBasePath + "libgnustl_static.a")
self.global_flags_ld.append( stdCppBasePath + "libsupc++.a")
stdCppBasePath = os.path.join(self.path_ndk, "sources", "cxx-stl", "gnu-libstdc++", gccVersion, "libs", "x86")
self.global_include_cc.append("-I" + os.path.join(stdCppBasePath, "include"))
self.global_flags_ld.append( os.path.join(stdCppBasePath, "libgnustl_static.a"))
self.global_flags_ld.append( os.path.join(stdCppBasePath, "libsupc++.a"))
else :
self.global_include_cc.append("-I" + self.path_ndk +"/sources/cxx-stl/system/include/")
self.global_include_cc.append("-I" + self.path_ndk +"/sources/cxx-stl/stlport/stlport/")
self.global_flags_ld.append(self.path_ndk +"/platforms/android-" + str(self.board_id) + "/arch-arm/usr/lib/libstdc++.a")
self.global_include_cc.append("-I" + os.path.join(self.path_ndk, "sources", "cxx-stl", "system", "include"))
self.global_include_cc.append("-I" + os.path.join(self.path_ndk, "sources", "cxx-stl", "stlport", "stlport"))
self.global_flags_ld.append(os.path.join(self.path_ndk, "platforms", "android-" + str(self.board_id), "arch-arm", "usr", "lib", "libstdc++.a"))
self.global_sysroot = "--sysroot=" + self.path_ndk +"/platforms/android-" + str(self.board_id) + "/arch-arm"
self.global_sysroot = "--sysroot=" + os.path.join(self.path_ndk, "platforms", "android-" + str(self.board_id), "arch-arm")
self.global_flags_cc.append("-D__ARM_ARCH_5__")
self.global_flags_cc.append("-D__ARM_ARCH_5T__")
@@ -224,6 +224,13 @@ class Target(target.Target):
return True
return False
def convert_name_application(self, pkg_name):
value = pkg_name.lower()
value = value.replace(' ', '')
value = value.replace('-', '')
value = value.replace('_', '')
return value
"""
def get_staging_path_data(self, binary_name):
return self.get_staging_path(binary_name) + self.path_data

View File

@@ -39,24 +39,17 @@ class Target(target.Target):
sys.path.append("c:\\MinGW\\bin" )
os.environ['PATH'] += ";c:\\MinGW\\bin\\"
else:
#if self.config["bus-size"] == "64":
# # 64 bits
# self.set_cross_base("x86_64-w64-mingw32-")
#else:
# # 32 bits
# self.set_cross_base("i686-w64-mingw32-")
# Only one ... need understand why
self.set_cross_base("i686-w64-mingw32-")
if self.config["bus-size"] == "64":
# 64 bits
self.set_cross_base("x86_64-w64-mingw32-")
else:
# 32 bits
self.set_cross_base("i686-w64-mingw32-")
# force static link to prenvent many errors ...
self.global_flags_ld.append(["-static-libgcc",
"-static-libstdc++",
"-static"])
#self.path_bin=""
#self.path_lib="lib"
#self.path_data="data"
#self.path_doc="doc"
self.pkg_path_data = "data"
self.pkg_path_bin = ""
self.pkg_path_lib = "lib"

View File

@@ -7,7 +7,7 @@ def readme():
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
setup(name='lutin',
version='0.7.7',
version='0.7.10',
description='Lutin generic builder (might replace makefile, CMake ...)',
long_description=readme(),
url='http://github.com/HeeroYui/lutin',