2007-08-03 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / tools / tuner / Makefile
1 thisdir = tools/tuner
2 SUBDIRS =
3 include ../../build/rules.make
4
5 LINKER = ../linker/monolinker.exe
6 MASTER_INFOS_ZIP = http://mono.ximian.com/masterinfos/masterinfo-sl11a-refresh.zip
7
8 LINKER_PLUGINS = \
9         Mono.Tuner/PrintStatus.dll      \
10         Mono.Tuner/RemoveSerialization.dll      \
11         Mono.Tuner/CheckVisibility.dll  \
12 #       Mono.Tuner/InjectAttributes.dll \
13
14 LOCAL_MCS_FLAGS = -r:$(LINKER) -r:Mono.Cecil.dll
15
16 LINKER_SOURCES = $(LINKER_PLUGINS:.dll=.cs)
17
18 DISTFILES = README $(LINKER_SOURCES)
19
20 ifneq (net_2_1, $(PROFILE))
21 all-local: $(LINKER_PLUGINS)
22
23 install-local:
24
25 clean-local:
26         rm -f Mono.Tuner/*.dll
27         rm -f Mono.Tuner/*.mdb
28         rm -f Mono.Tuner/*.pdb
29
30 else
31 all-local: tune
32
33 install-local:
34
35 clean-local:
36         rm -rf masterinfos*
37 endif
38
39 uninstall-local:
40
41 dist-local: dist-default
42
43 test-local:
44
45 run-test-local run-test-ondotnet-local:
46
47 WORKING_DIR = $(topdir)/class/lib/net_2_1
48
49 masterinfos/silverlight.infos:
50         wget -O masterinfos.zip $(MASTER_INFOS_ZIP)
51         unzip masterinfos.zip
52
53 MCS_MASTER_INFOS =      \
54         masterinfos/silverlight/mscorlib.info   \
55         masterinfos/silverlight/System.info             \
56         masterinfos/silverlight/System.Core.info        \
57         masterinfos/silverlight/System.Xml.Core.info    \
58
59 LINKER_FLAGS = -d $(WORKING_DIR) -o $(WORKING_DIR) -l none -c link -a smcs
60 LINKER_STEPS = \
61         Mono.Tuner.PrintStatus,PrintStatus:OutputStep   \
62         Mono.Tuner.RemoveSerialization,RemoveSerialization:OutputStep   \
63         Mono.Tuner.CheckVisibility,CheckVisibility      \
64
65 tune: masterinfos/silverlight.infos
66         MONO_PATH="Mono.Tuner$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(LINKER) $(LINKER_FLAGS) $(LINKER_STEPS:%=-s %) $(MCS_MASTER_INFOS:%=-i %)
67
68 %.dll: %.cs
69         $(CSCOMPILE) /t:library $^