build flags finalised
build flags are properly working and restore Makefile.am