[project @ 1998-02-02 17:27:26 by simonm]
[ghc-hetmet.git] / ghc / lib / exts / Makefile
diff --git a/ghc/lib/exts/Makefile b/ghc/lib/exts/Makefile
new file mode 100644 (file)
index 0000000..11c33c3
--- /dev/null
@@ -0,0 +1,67 @@
+#################################################################################
+#
+#                          ghc/lib/Makefile
+#
+#              Makefile for building the GHC Prelude libraries umpteen ways
+#
+#      
+#################################################################################
+
+TOP = ../..
+include $(TOP)/mk/boilerplate.mk
+
+WAYS=$(GhcLibWays)
+
+#-----------------------------------------------------------------------------
+#      Setting the standard variables
+#
+
+LIBRARY = libHSexts$(_way).a
+HS_SRCS        = $(wildcard *.lhs)
+HS_OBJS = $(HS_SRCS:.lhs=.$(way_)o)
+LIBOBJS = $(HS_OBJS)
+HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi)
+
+#-----------------------------------------------------------------------------
+#      Setting the GHC compile options
+
+SRC_HC_OPTS += -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
+
+#
+# Profiling options
+WAY_p_HC_OPTS += -GPrelude
+WAY_mr_HC_OPTS += -GPrelude
+
+#
+# Object and interface files have suffixes tagged with their ways
+#
+ifneq "$(way)" ""
+SRC_HC_OPTS += -hisuf $(way_)hi
+endif
+
+Int_HC_OPTS          += -H8m
+Word_HC_OPTS         += -H8m
+
+#-----------------------------------------------------------------------------
+#      Dependency generation
+
+SRC_MKDEPENDHS_OPTS += -i../std -I$(GHC_INCLUDE_DIR)
+
+#-----------------------------------------------------------------------------
+#      Installation; need to install .hi files as well as libraries
+#
+# The interface files are put inside the $(libdir), since they
+# might (potentially) be platform specific..
+#
+# override is used here because for binary distributions, datadir is
+# set on the command line. sigh.
+#
+override datadir:=$(libdir)/imports/exts
+
+#
+# Files to install from here
+# 
+INSTALL_LIBS  += $(LIBRARY)
+INSTALL_DATAS += $(HS_IFACES)
+
+include $(TOP)/mk/target.mk