X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FMakefile;h=2d6a27a7c2b74b496b96e8053a409332727114e0;hb=3b125592e71d32ac31662fea476cffb77a431111;hp=e0f4b90e529847f4b3bddd75c1b41d50bb731701;hpb=107a09dbc60b94a50a81bcfe70587d37976f97bd;p=ghc-hetmet.git diff --git a/ghc/includes/Makefile b/ghc/includes/Makefile index e0f4b90..2d6a27a 100644 --- a/ghc/includes/Makefile +++ b/ghc/includes/Makefile @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# $Id: Makefile,v 1.21 2003/03/21 15:45:56 sof Exp $ +# $Id: Makefile,v 1.23 2004/08/13 13:09:18 simonmar Exp $ # TOP = .. @@ -20,11 +20,11 @@ endif # # Header file built from the configure script's findings # -H_CONFIG = config.h +H_CONFIG = ghcconfig.h boot :: gmp.h -all :: $(H_CONFIG) NativeDefs.h +all :: $(H_CONFIG) # gmp.h is copied from the GMP directory gmp.h : $(FPTOOLS_TOP)/ghc/rts/gmp/gmp.h @@ -39,26 +39,30 @@ $(H_CONFIG) : $(FPTOOLS_TOP)/mk/config.h $(FPTOOLS_TOP)/mk/config.mk $(H_CONFIG) : @echo "Creating $@..." @$(RM) $@ - @echo "#ifndef __FPTOOLS_CONFIG_H__" >$@ - @echo "#define __FPTOOLS_CONFIG_H__" >>$@ + @echo "#ifndef __GHCCONFIG_H__" >$@ + @echo "#define __GHCCONFIG_H__" >>$@ @echo >> $@ @echo "#define HostPlatform_TYPE $(HostPlatform_CPP)" >> $@ - @echo "#define TargetPlatform_TYPE $(HostPlatform_CPP)" >> $@ - @echo "#define BuildPlatform_TYPE $(HostPlatform_CPP)" >> $@ + @echo "#define TargetPlatform_TYPE $(TargetPlatform_CPP)" >> $@ + @echo "#define BuildPlatform_TYPE $(BuildPlatform_CPP)" >> $@ @echo >> $@ @echo "#define $(HostPlatform_CPP)_HOST 1" >> $@ - @echo "#define $(HostPlatform_CPP)_TARGET 1" >> $@ - @echo "#define $(HostPlatform_CPP)_BUILD 1" >> $@ + @echo "#define $(TargetPlatform_CPP)_TARGET 1" >> $@ + @echo "#define $(BuildPlatform_CPP)_BUILD 1" >> $@ @echo >> $@ @echo "#define $(HostArch_CPP)_HOST_ARCH 1" >> $@ - @echo "#define $(HostArch_CPP)_TARGET_ARCH 1" >> $@ - @echo "#define $(HostArch_CPP)_BUILD_ARCH 1" >> $@ + @echo "#define $(TargetArch_CPP)_TARGET_ARCH 1" >> $@ + @echo "#define $(BuildArch_CPP)_BUILD_ARCH 1" >> $@ @echo "#define HOST_ARCH \"$(HostArch_CPP)\"" >> $@ + @echo "#define TARGET_ARCH \"$(TargetArch_CPP)\"" >> $@ + @echo "#define BUILD_ARCH \"$(BuildArch_CPP)\"" >> $@ @echo >> $@ @echo "#define $(HostOS_CPP)_HOST_OS 1" >> $@ - @echo "#define $(HostOS_CPP)_TARGET_OS 1" >> $@ - @echo "#define $(HostOS_CPP)_BUILD_OS 1" >> $@ + @echo "#define $(TargetOS_CPP)_TARGET_OS 1" >> $@ + @echo "#define $(BuildOS_CPP)_BUILD_OS 1" >> $@ @echo "#define HOST_OS \"$(HostOS_CPP)\"" >> $@ + @echo "#define TARGET_OS \"$(TargetOS_CPP)\"" >> $@ + @echo "#define BUILD_OS \"$(BuildOS_CPP)\"" >> $@ ifeq "$(HostOS_CPP)" "irix" @echo "#ifndef $(IRIX_MAJOR)_TARGET_OS " >> $@ @echo "#define $(IRIX_MAJOR)_TARGET_OS 1" >> $@ @@ -66,10 +70,10 @@ ifeq "$(HostOS_CPP)" "irix" endif @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 "#define $(TargetVendor_CPP)_TARGET_VENDOR 1" >> $@ + @echo "#define $(BuildVendor_CPP)_BUILD_VENDOR 1" >> $@ + @cat $(FPTOOLS_TOP)/mk/config.h >> $@ + @echo "#endif /* __GHCCONFIG_H__ */" >> $@ @echo "Done." # --------------------------------------------------------------------------- @@ -83,24 +87,27 @@ mkDerivedConstantsHdr : mkDerivedConstants.o $(CC) -o $@ $(CC_OPTS) $(LD_OPTS) mkDerivedConstants.o DerivedConstants.h : mkDerivedConstantsHdr - ./mkDerivedConstantsHdr >DerivedConstants.h + ./mkDerivedConstantsHdr >$@ CLEAN_FILES += mkDerivedConstantsHdr$(exeext) DerivedConstants.h -# --------------------------------------------------------------------------- -# Make NativeDefs.h for the NCG +# ----------------------------------------------------------------------------- +# -all :: NativeDefs.h +all :: GHCConstants.h -mkNativeHdr.o : DerivedConstants.h +mkGHCConstants.c : $(H_CONFIG) -mkNativeHdr : mkNativeHdr.o - $(CC) -o $@ $(CC_OPTS) $(LD_OPTS) mkNativeHdr.o +mkGHCConstants : mkGHCConstants.o + $(CC) -o $@ $(CC_OPTS) $(LD_OPTS) mkGHCConstants.o -NativeDefs.h : mkNativeHdr - ./mkNativeHdr >NativeDefs.h +mkGHCConstants.o : mkDerivedConstants.c + $(CC) -o $@ -c $< -DGEN_HASKELL -CLEAN_FILES += mkNativeHdr$(exeext) NativeDefs.h +GHCConstants.h : mkGHCConstants + ./mkGHCConstants >$@ + +CLEAN_FILES += mkDerivedConstantsHdr$(exeext) DerivedConstants.h # --------------------------------------------------------------------------- # boot setup: