More changes to Makefile for TEMPLATE_FLAVOR