package/mono: fixing shared/static handling
[buildroot-gz.git] / package / mono / mono.mk
blob3d50ac13cff46be60be1d6993fdf7842eed865d3
1 #############################################################
3 # mono
5 #############################################################
7 MONO_VERSION = 3.10.0
8 MONO_SITE = http://download.mono-project.com/sources/mono/
9 MONO_SOURCE = mono-$(MONO_VERSION).tar.bz2
10 MONO_LICENSE = GPLv2 or MIT (compiler, tools), LGPLv2 (runtime libs), MIT (class libs) or commercial
11 MONO_LICENSE_FILES = LICENSE COPYING.LIB mcs/COPYING.LIB mcs/COPYING \
12 eglib/COPYING external/Newtonsoft.Json/Tools/7-zip/copying.txt
13 MONO_INSTALL_STAGING = YES
15 ## Mono native
17 # patching configure.ac
18 MONO_AUTORECONF = YES
20 # Disable managed code (mcs folder) from building
21 MONO_CONF_OPTS = --disable-gtk-doc \
22 --with-mcs-docs=no \
23 --with-moonlight=no \
24 --disable-libraries \
25 --with-ikvm-native=no \
26 --enable-minimal=aot,profiler,debug \
27 --disable-mcs-build \
28 --enable-static
30 # The libraries have been built by the host-mono build. Since they are
31 # architecture-independent, we simply copy them to the target.
32 define MONO_INSTALL_LIBS
33 rsync -av --exclude=*.so --exclude=*.mdb \
34 $(HOST_DIR)/usr/lib/mono $(TARGET_DIR)/usr/lib/
35 rsync -av $(HOST_DIR)/etc/mono $(TARGET_DIR)/etc
36 endef
38 MONO_POST_INSTALL_TARGET_HOOKS += MONO_INSTALL_LIBS
40 MONO_DEPENDENCIES += host-mono
42 ## Mono managed
44 HOST_MONO_CONF_OPTS = --disable-gtk-doc \
45 --with-mcs-docs=no \
46 --with-moonlight=no \
47 --disable-libraries \
48 --with-ikvm-native=no \
49 --enable-minimal=aot,profiler,debug \
50 --enable-static
52 # These options refer to the target mono, not the host. We use the host
53 # only to compile libraries, then we copy them to the target.
54 HOST_MONO_CONF_OPTS += \
55 --with-profile2=$(if $(BR2_PACKAGE_MONO_20),yes,no) \
56 --with-profile4=$(if $(BR2_PACKAGE_MONO_40),yes,no) \
57 --with-profile4_5=$(if $(BR2_PACKAGE_MONO_45),yes,no)
59 # ensure monolite is used
60 HOST_MONO_MAKE_OPTS += EXTERNAL_MCS=false
62 HOST_MONO_DEPENDENCIES = host-monolite host-gettext
64 define HOST_MONO_SETUP_MONOLITE
65 rm -rf $(@D)/mcs/class/lib/monolite
66 (cd $(@D)/mcs/class/lib; ln -s $(HOST_DIR)/usr/lib/monolite monolite)
67 endef
69 HOST_MONO_POST_CONFIGURE_HOOKS += HOST_MONO_SETUP_MONOLITE
71 $(eval $(autotools-package))
72 $(eval $(host-autotools-package))