simplify Makefile a bit

Code from shared/ is now included in _SOURCES where necessary,
instead of compiled as a library.