Add a new directory which is used for AOTing the c# compiler before compiling most...
[mono.git] / mcs / class / aot-compiler / Makefile
1 #
2 # This directory is used to AOT the C# compiler to speed up the rest of the class libs build
3 # It should be run after the assemblies the compiler depends on have been compiled, since
4 # the AOT image has a dependency on the exact assembly versions used to produce it.
5 #
6
7 thisdir = class/aot-compiler
8
9 include ../../build/rules.make
10
11 the_libdir = $(topdir)/class/lib/$(PROFILE)/
12
13 # The 2.0 profile uses mcs/gmcs.exe instead of lib/net_2_0/gmcs.exe
14 ifeq (net_2_0, $(PROFILE))
15 mcs_exe = $(topdir)/mcs/gmcs.exe
16 else ifeq (net_4_0, $(PROFILE))
17 mcs_exe = $(topdir)/class/lib/$(PROFILE)/dmcs.exe
18 endif
19
20 mcs_aot_image = $(mcs_exe)$(PLATFORM_AOT_SUFFIX)
21
22 ifdef PLATFORM_AOT_SUFFIX
23 Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";)
24 $(mcs_aot_image): $(mcs_exe)
25         $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version --debug $(mcs_exe)
26
27 ifeq (net_2_0, $(PROFILE))
28 all-local: $(mcs_aot_image)
29 endif
30
31 ifeq (net_4_0, $(PROFILE))
32 all-local: $(mcs_aot_image)
33 endif
34
35 endif