CC=gcc CFLAGS=-g3 make: $(CC) -c buf.c $(CC) $(CFLAGS) -fPIC -lc -ldl buf.c -shared -o libbuf.so test: buf.c $(CC) $(CFLAGS) buf.o test.c -o test leak: valgrind --leak-check=full --track-origins=yes --log-file=log.txt ./test clean: rm -rf *.so *.o