fix wrong build flags setup and add more build flags

Conflicts:
	Makefile