1 AUTOMAKE_OPTIONS = foreign
3 SUBDIRS = @libgc_dir@ mono @ikvm_jni_dir@ docs runtime scripts man data samples support web
5 # Keep in sync with SUBDIRS
6 ## 'tools' is not normally built
7 DIST_SUBDIRS = libgc mono ikvm-jni docs runtime scripts man data samples support web tools
9 EXTRA_DIST= mono.pc.in mono.spec.in mint.pc.in
11 pkgconfigdir = $(libdir)/pkgconfig
13 pkgconfig_DATA= mono.pc mint.pc
15 pkgconfig_DATA= mint.pc
17 DISTCLEANFILES= mono.pc mint.pc
20 # The following targets are used to compile and install
21 # mono and mcs without running into the out-of-sync
22 # problems by doing the compilation in the right order.
25 mcs_topdir=$(top_srcdir)/../mcs
27 .PHONY: bootstrap faststrap fasterstrap bootstrap-clean bootstrap-check get-monolite-latest monolite-bootstrap
28 .PHONY: tmpinst-dir tmpinst-mcs-basic-build tmpinst-mcs-short-build tmpinst-mcs-full-build tmpinst-monolite
29 .PHONY: mono-do-runtime-only mcs-do-basic-build mcs-do-short-build mcs-do-full-build mcs-do-clean-profiles mcs-do-run-test
32 mono_runtime = mono/mini/mono
34 mono_runtime = mono/interpreter/mint
37 # Minimal set of directories to build, and files used to run the 'mcs' compiler
38 MCS_BASIC_DIRS = jay mcs class/corlib class/System
40 $(mcs_topdir)/mcs/mcs.exe \
41 $(mcs_topdir)/class/lib/default/mscorlib.dll \
42 $(mcs_topdir)/class/lib/default/System.dll
44 # Set of directories and files the 'mcs' compiler can use
45 ## We build class/System twice to resolve the cyclic dependency of class/System.XML
46 MCS_DIRS = $(MCS_BASIC_DIRS) class/System.XML class/System class/Mono.CSharp.Debugger
47 MCS_FILES = $(MCS_BASIC_FILES) \
48 $(mcs_topdir)/class/lib/default/System.Xml.dll \
49 $(mcs_topdir)/class/lib/default/Mono.CSharp.Debugger.dll
53 bootstrap: tmpinst-mcs-basic-build mono-do-runtime-only
54 $(MAKE) tmpinst-mcs-short-build
57 faststrap: tmpinst-mcs-short-build
58 $(MAKE) mono-do-runtime-only
61 fasterstrap: tmpinst-mcs-full-build
62 rm -f $(top_srcdir)/runtime/*/*.dll $(top_srcdir)/runtime/*.exe
65 bootstrap-clean: clean mcs-do-clean-profiles
66 bootstrap-check: check mcs-do-run-test
68 # building with monolite
71 wget -O $(srcdir)/../monolite-latest.tar.gz http://www.go-mono.com/daily/monolite-latest.tar.gz
73 monolite-bootstrap: tmpinst-monolite mono-do-runtime-only
75 $(MAKE) tmpinst-mcs-short-build
80 tmpinst-mcs-basic-build: mcs-do-basic-build tmpinst-dir
81 mv -f $(MCS_BASIC_FILES) $(tmpinst)/lib
83 tmpinst-mcs-short-build: mcs-do-short-build
84 mv -f $(MCS_FILES) $(tmpinst)/lib
86 tmpinst-mcs-full-build: mcs-do-full-build
87 cp -f $(MCS_FILES) $(tmpinst)/lib
89 tmpinst-monolite: tmpinst-dir
90 -rm -f $(tmpinst)/lib/mcs.exe $(tmpinst)/lib/*.dll
91 -rm -fr $(tmpinst)/monolite-*
92 srcdir=`cd $(srcdir) && pwd` && cd $(tmpinst) && ( gzip -d -c $$srcdir/../monolite-latest.tar.gz | tar xf - )
93 mv -f $(tmpinst)/monolite-*/mcs.exe $(tmpinst)/monolite-*/*.dll $(tmpinst)/lib
94 rm -fr $(tmpinst)/monolite-*
96 # Build enough of 'mono' to run the stage1 mcs.exe
97 mono-do-runtime-only: $(CONFIG_HEADER)
98 for dir in $(libgc_dir) mono data; do \
99 (cd $$dir && $(MAKE)) || exit 1 ; \
104 for dir in $(MCS_BASIC_DIRS); do \
105 (cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default USE_BOOT_COMPILE=yes BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB") || exit 1 ; \
109 tmpinst=`cd $(tmpinst) && pwd` ; \
110 PATH=$$tmpinst/bin:$$PATH; export PATH ; \
111 for dir in $(MCS_DIRS); do \
112 (cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default) || exit 1 ; \
116 tmpinst=`cd $(tmpinst) && pwd` ; \
117 PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
118 cd $(mcs_topdir) && $(MAKE) all-profiles
120 mcs-do-clean-profiles:
121 cd $(mcs_topdir) && $(MAKE) clean-profiles
123 mcs-do-run-test: tmpinst-dir
124 tmpinst=`cd $(tmpinst) && pwd` ; \
125 PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
126 cd $(mcs_topdir) && $(MAKE) PROFILE=default run-test
129 mkdir -p $(tmpinst) $(tmpinst)/bin $(tmpinst)/lib $(tmpinst)/etc/mono
130 $(MAKE) $(tmpinst)/bin/mono $(tmpinst)/bin/mcs $(tmpinst)/etc/mono/machine.config
132 $(tmpinst)/bin/mono: $(srcdir)/Makefile.am
133 echo '#! /bin/sh' > $@
134 echo 'builddir="'`pwd`'"; tmpinst=$$builddir/$(tmpinst)' >> $@
135 echo 'if test -z "$$MONO_PATH" ; then MONO_PATH=$$tmpinst/lib; else MONO_PATH=$${MONO_PATH}:$$tmpinst/lib ; fi' >> $@
136 echo 'MONO_CFG_DIR=$$tmpinst/etc' >> $@
137 echo 'export MONO_PATH MONO_CFG_DIR' >> $@
138 echo 'exec "$$builddir/libtool" --mode=execute "$$builddir/$(mono_runtime)" --config "$$builddir/data/config" "$$@"' >> $@
141 $(tmpinst)/bin/mcs: $(srcdir)/Makefile.am
142 (t=`cd $(tmpinst) && pwd`; echo '#! /bin/sh'; echo 'exec "'"$$t/bin/mono"'" "'"$$t/lib/mcs.exe"'" "$$@"') > $@
145 $(tmpinst)/etc/mono/machine.config: $(srcdir)/data/machine.config
147 srcdir=`cd $(srcdir) && pwd`; cd $(tmpinst)/etc/mono && $(LN_S) $$srcdir/data/machine.config machine.config
149 # Obsolete target -- don't use.
153 echo "*** 'fullbuild' is an obsolete target. Use 'make bootstrap && make install'."
157 wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
158 wget http://www.go-mono.com/archive/glib-2.0.4-20020703.zip
159 wget http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip
160 wget http://www.go-mono.com/archive/libiconv-1.7.zip
161 wget http://www.go-mono.com/archive/libiconv-dev-1.7.zip
162 wget http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip
163 wget http://www.jroith.de/nsis4cygwin.zip
164 unzip -n -d / pkgconfig-0.11-20020310.zip
165 unzip -n -d / glib-2.0.4-20020703.zip
166 unzip -n -d / glib-dev-2.0.4-20020703.zip
167 unzip -n -d / libiconv-1.7.zip
168 unzip -n -d / libiconv-dev-1.7.zip
169 unzip -n -d / libintl-0.10.40-20020101.zip
170 unzip -n -d / nsis4cygwin.zip
173 makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi