script to generate def file