Fixed macros for lib generation and dependency