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 target is 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: tmpinst-dir tmpinst-basic-build tmpinst-short-build tmpinst-full-build
28 .PHONY: bootstrap faststrap fasterstrap one-stage-strap two-stage-strap three-stage-strap bootstrap-clean bootstrap-check
29 .PHONY: mono-do-basic-build 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 bootstrap: three-stage-strap
39 faststrap: mono-do-basic-build
40 $(MAKE) two-stage-strap
42 fasterstrap: mono-do-basic-build
43 $(MAKE) one-stage-strap
45 three-stage-strap: tmpinst-basic-build
46 $(MAKE) two-stage-strap
48 two-stage-strap: tmpinst-short-build
49 $(MAKE) one-stage-strap
51 one-stage-strap: tmpinst-full-build
52 rm -f $(top_srcdir)/runtime/*/*.dll $(top_srcdir)/runtime/*.exe
55 bootstrap-clean: clean mcs-do-clean-profiles
56 bootstrap-check: check mcs-do-run-test
58 # (takes advantage of 'make -j': independent subtasks are separate dependencies)
59 tmpinst-basic-build: mcs-do-basic-build mono-do-basic-build tmpinst-dir
60 mv -f $(mcs_topdir)/mcs/mcs.exe \
61 $(mcs_topdir)/class/lib/default/mscorlib.dll \
62 $(mcs_topdir)/class/lib/default/System.dll \
65 tmpinst-short-build: mcs-do-short-build
66 mv -f $(mcs_topdir)/mcs/mcs.exe \
67 $(mcs_topdir)/class/lib/default/mscorlib.dll \
68 $(mcs_topdir)/class/lib/default/System.dll \
69 $(mcs_topdir)/class/lib/default/System.Xml.dll \
70 $(mcs_topdir)/class/lib/default/Mono.CSharp.Debugger.dll \
73 tmpinst-full-build: mcs-do-full-build
74 cp -f $(mcs_topdir)/mcs/mcs.exe \
75 $(mcs_topdir)/class/lib/default/mscorlib.dll \
76 $(mcs_topdir)/class/lib/default/System.dll \
77 $(mcs_topdir)/class/lib/default/System.Xml.dll \
78 $(mcs_topdir)/class/lib/default/Mono.CSharp.Debugger.dll \
81 # Build enough of 'mono' to run the stage1 mcs.exe
82 mono-do-basic-build: $(CONFIG_HEADER)
83 if test -z "$(libgc_dir)"; then :; else cd libgc && $(MAKE) ; fi
86 # Build stripped down versions of 'mcs', 'mscorlib.dll' and 'System.dll' with installed 'mcs'
87 ## remove System.Xml.dll since it's a soft-dependency of System.dll
89 rm -f $(mcs_topdir)/mcs/mcs.exe $(mcs_topdir)/class/lib/default/mscorlib.dll
90 rm -f $(mcs_topdir)/class/lib/default/System.dll $(mcs_topdir)/class/lib/default/System.Xml.dll
91 cd $(mcs_topdir)/jay && $(MAKE)
92 cd $(mcs_topdir)/mcs && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
93 cd $(mcs_topdir)/class/corlib && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
94 cd $(mcs_topdir)/class/System && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
97 tmpinst=`cd _tmpinst && pwd` ; \
98 PATH=$$tmpinst/bin:$$PATH; export PATH ; \
99 for dir in jay mcs class/corlib class/System class/System.XML class/System class/Mono.CSharp.Debugger; do \
100 (cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default) || exit 1 ; \
104 tmpinst=`cd _tmpinst && pwd` ; \
105 PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
106 cd $(mcs_topdir) && $(MAKE) all-profiles
108 mcs-do-clean-profiles:
109 cd $(mcs_topdir) && $(MAKE) clean-profiles
111 mcs-do-run-test: tmpinst-dir
112 tmpinst=`cd _tmpinst && pwd` ; \
113 PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
114 cd $(mcs_topdir) && $(MAKE) PROFILE=default run-test
116 tmpinst-dir.stamp: Makefile.am
118 rootme=`pwd`; tmpinst=$$rootme/_tmpinst ; \
119 mkdir -p $$tmpinst $$tmpinst/bin $$tmpinst/lib ; \
120 echo '#! /bin/sh' > $$tmpinst/bin/mono ; \
121 echo 'if test -z "$$MONO_PATH" ; then MONO_PATH="'"$$tmpinst/lib"'"' >> $$tmpinst/bin/mono ; \
122 echo 'else MONO_PATH=$${MONO_PATH}:"'"$$tmpinst/lib"'" ; fi' >> $$tmpinst/bin/mono ; \
123 echo 'export MONO_PATH' >> $$tmpinst/bin/mono ; \
124 echo 'exec "'"$$rootme/libtool"'" --mode=execute "'"$$rootme/$(mono_runtime)"'" "$$@"' >> $$tmpinst/bin/mono ; \
125 echo '#! /bin/sh' > $$tmpinst/bin/mcs ; \
126 echo 'exec "'"$$tmpinst/bin/mono"'" "'"$$tmpinst/lib/mcs.exe"'" "$$@"' >> $$tmpinst/bin/mcs ; \
127 chmod +x $$tmpinst/bin/mono $$tmpinst/bin/mcs
130 tmpinst-dir: tmpinst-dir.stamp
131 @if test -d _tmpinst; then :; else rm -f tmpinst-dir.stamp; $(MAKE) tmpinst-dir.stamp; fi
134 # building with monolite
137 wget -O $(srcdir)/../monolite-latest.tar.gz http://www.go-mono.com/daily/monolite-latest.tar.gz
139 tmpinst-monolite: tmpinst-dir
140 -rm -f _tmpinst/lib/mcs.exe _tmpinst/lib/*.dll
141 -rm -fr _tmpinst/monolite-*
142 srcdir=`cd $(srcdir) && pwd` && cd _tmpinst && ( gzip -d -c $$srcdir/../monolite-latest.tar.gz | tar xf - )
143 mv -f _tmpinst/monolite-*/mcs.exe _tmpinst/monolite-*/*.dll _tmpinst/lib
144 rm -fr _tmpinst/monolite-*
146 monolite-bootstrap: tmpinst-monolite mono-do-basic-build
147 rm -f $(mcs_topdir)/mcs/mcs.exe $(mcs_topdir)/class/lib/default/mscorlib.dll
148 rm -f $(mcs_topdir)/class/lib/default/System.dll $(mcs_topdir)/class/lib/default/System.Xml.dll Mono.CSharp.Debugger.dll
149 $(MAKE) two-stage-strap
151 # Obsolete target -- don't use.
155 echo "*** 'fullbuild' is an obsolete target. Use 'make bootstrap && make install'."
159 wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
160 wget http://www.go-mono.com/archive/glib-2.0.4-20020703.zip
161 wget http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip
162 wget http://www.go-mono.com/archive/libiconv-1.7.zip
163 wget http://www.go-mono.com/archive/libiconv-dev-1.7.zip
164 wget http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip
165 wget http://www.jroith.de/nsis4cygwin.zip
166 unzip -n -d / pkgconfig-0.11-20020310.zip
167 unzip -n -d / glib-2.0.4-20020703.zip
168 unzip -n -d / glib-dev-2.0.4-20020703.zip
169 unzip -n -d / libiconv-1.7.zip
170 unzip -n -d / libiconv-dev-1.7.zip
171 unzip -n -d / libintl-0.10.40-20020101.zip
172 unzip -n -d / nsis4cygwin.zip
175 makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi