Added flags for release and debug builds
Generation of the lib file and correct options