d2: Make guard makefile more specific

Change-Id: If9d91f802ccc99448a00f0288bf4bc4ddcb4364e