Commit 430b3962 authored by Laurent Belcour's avatar Laurent Belcour
Browse files

Core and part of the softs/lybraries are compiling under OSX

parent 3e9e956e
...@@ -157,6 +157,8 @@ unsigned int timer::current_time() const ...@@ -157,6 +157,8 @@ unsigned int timer::current_time() const
SYSTEMTIME res; SYSTEMTIME res;
GetSystemTime(&res); GetSystemTime(&res);
return (unsigned int)(res.wSecond + res.wMinute*60 + res.wHour*360); return (unsigned int)(res.wSecond + res.wMinute*60 + res.wHour*360);
#elif __APPLE__
return 0;
#else #else
struct timespec res; struct timespec res;
clock_gettime(CLOCK_MONOTONIC, &res); clock_gettime(CLOCK_MONOTONIC, &res);
......
...@@ -478,6 +478,11 @@ size_t plugins_manager::get_system_memory() ...@@ -478,6 +478,11 @@ size_t plugins_manager::get_system_memory()
GlobalMemoryStatusEx(&status); GlobalMemoryStatusEx(&status);
return status.ullTotalPhys; return status.ullTotalPhys;
} }
#elif __APPLE__
size_t plugins_manager::get_system_memory()
{
return 0;
}
#else #else
#include <unistd.h> #include <unistd.h>
size_t plugins_manager::get_system_memory() size_t plugins_manager::get_system_memory()
......
import os import sys
env = Environment() env = Environment()
env.Append(CPPPATH = ['../../', '../../../external/build/include']) env.Append(CPPPATH = ['../../', '../../../external/build/include'])
...@@ -7,8 +7,10 @@ env.Append(CPPPATH = ['../../', '../../../external/build/include']) ...@@ -7,8 +7,10 @@ env.Append(CPPPATH = ['../../', '../../../external/build/include'])
sources = ['main.cpp'] sources = ['main.cpp']
libs = ['core'] libs = ['core']
if(os.name == 'posix'): if sys.platform == 'linux2':
libs.append(['rt', 'dl']) libs.append(['rt', 'dl'])
elif sys.platform == 'darwin':
libs.append(['dl'])
#end #end
env.Program('../../build/brdf2brdf', sources, LIBS=libs, LIBPATH=['../../build']) env.Program('../../build/brdf2brdf', sources, LIBS=libs, LIBPATH=['../../build'])
import os import sys
env = Environment() env = Environment()
env.Append(CPPPATH = ['../../', '../../../external/build/include']) env.Append(CPPPATH = ['../../', '../../../external/build/include'])
...@@ -7,8 +7,10 @@ env.Append(CPPPATH = ['../../', '../../../external/build/include']) ...@@ -7,8 +7,10 @@ env.Append(CPPPATH = ['../../', '../../../external/build/include'])
sources = ['main.cpp'] sources = ['main.cpp']
libs = ['core'] libs = ['core']
if(os.name == 'posix'): if sys.platform == 'linux2':
libs.append(['rt', 'dl']) libs.append(['rt', 'dl'])
elif sys.platform == 'darwin':
libs.append(['dl'])
#end #end
env.Program('../../build/brdf2data', sources, LIBS=libs, LIBPATH=['../../build']) env.Program('../../build/brdf2data', sources, LIBS=libs, LIBPATH=['../../build'])
import os import sys
env = Environment() env = Environment()
env.Append(CPPPATH = ['../../', '../../../external/build/include']) env.Append(CPPPATH = ['../../', '../../../external/build/include'])
...@@ -7,8 +7,10 @@ env.Append(CPPPATH = ['../../', '../../../external/build/include']) ...@@ -7,8 +7,10 @@ env.Append(CPPPATH = ['../../', '../../../external/build/include'])
sources = ['main.cpp'] sources = ['main.cpp']
libs = ['core'] libs = ['core']
if(os.name == 'posix'): if sys.platform == 'linux2':
libs.append(['rt', 'dl']) libs.append(['rt', 'dl'])
elif sys.platform == 'darwin':
libs.append(['dl'])
#end #end
env.Program('../../build/brdf2gnuplot', sources, LIBS=libs, LIBPATH=['../../build']) env.Program('../../build/brdf2gnuplot', sources, LIBS=libs, LIBPATH=['../../build'])
import os import sys
env = Environment() env = Environment()
env.Append(CPPPATH = ['../../', '../../../external/build/include']) env.Append(CPPPATH = ['../../', '../../../external/build/include'])
...@@ -7,8 +7,10 @@ env.Append(CPPPATH = ['../../', '../../../external/build/include']) ...@@ -7,8 +7,10 @@ env.Append(CPPPATH = ['../../', '../../../external/build/include'])
sources = ['main.cpp'] sources = ['main.cpp']
libs = ['core'] libs = ['core']
if(os.name == 'posix'): if sys.platform == 'linux2':
libs.append(['rt', 'dl']) libs.append(['rt', 'dl'])
elif sys.platform == 'darwin':
libs.append(['dl'])
#end #end
env.Program('../../build/data2brdf', sources, LIBS=libs, LIBPATH=['../../build']) env.Program('../../build/data2brdf', sources, LIBS=libs, LIBPATH=['../../build'])
import os import sys
env = Environment() env = Environment()
env.Append(CPPPATH = ['../../', '../../../external/build/include']) env.Append(CPPPATH = ['../../', '../../../external/build/include'])
...@@ -7,8 +7,10 @@ env.Append(CPPPATH = ['../../', '../../../external/build/include']) ...@@ -7,8 +7,10 @@ env.Append(CPPPATH = ['../../', '../../../external/build/include'])
sources = ['main.cpp'] sources = ['main.cpp']
libs = ['core'] libs = ['core']
if(os.name == 'posix'): if sys.platform == 'linux2':
libs.append(['rt', 'dl']) libs.append(['rt', 'dl'])
elif sys.platform == 'darwin':
libs.append(['dl'])
#end #end
env.Program('../../build/data2data', sources, LIBS=libs, LIBPATH=['../../build']) env.Program('../../build/data2data', sources, LIBS=libs, LIBPATH=['../../build'])
import os import sys
env = Environment() env = Environment()
env.Append(CPPPATH = ['../../', '../../../external/build/include']) env.Append(CPPPATH = ['../../', '../../../external/build/include'])
...@@ -7,8 +7,10 @@ env.Append(CPPPATH = ['../../', '../../../external/build/include']) ...@@ -7,8 +7,10 @@ env.Append(CPPPATH = ['../../', '../../../external/build/include'])
sources = ['main.cpp'] sources = ['main.cpp']
libs = ['core'] libs = ['core']
if(os.name == 'posix'): if sys.platform == 'linux2':
libs.append(['rt', 'dl']) libs.append(['rt', 'dl'])
elif sys.platform == 'darwin':
libs.append(['dl'])
#end #end
env.Program('../../build/data2moments', sources, LIBS=libs, LIBPATH=['../../build']) env.Program('../../build/data2moments', sources, LIBS=libs, LIBPATH=['../../build'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment