[project @ 2001-07-31 16:41:32 by simonmar]
authorsimonmar <unknown>
Tue, 31 Jul 2001 16:41:32 +0000 (16:41 +0000)
committersimonmar <unknown>
Tue, 31 Jul 2001 16:41:32 +0000 (16:41 +0000)
Add the template package config, and move some of the makefile code
out into ../mk/target.mk.

Makefile
core.conf.in [new file with mode: 0644]

index 25c14b5..00f0d21 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,11 @@
 # -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.3 2001/07/04 10:48:16 simonmar Exp $
+# $Id: Makefile,v 1.4 2001/07/31 16:41:32 simonmar Exp $
 
-TOP=../..
+TOP=..
 include $(TOP)/mk/boilerplate.mk
 
+# -----------------------------------------------------------------------------
+
 ifeq "$(way)" ""
 SUBDIRS = cbits
 else
@@ -33,16 +35,7 @@ ALL_DIRS = \
        Text \
        Text/Show
 
-PRE_SRCS += $(wildcard $(patsubst %, %/*.hsc, $(ALL_DIRS)))
-SRC_HSC2HS_OPTS += -Iinclude -I.
-
-ALL_HS_SRCS = $(wildcard $(patsubst %, %/*.hs, . $(ALL_DIRS)))
-ALL_LHS_SRCS += $(wildcard GHC/*.lhs)
-ALL_HS_OBJS = $(patsubst %.hs, %.o, $(ALL_HS_SRCS)) \
-       $(patsubst %.lhs, %.o, $(ALL_LHS_SRCS))
-ALL_HS_HIS = $(patsubst %.o, %.hi, $(ALL_HS_OBJS))
-
-srcs : $(HS_SRCS) GHC/Prim.$(way_)hi
+PKG=core
 
 # dependencies between .hsc files
 GHC/IO.hs : GHC/Handle.hs
@@ -50,25 +43,9 @@ GHC/IO.hs : GHC/Handle.hs
 GHC/Prim.$(way_)hi : GHC/Prim.hi-boot
        cp $< $@
 
-SRC_HC_OPTS += -cpp -fglasgow-exts -fvia-C -I$(FPTOOLS_TOP)/ghc/includes -Iinclude -package-name core -H128m $(GhcLibHcOpts)
-
-LIBNAME = libHScore$(_way).a
-
-CLEAN_FILES += $(ALL_HS_OBJS) $(ALL_HS_HIS)
+lib : GHC/Prim.$(way_)hi
 
-all :: $(LIBNAME)
-
-lib : srcs
-       $(GHC_INPLACE) $(HC_OPTS) --make $(ALL_HS_SRCS) $(ALL_LHS_SRCS)
-
-$(LIBNAME) : lib
-       $(RM) $@
-       $(AR) $(AR_OPTS) $@ $(ALL_HS_OBJS)
-       $(RANLIB) $@
-
-%.o : %.hs
-       $(GHC_INPLACE) $(HC_OPTS) --make $<
-%.o : %.lhs
-       $(GHC_INPLACE) $(HC_OPTS) --make $<
+# -----------------------------------------------------------------------------
 
 include $(TOP)/mk/target.mk
+
diff --git a/core.conf.in b/core.conf.in
new file mode 100644 (file)
index 0000000..04553e5
--- /dev/null
@@ -0,0 +1,33 @@
+#include "config.h"
+
+Package {
+        name           = "core",
+#ifdef INSTALLING
+       import_dirs    = [ "$libdir/imports/core" ]
+#else
+       import_dirs    = [ "$libdir/libraries/core" ],
+#endif
+        source_dirs    = [],
+#ifdef INSTALLING
+        library_dirs   = [ "$libdir" ]
+#else
+        library_dirs   = [ "$libdir/libraries/core"
+                         , "$libdir/libraries/core/cbits" ],
+#endif
+        hs_libraries      = [ "HScore" ],
+       extra_libraries   = [ "HScore_cbits"
+#ifdef mingw32_TARGET_OS
+                            , "wsock32", "msvcrt"
+#endif
+                           ],
+#ifdef INSTALLING
+        include_dirs   = []
+#else
+        include_dirs   = [ "$libdir/libraries/core/include" ],
+#endif
+        c_includes     = [ "HsCore.h" ],
+        package_deps   = [ "rts" ],
+        extra_ghc_opts = [],
+        extra_cc_opts  = [],
+        extra_ld_opts  = []
+}