mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-29 17:59:50 +03:00
7406df89a5
* autobuild newlib * add newlib example based on menuetlibc example git-svn-id: svn://kolibrios.org@5132 a494cfbc-eb01-0410-851d-a64ba20cac60
17 lines
777 B
Lua
17 lines
777 B
Lua
NEWLIB_BASE = tup.getcwd() .. "/../contrib/sdk/sources/newlib"
|
|
NEWLIB_LIB = tup.getcwd() .. "/../contrib/sdk/lib"
|
|
|
|
TOOLCHAIN_LIBPATH = tup.getconfig("TOOLCHAIN_LIBPATH")
|
|
-- if not given explicitly in config, try to guess
|
|
if TOOLCHAIN_LIBPATH == "" then
|
|
if tup.getconfig("TUP_PLATFORM") == "win32"
|
|
then TOOLCHAIN_LIBPATH="C:\\MinGW\\msys\\1.0\\home\\autobuild\\tools\\win32\\mingw32\\lib"
|
|
else TOOLCHAIN_LIBPATH="/home/autobuild/tools/win32/mingw32/lib"
|
|
end
|
|
end
|
|
|
|
INCLUDES = INCLUDES .. " -I" .. NEWLIB_BASE .. "/libc/include"
|
|
LDFLAGS = LDFLAGS .. " -T$(NEWLIB_BASE)/app.lds -L$(NEWLIB_LIB) -L$(TOOLCHAIN_LIBPATH) --image-base 0"
|
|
tup.append_table(LIBDEPS, {NEWLIB_LIB .. "/<libapp.a>", NEWLIB_LIB .. "/<libc.dll.a>"})
|
|
LIBS = LIBS .. "-lgcc -lapp -lc.dll"
|