+ @echo >> $@
+ @echo "#define $(HostVendor_CPP)_HOST_VENDOR 1" >> $@
+ @echo "#define $(HostVendor_CPP)_TARGET_VENDOR 1" >> $@
+ @echo "#define $(HostVendor_CPP)_BUILD_VENDOR 1" >> $@
+ @cat $(FPTOOLS_TOP)/mk/$@ >> $@
+ @echo "#endif /* __FPTOOLS_CONFIG_H__ */" >> $@
+ @echo "Done."
+
+# ---------------------------------------------------------------------------
+# Make DerivedConstants.h for the compiler
+
+all :: DerivedConstants.h
+
+mkDerivedConstants.c : $(H_CONFIG)
+
+mkDerivedConstantsHdr : mkDerivedConstants.o
+ $(CC) -o $@ $(CC_OPTS) $(LD_OPTS) mkDerivedConstants.o
+
+DerivedConstants.h : mkDerivedConstantsHdr
+ ./mkDerivedConstantsHdr >DerivedConstants.h
+
+CLEAN_FILES += mkDerivedConstantsHdr DerivedConstants.h
+
+# ---------------------------------------------------------------------------
+# Make NativeDefs.h for the NCG
+
+all :: NativeDefs.h
+
+mkNativeHdr.o : DerivedConstants.h
+
+mkNativeHdr : mkNativeHdr.o
+ $(CC) -o $@ $(CC_OPTS) $(LD_OPTS) mkNativeHdr.o
+
+NativeDefs.h : mkNativeHdr
+ ./mkNativeHdr >NativeDefs.h
+
+CLEAN_FILES += mkNativeHdr NativeDefs.h
+
+# ---------------------------------------------------------------------------
+# boot setup:
+#
+# Need config.h to make dependencies in the runtime system source.
+#
+boot :: all
+
+#
+# Install all header files
+#
+# Hackily set the install destination here:
+#
+# Note: we keep per-platform copies of all the include files
+# (ditto for interface files). This is not *really* needed, but
+# it gives (perhaps) a cleaner binary dist structure..might change.
+#
+override datadir:=$(libdir)/include
+INSTALL_DATAS += $(H_FILES) $(H_CONFIG)
+
+#
+# `make clean' settings:
+#
+CLEAN_FILES += $(H_CONFIG)
+
+#
+# Finally, slurp in the standard targets.
+#
+include $(TOP)/mk/target.mk