mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-03 22:45:56 +01:00
9033b6b847
* improve and colorize warning/error/debug/info messages * add include path warnings for /usr/include and /usr/local/include other changes: * bump version to 0.10
79 lines
3.2 KiB
C++
79 lines
3.2 KiB
C++
/***********************************************************************
|
|
* OSXCross Compiler Wrapper *
|
|
* Copyright (C) 2014, 2015 by Thomas Poechtrager *
|
|
* 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 {
|
|
|
|
int conf(Target &target) {
|
|
std::string SDKPath;
|
|
OSVersion OSXVersionMin = getDefaultMinTarget();
|
|
const char *ltopath = getLibLTOPath();
|
|
|
|
if (!target.getSDKPath(SDKPath)) {
|
|
err << "cannot find Mac OS X SDK (expected in: " << SDKPath << ")"
|
|
<< err.endl();
|
|
return 1;
|
|
}
|
|
|
|
if (!OSXVersionMin.Num())
|
|
OSXVersionMin = target.getSDKOSNum();
|
|
|
|
if (!ltopath)
|
|
ltopath = "";
|
|
|
|
std::cout << "export OSXCROSS_VERSION=" << getOSXCrossVersion()
|
|
<< std::endl;
|
|
std::cout << "export OSXCROSS_OSX_VERSION_MIN=" << OSXVersionMin.shortStr()
|
|
<< std::endl;
|
|
std::cout << "export OSXCROSS_TARGET=" << getDefaultTarget()
|
|
<< std::endl;
|
|
std::cout << "export OSXCROSS_SDK_VERSION=" << target.getSDKOSNum().shortStr()
|
|
<< std::endl;
|
|
std::cout << "export OSXCROSS_SDK=" << SDKPath
|
|
<< std::endl;
|
|
std::cout << "export OSXCROSS_TARBALL_DIR=" << target.execpath
|
|
<< "/../../tarballs"
|
|
<< std::endl;
|
|
std::cout << "export OSXCROSS_PATCH_DIR=" << target.execpath
|
|
<< "/../../patches"
|
|
<< std::endl;
|
|
std::cout << "export OSXCROSS_TARGET_DIR=" << target.execpath << "/.."
|
|
<< std::endl;
|
|
std::cout << "export OSXCROSS_BUILD_DIR=" << target.execpath << "/../../build"
|
|
<< std::endl;
|
|
std::cout << "export OSXCROSS_CCTOOLS_PATH=" << target.execpath
|
|
<< std::endl;
|
|
std::cout << "export OSXCROSS_LIBLTO_PATH=" << ltopath
|
|
<< std::endl;
|
|
std::cout << "export OSXCROSS_LINKER_VERSION=" << getLinkerVersion()
|
|
<< std::endl;
|
|
|
|
return 0;
|
|
}
|
|
|
|
} // namespace osxcross
|
|
} // namespace program
|