git.s-ol.nu janet-2geom / cf94ef1
move lib2geom build into janet build folder s-ol 3 years ago
6 changed file(s) with 34 addition(s) and 35 deletion(s). Raw diff Collapse all Expand all
0 build/
0 #ifndef JANET_2GEOM_POINT_INCLUDED
1 #define JANET_2GEOM_POINT_INCLUDED
2
3 #include <janet.h>
4
5 #ifdef __cplusplus
6 #include <2geom/point.h>
7
8 Janet janet_wrap_point(Geom::Point const &x);
9 Janet janet_wrap_point(Geom::IntPoint const &x);
10 Geom::Point janet_unwrap_point(Janet x);
11
12 extern "C" {
13 #endif
14
15 extern const JanetAbstractType geom_point_type;
16
17 void janet_lib_geom_point(JanetTable *env);
18
19 #ifdef __cplusplus
20 }
21 #endif
22
23 #endif // JANET_2GEOM_POINT_INCLUDED
+0
-24
include/point.h less more
0 #ifndef JANET_2GEOM_POINT_INCLUDED
1 #define JANET_2GEOM_POINT_INCLUDED
2
3 #include <janet.h>
4
5 #ifdef __cplusplus
6 #include <2geom/point.h>
7
8 Janet janet_wrap_point(Geom::Point const &x);
9 Janet janet_wrap_point(Geom::IntPoint const &x);
10 Geom::Point janet_unwrap_point(Janet x);
11
12 extern "C" {
13 #endif
14
15 extern const JanetAbstractType geom_point_type;
16
17 void janet_lib_geom_point(JanetTable *env);
18
19 #ifdef __cplusplus
20 }
21 #endif
22
23 #endif // JANET_2GEOM_POINT_INCLUDED
99 (def olddir (os/cwd))
1010 (try
1111 (do
12 (shell "pwd")
13 (os/mkdir "lib2geom/build")
14 (os/cd "lib2geom/build")
15 (shell "cmake" ".." "-DCMAKE_CXX_FLAGS:STRING=-fPIC")
12 (os/mkdir "build/lib2geom")
13 (os/cd "build/lib2geom")
14 (shell "cmake" "../../lib2geom" "-DCMAKE_CXX_FLAGS:STRING=-fPIC")
1615 (shell "make" "2geom"))
1716 ([err] (print "Error compiling lib2geom.a: " err)))
1817 (os/cd olddir))
19 (add-body "clean"
20 (shell "rm" "-rf" "lib2geom/build")
21 (print "Deleted lib2geom build directory."))
2218
23 (declare-native :name "geom" :source @["src/point.cpp" "src/main.cpp"]
19 (declare-native :name "geom"
20 :headers @["include/janet_2geom.h"]
21 :source @["src/point.cpp" "src/main.cpp"]
2422 :compiler "g++"
2523 :linker "g++"
2624 :cflags ["-Wall" "-Wextra" "-Iinclude" "-Ilib2geom/src"]
27 :lflags ["lib2geom/build/src/2geom/lib2geom.a" "-ldl" "-ldouble-conversion" "-lgsl" "-lgslcblas" "-lm"])
25 :lflags ["build/lib2geom/src/2geom/lib2geom.a" "-ldl" "-ldouble-conversion" "-lgsl" "-lgslcblas" "-lm"])
2826
2927 (def- lname (string "build" sep "geom" statext))
3028 (def- sname (string "build" sep "geom" modext))
0 #include "point.h"
0 #include "janet_2geom.h"
11
22 extern "C" {
33
0 #include "point.h"
0 #include "janet_2geom.h"
11
22 #include <sstream>
33