X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FMakefile;h=132c07cd1996cf3732d8fb2b8adc1b2360d02612;hb=64ac3c5fc190617c81c8db8c8050c00794ac026d;hp=fddd4d0c73bd418fc22c06dba92c1a8c3ecbb2fc;hpb=b4623557bb3c8bec7232e4e68a8be8cf28fbbda6;p=ghc-hetmet.git diff --git a/ghc/includes/Makefile b/ghc/includes/Makefile index fddd4d0..132c07c 100644 --- a/ghc/includes/Makefile +++ b/ghc/includes/Makefile @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# $Id: Makefile,v 1.16 2001/10/03 13:57:42 simonmar Exp $ +# $Id: Makefile,v 1.20 2002/03/02 17:49:42 sof Exp $ # TOP = .. @@ -11,6 +11,13 @@ include $(TOP)/mk/boilerplate.mk H_FILES = $(filter-out gmp.h,$(wildcard *.h)) gmp.h # +# Options -- if we're building unregisterised, add a couple of -D's +# +ifeq "$(GhcUnregisterised)" "YES" +SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER +endif + +# # Header file built from the configure script's findings # H_CONFIG = config.h @@ -32,7 +39,10 @@ $(H_CONFIG) : $(FPTOOLS_TOP)/mk/config.h $(FPTOOLS_TOP)/mk/config.mk $(H_CONFIG) : @echo "Creating $@..." @$(RM) $@ - @echo "#define HostPlatform_TYPE $(HostPlatform_CPP)" > $@ + @echo "#ifndef __FPTOOLS_CONFIG_H__" >$@ + @echo "#define __FPTOOLS_CONFIG_H__" >>$@ + @echo >> $@ + @echo "#define HostPlatform_TYPE $(HostPlatform_CPP)" >> $@ @echo "#define TargetPlatform_TYPE $(HostPlatform_CPP)" >> $@ @echo "#define BuildPlatform_TYPE $(HostPlatform_CPP)" >> $@ @echo >> $@ @@ -59,20 +69,23 @@ endif @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 NativeDefs.h for the NCG +# 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 += DerivedConstants.h +CLEAN_FILES += mkDerivedConstantsHdr DerivedConstants.h # --------------------------------------------------------------------------- # Make NativeDefs.h for the NCG @@ -87,7 +100,7 @@ mkNativeHdr : mkNativeHdr.o NativeDefs.h : mkNativeHdr ./mkNativeHdr >NativeDefs.h -CLEAN_FILES += NativeDefs.h +CLEAN_FILES += mkNativeHdr NativeDefs.h # --------------------------------------------------------------------------- # boot setup: