1
0
forked from 0ad/0ad

Premake need to be changed to create makefiles which work on OSX

updated the lua to handle os x project files

This was SVN commit r4293.
This commit is contained in:
dave 2006-09-04 16:33:47 +00:00
parent 3b41b5fbd1
commit b899ff6823
2 changed files with 27 additions and 5 deletions

View File

@ -325,11 +325,13 @@ function setup_all_libs ()
if OS == "windows" then
tinsert(package.files, sourcesfromdirs(source_root, {"lib/sysdep/win"}))
-- note: RC file must be added to main_exe package.
else
elseif OS == "linux" then
tinsert(package.files, sourcesfromdirs(source_root, {"lib/sysdep/unix"}))
-- (X11 include path isn't standard across distributions)
tinsert(package.includepaths, "/usr/X11R6/include/X11" )
tinsert(package.includepaths, "/usr/include/X11" )
elseif OS == "macosx" then
tinsert(package.files, sourcesfromdirs(source_root, {"lib/sysdep/osx"}))
end
end
@ -405,7 +407,7 @@ function setup_main_exe ()
"/DELAY:UNLOAD"
}
else -- Non-Windows, = Unix
elseif OS == "linux" then
-- Libraries
tinsert(package.links, {
@ -416,10 +418,23 @@ function setup_main_exe ()
"bfd", "iberty"
})
-- For debug_resolve_symbol
package.config["Debug"].linkoptions = { "-rdynamic" }
package.config["Testing"].linkoptions = { "-rdynamic" }
tinsert(package.libpaths, "/usr/X11R6/lib")
elseif OS == "macosx" then
-- Libraries
tinsert(package.links, { -- Utilities
"pthread"
})
tinsert(package.libpaths, "/usr/X11R6/lib")
end
end

View File

@ -124,11 +124,18 @@ int gnu_cpp()
io_print(" -dynamiclib -flat_namespace");
// Use start-group and end-group to get around the problem with the
// order of link arguments.
io_print(" -Xlinker --start-group");
if (!os_is("macosx"))
io_print(" -Xlinker --start-group");
print_list(prj_get_linkoptions(), " ", "", "", NULL);
print_list(prj_get_libpaths(), " -L \"", "\"", "", NULL);
print_list(prj_get_libpaths(), " -L\"", "\"", "", NULL);
print_list(prj_get_links(), " ", "", "", filterLinks);
io_print(" -Xlinker --end-group\n");
if (!os_is("macosx"))
io_print(" -Xlinker --end-group");
io_print("\n");
/* Build a list of libraries this target depends on */
io_print(" LDDEPS :=");