-#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.4 1997/01/07 13:19:38 simonm Exp $
+#################################################################################
+#
+# ghc/lib/Makefile
+#
+# Makefile for building the GHC Prelude libraries umpteen ways
+#
+#
+#################################################################################
-TOP = ../..
-include $(TOP)/ghc/mk/ghc.mk
+TOP = ..
+include $(TOP)/mk/boilerplate.mk
-SUBDIRS = cbits
-ifeq ($(IncludeTestDirsInBuild),YES)
- SUBDIRS += tests
-endif
-include $(TOP)/mk/subdir.mk
-
-# per-build options: shared with runtime system
-include ../mk/buildflags.mk
-
-MAKEFILE=Makefile.libHS
-DESCR=libraries
-include $(TOP)/ghc/mk/ways.mk
+# posix must be before misc.
-# Shortcut for typical case when testing: just make the "normal" version
-# (simonm Todo: better way to do this?)
-libHS.a ::
- $(MAKE) -f Makefile.libHS suffix=norm
-
-# install MODULES file
+ifeq "$(GhcWithHscBuiltViaC)" "YES"
+SUBDIRS = std exts
+else
+SUBDIRS = std exts concurrent misc posix
+endif
-install ::
- $(INSTALL) $(INSTDATAFLAGS) MODULES $(INSTDATADIR_GHC)/imports
+include $(TOP)/mk/target.mk