aboutsummaryrefslogtreecommitdiff
path: root/premake5.lua
blob: c5cf59779a45494e142fce904e7eebaa04b01bdd (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
-- Build with
--
--   premake5 gmake2 && make verbose=1 gemmalib -j 8
--
-- Including bin
--
--   premake5 gmake2 && make verbose=1 config=debug
--
-- Or
--
--   premake5 gmake2 && make verbose=1 config=release
--
-- Run
--
--   LD_LIBRARY_PATH=$GUIX_ENVIRONMENT/lib ./build/bin/Debug/PanGemma
--
-- 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")

workspace "PanGemma"
   configurations { "Debug", "Release" }

   project "gemmalib" -- library for interactive development
   kind "SharedLib"
   defines { "OPENBLAS" }
   language "C++"
   objdir "build/"
   targetdir "build/bin/%{cfg.buildcfg}"

   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" }

   filter "configurations:Debug"
      defines { "DEBUG" }
      symbols "On"

   filter "configurations:Release"
      defines { "NDEBUG" }
      optimize "On"



project "gemma"
   kind "ConsoleApp"
   defines { "OPENBLAS" }
   language "C++"
   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" }

   filter "configurations:Debug"
      defines { "DEBUG" }
      symbols "On"

   filter "configurations:Release"
      defines { "NDEBUG" }
      optimize "On"