2014-05-17 23:15:15 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* OSXCross Compiler Wrapper *
|
2016-02-27 09:40:10 +01:00
|
|
|
* Copyright (C) 2014-2016 by Thomas Poechtrager *
|
2014-05-17 23:15:15 +02:00
|
|
|
* t.poechtrager@gmail.com *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or *
|
|
|
|
* modify it under the terms of the GNU General Public License *
|
|
|
|
* as published by the Free Software Foundation; either version 2 *
|
|
|
|
* of the License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the Free Software *
|
|
|
|
* Foundation, Inc., *
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
|
|
|
***********************************************************************/
|
|
|
|
|
|
|
|
#include "proginc.h"
|
|
|
|
|
|
|
|
using namespace tools;
|
|
|
|
using namespace target;
|
|
|
|
|
|
|
|
namespace program {
|
|
|
|
namespace osxcross {
|
|
|
|
|
2014-09-27 19:45:49 +02:00
|
|
|
int conf(Target &target) {
|
2015-05-02 21:49:23 +02:00
|
|
|
std::string SDKPath;
|
2014-05-17 23:15:15 +02:00
|
|
|
OSVersion OSXVersionMin = getDefaultMinTarget();
|
|
|
|
const char *ltopath = getLibLTOPath();
|
2019-10-23 16:06:00 +02:00
|
|
|
std::string BuildDir = getBuildDir();
|
|
|
|
|
|
|
|
if (BuildDir.empty()) {
|
|
|
|
BuildDir += target.execpath;
|
|
|
|
BuildDir += "/../../build";
|
|
|
|
}
|
2014-05-17 23:15:15 +02:00
|
|
|
|
2015-06-21 14:07:19 +02:00
|
|
|
if (!target.getSDKPath(SDKPath))
|
2014-05-17 23:15:15 +02:00
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (!OSXVersionMin.Num())
|
|
|
|
OSXVersionMin = target.getSDKOSNum();
|
|
|
|
|
|
|
|
if (!ltopath)
|
|
|
|
ltopath = "";
|
|
|
|
|
2014-09-27 10:07:15 +02:00
|
|
|
std::cout << "export OSXCROSS_VERSION=" << getOSXCrossVersion()
|
|
|
|
<< std::endl;
|
2014-05-17 23:15:15 +02:00
|
|
|
std::cout << "export OSXCROSS_OSX_VERSION_MIN=" << OSXVersionMin.shortStr()
|
|
|
|
<< std::endl;
|
2015-05-02 21:49:23 +02:00
|
|
|
std::cout << "export OSXCROSS_TARGET=" << getDefaultTarget()
|
|
|
|
<< std::endl;
|
2014-05-17 23:15:15 +02:00
|
|
|
std::cout << "export OSXCROSS_SDK_VERSION=" << target.getSDKOSNum().shortStr()
|
|
|
|
<< std::endl;
|
2015-05-02 21:49:23 +02:00
|
|
|
std::cout << "export OSXCROSS_SDK=" << SDKPath
|
2014-09-27 10:07:15 +02:00
|
|
|
<< std::endl;
|
2019-10-23 16:06:00 +02:00
|
|
|
std::cout << "export OSXCROSS_TARBALL_DIR=" << BuildDir.c_str()
|
|
|
|
<< "/../tarballs"
|
2014-09-27 10:07:15 +02:00
|
|
|
<< std::endl;
|
2019-10-23 16:06:00 +02:00
|
|
|
std::cout << "export OSXCROSS_PATCH_DIR=" << BuildDir.c_str()
|
|
|
|
<< "/../patches"
|
2014-09-27 10:07:15 +02:00
|
|
|
<< std::endl;
|
2014-05-17 23:15:15 +02:00
|
|
|
std::cout << "export OSXCROSS_TARGET_DIR=" << target.execpath << "/.."
|
|
|
|
<< std::endl;
|
2019-10-23 16:06:00 +02:00
|
|
|
std::cout << "export OSXCROSS_BUILD_DIR=" << BuildDir.c_str()
|
|
|
|
<< std::endl;
|
2014-09-27 10:07:15 +02:00
|
|
|
std::cout << "export OSXCROSS_CCTOOLS_PATH=" << target.execpath
|
|
|
|
<< std::endl;
|
|
|
|
std::cout << "export OSXCROSS_LIBLTO_PATH=" << ltopath
|
|
|
|
<< std::endl;
|
2014-05-17 23:15:15 +02:00
|
|
|
std::cout << "export OSXCROSS_LINKER_VERSION=" << getLinkerVersion()
|
|
|
|
<< std::endl;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace osxcross
|
|
|
|
} // namespace program
|