projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2006-01-05 13:10:55 by simonpj]
[ghc-hetmet.git]
/
ghc
/
includes
/
Makefile
diff --git
a/ghc/includes/Makefile
b/ghc/includes/Makefile
index
136bce7
..
f769ca2
100644
(file)
--- a/
ghc/includes/Makefile
+++ b/
ghc/includes/Makefile
@@
-1,6
+1,4
@@
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.28 2005/03/02 09:48:16 simonmar Exp $
-#
TOP = ..
include $(TOP)/mk/boilerplate.mk
TOP = ..
include $(TOP)/mk/boilerplate.mk
@@
-17,6
+15,8
@@
ifeq "$(GhcUnregisterised)" "YES"
SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER
endif
SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER
endif
+SRC_CC_OPTS += -I. -I../rts
+
#
# Header file built from the configure script's findings
#
#
# Header file built from the configure script's findings
#
@@
-36,6
+36,14
@@
gmp.h : $(FPTOOLS_TOP)/ghc/rts/gmp/gmp.h
# definitions to avoid clashes), prepending some make variables specifying cpp
# platform variables.
# definitions to avoid clashes), prepending some make variables specifying cpp
# platform variables.
+ifneq "$(TARGETPLATFORM)" "$(HOSTPLATFORM)"
+
+$(H_CONFIG) :
+ @echo "*** Cross-compiling: please copy $(H_CONFIG) from the target system"
+ @exit 1
+
+else
+
$(H_CONFIG) : $(FPTOOLS_TOP)/mk/config.h $(FPTOOLS_TOP)/mk/config.mk
$(H_CONFIG) : Makefile
$(H_CONFIG) : $(FPTOOLS_TOP)/mk/config.h $(FPTOOLS_TOP)/mk/config.mk
$(H_CONFIG) : Makefile
@@
-46,6
+54,8
@@
$(H_CONFIG) : Makefile
@echo "#endif /* __GHCAUTOCONF_H__ */" >> $@
@echo "Done."
@echo "#endif /* __GHCAUTOCONF_H__ */" >> $@
@echo "Done."
+endif
+
$(H_PLATFORM) : Makefile
@echo "Creating $@..."
@$(RM) $@
$(H_PLATFORM) : Makefile
@echo "Creating $@..."
@$(RM) $@
@@
-95,6
+105,14
@@
endif
all :: DerivedConstants.h
all :: DerivedConstants.h
+ifneq "$(TARGETPLATFORM)" "$(HOSTPLATFORM)"
+
+DerivedConstants.h :
+ @echo "*** Cross-compiling: please copy DerivedConstants.h from the target system"
+ @exit 1
+
+else
+
mkDerivedConstants.c : $(H_CONFIG)
mkDerivedConstantsHdr : mkDerivedConstants.o
mkDerivedConstants.c : $(H_CONFIG)
mkDerivedConstantsHdr : mkDerivedConstants.o
@@
-103,6
+121,8
@@
mkDerivedConstantsHdr : mkDerivedConstants.o
DerivedConstants.h : mkDerivedConstantsHdr
./mkDerivedConstantsHdr >$@
DerivedConstants.h : mkDerivedConstantsHdr
./mkDerivedConstantsHdr >$@
+endif
+
CLEAN_FILES += mkDerivedConstantsHdr$(exeext) DerivedConstants.h
# -----------------------------------------------------------------------------
CLEAN_FILES += mkDerivedConstantsHdr$(exeext) DerivedConstants.h
# -----------------------------------------------------------------------------
@@
-110,17
+130,25
@@
CLEAN_FILES += mkDerivedConstantsHdr$(exeext) DerivedConstants.h
all :: GHCConstants.h
all :: GHCConstants.h
-mkGHCConstants.c : $(H_CONFIG)
+ifneq "$(TARGETPLATFORM)" "$(HOSTPLATFORM)"
+
+GHCConstants.h :
+ @echo "*** Cross-compiling: please copy DerivedConstants.h from the target system"
+ @exit 1
+
+else
mkGHCConstants : mkGHCConstants.o
$(CC) -o $@ $(CC_OPTS) $(LD_OPTS) mkGHCConstants.o
mkGHCConstants.o : mkDerivedConstants.c
mkGHCConstants : mkGHCConstants.o
$(CC) -o $@ $(CC_OPTS) $(LD_OPTS) mkGHCConstants.o
mkGHCConstants.o : mkDerivedConstants.c
- $(CC) -o $@ -c $< -DGEN_HASKELL
+ $(CC) -o $@ $(CC_OPTS) -c $< -DGEN_HASKELL
GHCConstants.h : mkGHCConstants
./mkGHCConstants >$@
GHCConstants.h : mkGHCConstants
./mkGHCConstants >$@
+endif
+
CLEAN_FILES += mkGHCConstants$(exeext) GHCConstants.h
# ---------------------------------------------------------------------------
CLEAN_FILES += mkGHCConstants$(exeext) GHCConstants.h
# ---------------------------------------------------------------------------