diff -u -r ../advanced/GNUmakefile ./GNUmakefile
--- ../advanced/GNUmakefile	2014-12-29 02:10:40.608106336 -0500
+++ ./GNUmakefile	2014-12-29 02:29:28.600107116 -0500
@@ -121,18 +121,8 @@
 	$(SRCDIR)/configure $(SRCDIR)/config.mk.in
 
 
-# typegen is a utility program used by the make file below.
-TYPEGEN = $(BUILDDIR)/buildtools/typegen
-
-# endiangen is a utility program used by the make file below.
-ENDIANGEN = $(BUILDDIR)/buildtools/endiangen
-
-$(TYPEGEN) $(ENDIANGEN): $(BUILDDIR)/buildtools
-	$(MAKE) -C $(dir $@) -f $(SRCDIR)/buildtools/Makefile \
-	    SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) $(notdir $@) 
-
 inttypes_netpbm.h: $(TYPEGEN)
-	$(TYPEGEN) >$@
+	echo 'include <inttypes.h>' > inttypes_netpbm.h
 
 # We run a couple of programs on the build machine in computing the
 # contents of pm_config.h.  We need to give the user a way not to do
@@ -147,6 +137,7 @@
 	echo '/* pm_config.h GENERATED BY A MAKE RULE */' >$@
 	echo '#ifndef PM_CONFIG_H' >>$@
 	echo '#define PM_CONFIG_H' >>$@
+	echo '#include <sys/endian.h> /* For BYTE_ORDER on Android */' >>$@
 ifeq ($(INTTYPES_H)x,x)
 	echo '/* Dont need to #include any inttypes.h-type thing */' >>$@
 else
