call libusdt cleanup functions when appropriate

also a small Makefile improvement