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-- |
franta-hg@57 | 1 |
all: libdemo.so |
franta-hg@57 | 2 |
|
franta-hg@57 | 3 |
libdemo.so: demo.cpp |
franta-hg@57 | 4 |
g++ -g -shared -fPIC demo.cpp -o libdemo.so |
franta-hg@57 | 5 |
|
franta-hg@57 | 6 |
clean: |
franta-hg@57 | 7 |
rm -f libdemo.so |
franta-hg@57 | 8 |
|
franta-hg@57 | 9 |
run: libdemo.so |
franta-hg@57 | 10 |
echo "\ |
franta-hg@57 | 11 |
SELECT 'load_extension', load_extension('./libdemo.so'); \ |
franta-hg@57 | 12 |
SELECT 'get_pid', get_pid(); \ |
franta-hg@57 | 13 |
SELECT 'value_count', value_count(), value_count('a'), value_count('a', 'b'), value_count(1,2,3); \ |
franta-hg@57 | 14 |
SELECT 'multiply', multiply(2, 4); \ |
franta-hg@57 | 15 |
" | sqlite3 |
franta-hg@57 | 16 |
|
franta-hg@57 | 17 |
info: libdemo.so |
franta-hg@57 | 18 |
nm libdemo.so |
franta-hg@57 | 19 |
ldd libdemo.so |
franta-hg@57 | 20 |
file libdemo.so |