48d76e7d59717db53290897042c342920fb6e37a
[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 ifeq (net_2_0, $(PROFILE))
14 mcs_exe = $(the_libdir)/gmcs.exe
15 else ifeq (net_4_0, $(PROFILE))
16 mcs_exe = $(the_libdir)/dmcs.exe
17 endif
18
19 mcs_aot_image = $(mcs_exe)$(PLATFORM_AOT_SUFFIX)
20
21 mscorlib_dll = $(the_libdir)/mscorlib.dll
22 mscorlib_aot_image = $(mscorlib_dll)$(PLATFORM_AOT_SUFFIX)
23
24 PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
25 LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
26
27 ifdef PLATFORM_AOT_SUFFIX
28 Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";)
29 $(mcs_aot_image): $(mcs_exe)
30         $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version --debug $(mcs_exe)
31
32 $(mscorlib_aot_image): $(mscorlib_dll)
33         $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version --debug $(mscorlib_dll)
34
35 ifeq (net_2_0, $(PROFILE))
36 all-local: $(mscorlib_aot_image) $(mcs_aot_image)
37 endif
38
39 ifeq (net_4_0, $(PROFILE))
40 all-local: $(mscorlib_aot_image) $(mcs_aot_image)
41 endif
42
43 clean-local:
44         -rm -f $(mscorlib_aot_image) $(mcs_aot_image)
45
46 install-local:
47         $(MKINSTALLDIRS) $(DESTDIR)$(LIBRARY_INSTALL_DIR)
48         $(INSTALL_LIB) $(mscorlib_aot_image) $(DESTDIR)$(LIBRARY_INSTALL_DIR)
49         $(INSTALL_LIB) $(mcs_aot_image) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
50
51 endif
52
53 dist-local: