1 ACLOCAL_AMFLAGS = -I m4
3 AM_CFLAGS = $(WERROR_CFLAGS)
5 MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
7 # Some tools might not build when cross-compiling
14 SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests llvm
15 # Keep in sync with SUBDIRS
16 DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests llvm
18 all: update_submodules
20 SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
22 @$(srcdir)/scripts/update_submodules.sh
24 .PHONY: update_submodules
31 mono-uninstalled.pc.in \
35 mcs/class/referencesource
37 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
39 # Distribute the 'mcs' tree too
40 GIT_DIR ?= $(srcdir)/.git
42 test -d $(distdir)/mcs || mkdir $(distdir)/mcs
43 d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
44 rm -rf `find $(top_distdir)/external -path '*\.git'`
45 rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
46 rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
49 external/bockbuild/bb MacSDK --package
51 pkgconfigdir = $(libdir)/pkgconfig
52 noinst_DATA = mono-uninstalled.pc
53 DISTCLEANFILES= mono-uninstalled.pc
55 # building with monolite
56 mcslib = $(mcs_topdir)/class/lib
57 monolite_url = https://download.mono-project.com/monolite/monolite-$(MONO_CORLIB_VERSION)-latest.tar.gz
58 .PHONY: get-monolite-latest
60 -rm -fr $(mcslib)/monolite/$(MONO_CORLIB_VERSION)
61 -mkdir -p $(mcslib)/monolite
62 cd $(mcslib) && { (wget -O- $(monolite_url) || curl -L $(monolite_url)) | gzip -d | tar xf - ; }
63 cd $(mcslib) && mv -f monolite-* monolite/$(MONO_CORLIB_VERSION)
71 MONO_LLVMONLY=$(BITCODE_CHECK) $(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
73 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
74 validate: do-build-mono-mcs
76 do-build-mono-mcs: mcs-do-clean
79 cd runtime && $(MAKE) clean-local
80 cd mono/tests && $(MAKE) clean
82 cd runtime && $(MAKE) check-local
83 cd mono/tests && $(MAKE) check
85 .PHONY: compiler-tests mcs-do-compiler-tests
87 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
88 mcs-do-compiler-tests:
89 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
91 .PHONY: bootstrap-world
92 bootstrap-world: compiler-tests
96 monotouch-do-build: config.h
97 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
99 xmono ) target="monotouch-do-build";; \
102 echo "Making $$target in $$subdir"; \
103 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
105 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
108 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
109 case "x$$subdir" in \
110 xmono ) target="monotouch-do-clean";; \
111 * ) target="clean";; \
113 echo "Making $$target in $$subdir"; \
114 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
116 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
121 wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
122 wget http://www.go-mono.com/archive/glib-2.0.4-20020703.zip
123 wget http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip
124 wget http://www.go-mono.com/archive/libiconv-1.7.zip
125 wget http://www.go-mono.com/archive/libiconv-dev-1.7.zip
126 wget http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip
127 unzip -n -d / pkgconfig-0.11-20020310.zip
128 unzip -n -d / glib-2.0.4-20020703.zip
129 unzip -n -d / glib-dev-2.0.4-20020703.zip
130 unzip -n -d / libiconv-1.7.zip
131 unzip -n -d / libiconv-dev-1.7.zip
132 unzip -n -d / libintl-0.10.40-20020101.zip
135 makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi
138 -rm msvc/scripts/order
139 -rm msvc/scripts/order.xml
140 -rm -rf msvc/scripts/inputs
141 -mkdir msvc/scripts/inputs
142 (cd runtime; make V=1 extra_targets=csproj-local)
145 echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
146 echo '<root>' >> msvc/scripts/order.xml
147 for i in `cat msvc/scripts/order`; do \
148 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
149 cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
150 (echo " <project dir=\"$$1\" library=\"$$2\">"; \
151 read boot; echo " <boot>$$boot</boot>"; \
152 read flags; echo " <flags>$$flags</flags>"; \
153 read output; echo " <output>$$output</output>"; \
154 read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
155 read libou; echo " <library_output>$$libou</library_output>"; \
156 read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
157 read profile; echo " <profile>$$profile</profile>"; \
158 read resxt; echo " <resources>$$resxt</resources>"; \
159 read resp; echo " <response>$$resp</response>"; \
160 echo " </project>") >> msvc/scripts/order.xml; \
162 echo "</root>" >> msvc/scripts/order.xml
164 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
166 if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
167 REV=`$(LLVM_DIR)/bin/llvm-config --version` && sed -e "s,expected_llvm_version=.*,expected_llvm_version=\"$$REV\"," < configure.ac > tmp && mv tmp configure.ac && echo "Version set to $$REV."
170 update-solution-files:
173 (cd msvc/scripts; make genproj.exe; mono genproj.exe)