This follows James Falkner's recipe.
Make sure you have Java and its compiler:
$ java -fullversion
java full version "1.7.0_55-b14"
$ javac -fullversion
| all: libtruc.so app tracepoints.so | |
| app: app.o | |
| gcc -o app app.o -ldl | |
| app.o: app.c | |
| gcc -c app.c -g3 -O0 -Wall | |
| libtruc.so: truc.o tracepoints.o | |
| gcc -shared -o libtruc.so truc.o -ldl |