#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.67 2001/07/24 10:28:51 simonmar Exp $
+# $Id: Makefile,v 1.68 2001/08/04 06:09:24 ken Exp $
#
TOP=..
endif
SRC_HC_OPTS += -DWANT_PRETTY
+SRC_HC_OPTS += $(filter -D% -U%,$(GhcRtsCcOpts))
all :: package.conf package.conf.inplace
#include "../includes/config.h"
+#include "../includes/Derived.h"
module Main (main) where
then [ "$libdir" ]
else [ ghc_src_dir cGHC_RUNTIME_DIR ],
hs_libraries = [ "HSrts" ],
-#ifndef mingw32_TARGET_OS
- extra_libraries = [ "m" ], -- libm, that is, for ldexp()
-#else
- extra_libraries = [ "winmm", "wsock32" ], -- winmm for the threadDelay timer, wsock32 for the linker
+ extra_libraries =
+ "m": -- for ldexp()
+#ifdef mingw32_TARGET_OS
+ "winmm": -- for the threadDelay timer
+ "wsock32": -- for the linker
+#endif
+#ifdef USING_LIBBFD
+ "bfd": "iberty": -- for debugging
#endif
+ [],
include_dirs = if installing
then [ "$libdir/include"
#ifdef mingw32_TARGET_OS
/* -----------------------------------------------------------------------------
- * $Id: Derived.h,v 1.1 2001/07/26 03:08:39 ken Exp $
+ * $Id: Derived.h,v 1.2 2001/08/04 06:09:24 ken Exp $
*
* (c) The GHC Team, 1998-2001
*
#define SUPPORT_LONG_LONGS 1
#endif
+/*
+ * Whether the runtime system will use libbfd for debugging purposes.
+ */
+#if defined(DEBUG) && defined(HAVE_BFD_H) && !defined(_WIN32) && !defined(PAR) && !defined(GRAN)
+#define USING_LIBBFD 1
+#endif
+
#endif /* DERIVED_H */
/* -----------------------------------------------------------------------------
- * $Id: Printer.c,v 1.42 2001/07/24 06:31:36 ken Exp $
+ * $Id: Printer.c,v 1.43 2001/08/04 06:09:24 ken Exp $
*
* (c) The GHC Team, 1994-2000.
*
/* Causing linking trouble on Win32 plats, so I'm
disabling this for now.
*/
-#if defined(HAVE_BFD_H) && !defined(_WIN32) && !defined(PAR) && !defined(GRAN)
+#ifdef USING_LIBBFD
#include <bfd.h>