1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/c++/sqlite-demo-modul/Makefile Fri May 08 00:02:05 2020 +0200
1.3 @@ -0,0 +1,20 @@
1.4 +all: libdemo.so
1.5 +
1.6 +libdemo.so: demo.cpp
1.7 + g++ -g -shared -fPIC demo.cpp -o libdemo.so
1.8 +
1.9 +clean:
1.10 + rm -f libdemo.so
1.11 +
1.12 +run: libdemo.so
1.13 + echo "\
1.14 + SELECT 'load_extension', load_extension('./libdemo.so'); \
1.15 + SELECT 'get_pid', get_pid(); \
1.16 + SELECT 'value_count', value_count(), value_count('a'), value_count('a', 'b'), value_count(1,2,3); \
1.17 + SELECT 'multiply', multiply(2, 4); \
1.18 + " | sqlite3
1.19 +
1.20 +info: libdemo.so
1.21 + nm libdemo.so
1.22 + ldd libdemo.so
1.23 + file libdemo.so