Get rid of spurious x64 / x85 on cc commandline on win
LDFLAGS="$LDFLAGS -L$PREFIX/lib"
CFLAGS="$CFLAGS -O3 -I$PREFIX/include"
-make -j$CPU_COUNT LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS"
+# The AppVeyor build sets "TARGET_ARCH" to x86 or x64. We need to unset
+# this, as TARGET_ARCH is put on the command line by Make via
+# its default rules for compiling C files.
+export TARGET_ARCH=
+
+make -j$CPU_COUNT LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS"
make test
cp pigz unpigz $PREFIX/bin
