--- a/Makefile.am
+++ b/Makefile.am
@@ -136,8 +136,8 @@
 EXTRA_DIST += tools/yasm-filter.sh tools/nasm-filter.sh
 EXTRA_DIST += tools/yasm-cet-filter.sh tools/nasm-cet-filter.sh
 
-AM_CFLAGS = ${my_CFLAGS} ${INCLUDE} $(src_include) ${D}
-AM_CCASFLAGS = ${yasm_args} ${INCLUDE} $(src_include) ${DEFS} ${D}
+AM_CFLAGS = ${my_CFLAGS} ${INCLUDE} $(src_include) ${DIST_D}
+AM_CCASFLAGS = ${yasm_args} ${INCLUDE} $(src_include) ${DEFS} ${DIST_D}
 
 .asm.s:
 	@echo "  MKTMP   " $@;
