wip: better defines, link support (unix and windows)