Copy part of def.cpp to def.h
libraries can assume those macros are available