restore DEBUG flag for Debug-builds and fix all compiler warnings
build a shared lib with only selected "userland" symbols visible