Skip to content

Commit

Permalink
[depends] install depends build for debug and release into their own …
Browse files Browse the repository at this point in the history
…respective dirs
  • Loading branch information
wsnipex committed Feb 25, 2017
1 parent 3333615 commit da63933
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
20 changes: 14 additions & 6 deletions tools/depends/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ if test "x$TAR" = "xno" ; then
AC_MSG_ERROR("Missing program: tar")
fi

if test "$use_debug" = "yes"; then
build_type="debug"
else
build_type="release"
fi

use_host=$host_alias

cross_compiling="yes"
Expand All @@ -124,7 +130,7 @@ if test "x$host" = "x$build"; then
cross_compiling="no"
fi

deps_dir=$use_host
deps_dir=$use_host-$build_type
tool_dir=$build_cpu-$build_os-native
cross_compiling="yes"

Expand Down Expand Up @@ -155,7 +161,7 @@ case $host in
use_cpu="armeabi-v7a"
fi
use_sdk="${use_sdk:-android-21}"
deps_dir="$use_host-$use_sdk"
deps_dir="$use_host-$use_sdk-$build_type"
platform_cflags="-DANDROID -fexceptions"
optimize_flags="-Os"
if test "x$use_cpu" = "xarmeabi-v7a"; then
Expand All @@ -173,7 +179,7 @@ case $host in
use_cpu="arm64-v8a"
fi
use_sdk="${use_sdk:-android-21}"
deps_dir="$use_host-$use_sdk"
deps_dir="$use_host-$use_sdk-$build_type"
platform_cflags="-DANDROID -fexceptions"
optimize_flags="-Os"
if test "x$use_cpu" = "xarm64-v8a"; then
Expand All @@ -191,7 +197,7 @@ case $host in
use_cpu=$host_cpu
fi
use_sdk="${use_sdk:-android-21}"
deps_dir="$use_host-$use_sdk"
deps_dir="$use_host-$use_sdk-$build_type"
platform_cflags="-DANDROID -fexceptions"
optimize_flags="-Os"
platform_ldflags="-L$prefix/$deps_dir/lib/$use_sdk"
Expand Down Expand Up @@ -406,7 +412,7 @@ case $host in
platform_ldflags+=" -arch $use_cpu -m$platform_min_version -isysroot $use_sdk_path -stdlib=libc++"
platform_cxxflags+=" -arch $use_cpu -m$platform_min_version -std=c++11 -stdlib=libc++"
platform_includes="-isysroot $use_sdk_path"
deps_dir=$sdk_name"_"$use_cpu-target
deps_dir="${sdk_name}_${use_cpu}-target-${build_type}"
tool_dir=buildtools-native;
AC_CHECK_LIB([z], [main], has_zlib=1, AC_MSG_WARN("No zlib support in toolchain. Will build libz."); has_zlib=0)
;;
Expand Down Expand Up @@ -447,7 +453,7 @@ if test "$target_platform" = "raspberry-pi" ; then
platform_os="linux"
cross_compiling="yes"
use_host="arm-linux-gnueabihf"
deps_dir="$use_host"
deps_dir="$use_platform-$build_type"
platform_cflags+=" -pipe -mabi=aapcs-linux -Wno-psabi \
-Wa,-mno-warn-deprecated -Wno-deprecated-declarations \
-isystem${use_firmware}/opt/vc/include \
Expand Down Expand Up @@ -708,6 +714,8 @@ echo -e "host:\t\t $use_host"
echo -e "cflags:\t\t $platform_cflags"
echo -e "cxxflags:\t $platform_cxxflags"
echo -e "ldflags:\t $platform_ldflags"
echo -e "prefix:\t\t $prefix"
echo -e "depends:\t $prefix/$deps_dir"
if test "$platform_os" == "android"; then
echo -e "sdk-platform:\t $use_sdk"
echo -e "build-tools:\t $build_tools_path"
Expand Down
17 changes: 13 additions & 4 deletions tools/depends/target/cmakebuildsys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,21 @@ ifeq ($(Configuration),)
endif
endif

BUILD_DIR=$(CMAKE_SOURCE_DIR)/build

all:
mkdir -p $(CMAKE_SOURCE_DIR)/build
cd $(CMAKE_SOURCE_DIR)/build; $(CMAKE) -DCMAKE_BUILD_TYPE=$(Configuration) -DENABLE_INTERNAL_CROSSGUID=OFF -DENABLE_INTERNAL_FFMPEG=OFF $(CMAKE_SOURCE_DIR)
mkdir -p $(BUILD_DIR)
cd $(BUILD_DIR); $(CMAKE) -DCMAKE_BUILD_TYPE=$(Configuration) -DENABLE_INTERNAL_CROSSGUID=OFF -DENABLE_INTERNAL_FFMPEG=OFF $(CMAKE_SOURCE_DIR)


kodi:
$(MAKE) -C $(BUILD_DIR)

install:
$(MAKE) -C $(BUILD_DIR) install

clean:
cd $(CMAKE_SOURCE_DIR)/build; $(MAKE) clean
$(MAKE) -C $(BUILD_DIR) clean

distclean:
cd $(CMAKE_SOURCE_DIR)/build; $(MAKE) clean
cd $(BUILD_DIR) && rm -rf *

0 comments on commit da63933

Please sign in to comment.