X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fdotnet%2FMakefile;fp=rts%2Fdotnet%2FMakefile;h=95b6c3889056d13de0addda3c29b70c531853c86;hb=0065d5ab628975892cea1ec7303f968c3338cbe1;hp=0000000000000000000000000000000000000000;hpb=28a464a75e14cece5db40f2765a29348273ff2d2;p=ghc-hetmet.git diff --git a/rts/dotnet/Makefile b/rts/dotnet/Makefile new file mode 100644 index 0000000..95b6c38 --- /dev/null +++ b/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