c++/sqlite-demo-modul/Makefile
author František Kučera <franta-hg@frantovo.cz>
Tue, 12 May 2020 21:30:46 +0200
changeset 58 2f84ed5f3abf
parent 57 1b21c78d8706
permissions -rw-r--r--
SQLite: demo modul: extern "C" není potřeba pro SQL funkce
     1 all: libdemo.so
     2 
     3 libdemo.so: demo.cpp
     4 	g++ -g -shared -fPIC demo.cpp -o libdemo.so
     5 
     6 clean:
     7 	rm -f libdemo.so
     8 
     9 run: libdemo.so
    10 	echo "\
    11 	    SELECT 'load_extension',   load_extension('./libdemo.so'); \
    12 	    SELECT 'get_pid',          get_pid(); \
    13 	    SELECT 'value_count',      value_count(), value_count('a'), value_count('a', 'b'), value_count(1,2,3); \
    14 	    SELECT 'multiply',         multiply(2, 4); \
    15 	" | sqlite3
    16 
    17 info: libdemo.so
    18 	nm libdemo.so
    19 	ldd libdemo.so
    20 	file libdemo.so