fix ifdef and correct a Makefile