[project @ 1996-11-21 16:45:53 by simonm]
[ghc-hetmet.git] / ghc / runtime / gmp / Makefile
similarity index 82%
rename from ghc/runtime/gmp/Jmakefile
rename to ghc/runtime/gmp/Makefile
index 37b990f..2672965 100644 (file)
@@ -1,4 +1,8 @@
-/* based on the Makefile that comes with "gmp" */
+#-----------------------------------------------------------------------------
+# $Id: Makefile,v 1.2 1996/11/21 16:48:25 simonm Exp $
+
+TOP=../../..
+include $(TOP)/ghc/mk/ghc.mk
 
 GMP_OBJS = $(MPZ_OBJS) $(MPQ_OBJS) $(MPN_OBJS) $(IMPL_OBJS) mp_bases.o
 
@@ -48,28 +52,26 @@ MPN_OBJS = mpn_add.o mpn_sub.o mpn_cmp.o mpn_mul.o mpn_div.o mpn_dm_1.o \
 
 CC_OPTS = -I.
 
-SuffixRule_c_o()
-
 all depend :: gmp-mparam.h
-
 libgmp.a :: stamp-stddefh
 
-NormalLibraryTarget(gmp,$(GMP_OBJS))
+ARCHIVE = libgmp.a
+LIBOBJS = $(GMP_OBJS)
+DESTDIR = $(INSTLIBDIR_GHC)
+C_DEP_SRCS = $(IMPL_SRCS) $(MPZ_SRCS) $(MPQ_SRCS) $(MPN_SRCS)
 
-#if DoInstallGHCSystem == YES
-InstallLibraryTarget(gmp,$(INSTLIBDIR_GHC))
-#endif /* DoInstallGHCSystem */
+clean ::
+       $(RM) test-with-stddefh.c stamp-stddefh \
+               cre-mparam gmp-mparam.h mp_bases.c cre-conv-tab
 
-ExtraStuffToClean(test-with-stddefh.c stamp-stddefh cre-mparam gmp-mparam.h mp_bases.c cre-conv-tab)
+# ToDo: something to make the doc
 
-/* ToDo: something to make the doc */
+# from here on, it is magic from the original Makefile
 
-/* from here on, it is magic from the original Makefile */
-
-XCOMM If you cross compile on a machine with the same sizes of the integral
-XCOMM types ("int", "long int", "short int", and "char") define this as the
-XCOMM local compiler.  Otherwise, you need look for the uses of LOCAL_CC below,
-XCOMM and handle those cases manually.
+# If you cross compile on a machine with the same sizes of the integral
+# types ("int", "long int", "short int", and "char") define this as the
+# local compiler.  Otherwise, you need look for the uses of LOCAL_CC below,
+# and handle those cases manually.
 
 LOCAL_CC = $(CC)
 
@@ -103,6 +105,4 @@ gmp-mparam.h: cre-mparam
 cre-mparam: cre-mparam.c stamp-stddefh gmp.h
        $(LOCAL_CC) $(CFLAGS) cre-mparam.c -o $@
 
-/* OK, this is my own idea again: */
-
-CDependTarget( $(IMPL_SRCS) $(MPZ_SRCS) $(MPQ_SRCS) $(MPN_SRCS) )
+include $(TOP)/mk/lib.mk