diff options
Diffstat (limited to 'premake5.lua')
| -rw-r--r-- | premake5.lua | 45 |
1 files changed, 31 insertions, 14 deletions
diff --git a/premake5.lua b/premake5.lua index 4502e74..9229800 100644 --- a/premake5.lua +++ b/premake5.lua @@ -1,18 +1,27 @@ -- Build with -- --- premake5 gmake2 && make verbose=1 gemmalib -j 8 +-- make clean && rm build -rf +-- premake5 gmake && make verbose=1 gemmalib -j 8 -- -- Including bin -- --- premake5 gmake2 && make verbose=1 config=debug +-- premake5 gmake && make verbose=1 config=debug gemma -j 8 && time LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib ./test/runner -- -- Or -- --- premake5 gmake2 && make verbose=1 config=release +-- premake5 gmake && make verbose=1 config=release -j 8 gemma && LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib ./build/bin/Release/gemma -- -- Run -- --- LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib ./build/bin/Debug/PanGemma +-- LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib ./build/bin/Debug/gemma +-- +-- Next we start using the API from guile with +-- +-- env LD_LIBRARY_PATH=./build/bin/Debug/:$GUIX_ENVIRONMENT/lib guile +-- (load-extension "libgemmalib" "init_module") + +local pkg_cpp_flags = os.outputof("pkg-config --cflags openblas guile-3.0 gsl zlib") +local pkg_linker_flags = os.outputof("pkg-config --libs openblas guile-3.0 gsl zlib") workspace "PanGemma" configurations { "Debug", "Release" } @@ -26,36 +35,44 @@ workspace "PanGemma" files { "src/*.h src/*.c src/**.hpp", "src/**.cpp" } removefiles { "src/main.cpp" } - includedirs { "src/", os.getenv('GUIX_ENVIRONMENT') .. "/include/guile/3.0" } - - links { "gsl", "z", "openblas" } + includedirs { "src/" } filter "configurations:Debug" defines { "DEBUG" } + buildoptions { pkg_cpp_flags } + linkoptions { pkg_linker_flags } symbols "On" filter "configurations:Release" - defines { "NDEBUG" } - optimize "On" - - + defines { "NDEBUG", "HAVE_INLINE" } + buildoptions { pkg_cpp_flags } + linkoptions { pkg_linker_flags } + buildoptions { "-pthread", "-Wall" } + optimize "Speed" project "gemma" kind "ConsoleApp" defines { "OPENBLAS" } language "C++" + buildoptions { "-Wfatal-errors" } objdir "build/" targetdir "build/bin/%{cfg.buildcfg}" files { "src/*.h src/*.c src/**.hpp", "src/**.cpp" } removefiles { "src/gemma_api.cpp" } includedirs { "src/" } - links { "gsl", "z", "openblas" } + links { "lmdb" } filter "configurations:Debug" defines { "DEBUG" } + buildoptions { pkg_cpp_flags } + linkoptions { pkg_linker_flags } + links { "profiler" } symbols "On" filter "configurations:Release" - defines { "NDEBUG" } - optimize "On" + defines { "NDEBUG", "HAVE_INLINE" } + buildoptions { "-pthread", "-Wall" } + buildoptions { pkg_cpp_flags } + linkoptions { pkg_linker_flags } + optimize "Speed" |
