Tue Dec 12 19:23:34 CET 2006 Paolo Molaro <lupus@ximian.com>
[mono.git] / mcs / ilasm / Makefile
index 0edc068b6a13146bfd112e81a3c223ddef9a440b..7df9413c4e247975b6eb6e4e412f146b6e7e7f40 100644 (file)
@@ -2,9 +2,9 @@ thisdir = ilasm
 SUBDIRS =
 include ../build/rules.make
 
-PROGRAM = ilasm.exe
+PROGRAM = $(topdir)/class/lib/$(PROFILE)/ilasm.exe
 BUILT_SOURCES = ILParser.cs
-LOCAL_MCS_FLAGS = /lib:../class/lib/ /r:PEAPI.dll
+LOCAL_MCS_FLAGS = /lib:../class/lib/$(PROFILE) /r:../class/lib/$(PROFILE)/PEAPI.dll /r:Mono.CompilerServices.SymbolWriter.dll /r:Mono.Security.dll
 
 CLEAN_FILES = parser/y.output
 
@@ -19,3 +19,11 @@ ILParser.cs: parser/ILParser.jay $(topdir)/jay/skeleton.cs
        $(topdir)/jay/jay -ct < $(topdir)/jay/skeleton.cs $< >$@
 
 include ../build/executable.make
+
+ifeq (default, $(PROFILE))
+# Utility rule to make debugging somewhat easier.
+all-local: ilasm.exe
+ilasm.exe: $(PROGRAM)
+       cp -p $< $@
+       test ! -f $<.mdb || cp -p $<.mdb $@.mdb
+endif