summaryrefslogtreecommitdiff
path: root/ghc/rts/dotnet/Makefile
diff options
context:
space:
mode:
authorsof <unknown>2003-05-29 14:39:31 +0000
committersof <unknown>2003-05-29 14:39:31 +0000
commita7d8f43718b167689c0a4a4c23b33a325e0239f1 (patch)
tree5da294fb5b8f5ad147c498115df6a024887cdeea /ghc/rts/dotnet/Makefile
parentc4282406d8cf94962f41ebd7eaa7abf4ee23ac7d (diff)
downloadhaskell-a7d8f43718b167689c0a4a4c23b33a325e0239f1.tar.gz
[project @ 2003-05-29 14:39:26 by sof]
Support for interop'ing with .NET via FFI declarations along the lines of what Hugs98.NET offers, see http://haskell.org/pipermail/cvs-hugs/2003-March/001723.html for FFI decl details. To enable, configure with --enable-dotnet + have a look in ghc/rts/dotnet/Makefile for details of what tools are needed to build the .NET interop layer (tools from VS.NET / Framework SDK.) The commit doesn't include some library additions + wider-scale testing is required before this extension can be regarded as available for general use. 'foreign import dotnet' is currently only supported by the C backend.
Diffstat (limited to 'ghc/rts/dotnet/Makefile')
-rw-r--r--ghc/rts/dotnet/Makefile53
1 files changed, 53 insertions, 0 deletions
diff --git a/ghc/rts/dotnet/Makefile b/ghc/rts/dotnet/Makefile
new file mode 100644
index 0000000000..95b6c38890
--- /dev/null
+++ b/ghc/rts/dotnet/Makefile
@@ -0,0 +1,53 @@
+#
+# .NET interop for GHC.
+#
+# (c) 2003, sof.
+#
+TOP=../..
+include $(TOP)/mk/boilerplate.mk
+
+all :: Invoker.dll Invoke.o
+
+#
+# To compile the dotnet interop bits, you need to have the
+# .NET Framework SDK or VS.NET installed. The following
+# apps are used:
+#
+MCPP=cl
+TLBEXP=tlbexp
+REGASM=regasm
+GACUTIL=gacutil
+
+Invoker.dll : Invoker.obj
+ $(MCPP) /LD /clr /o Invoker.dll Invoker.obj
+ $(TLBEXP) Invoker.dll
+ $(REGASM) Invoker.dll
+ $(GACUTIL) /i Invoker.dll
+
+Invoker.obj : Invoker.cpp Invoker.h
+ $(MCPP) /LD /clr /c Invoker.cpp
+
+CLEAN_FILES += $(wildcard *.obj *.dll *.tlb)
+
+# ToDo:
+# - switch to /ir (i.e., copy it into the GAC.)
+# - sort out installation story.
+
+# drop the assembly
+remove :
+ $(GACUTIL) /u Invoker
+
+#
+# NOTE: For DotnetCc a version of gcc later than gcc-2.95 is
+# required (I'm using the gcc-3.2 snapshot that comes with mingw-2)
+#
+ifeq "$(DotnetCc)" ""
+DotnetCc=$(CC)
+endif
+DotnetCcOpts=$(CC_OPTS) $(DOTNET_EXTRA_CC_OPTS)
+SRC_CC_OPTS += -I$(TOP)/includes
+
+Invoke.o : Invoke.c
+ $(DotnetCc) $(DotnetCcOpts) -c $< -o $@
+
+include $(TOP)/mk/target.mk