1 ACLOCAL_AMFLAGS = -I m4
3 AM_CFLAGS = $(WERROR_CFLAGS)
5 MONOTOUCH_SUBDIRS = $(libgc_dir) mono
7 # Some tools might not build when cross-compiling
15 build_with_msvc = msvc
19 build_without_msvc = msvc
25 update_submodules = update_submodules
28 SUBDIRS = $(build_with_msvc) mk po $(libgc_dir) llvm mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) $(build_without_msvc) $(docs_dir) acceptance-tests
29 # Keep in sync with SUBDIRS
30 DIST_SUBDIRS = $(build_with_msvc) m4 mk po $(libgc_dir) llvm mono ikvm-native support data runtime scripts man samples tools $(build_without_msvc) docs acceptance-tests netcore
32 all: $(update_submodules)
35 @cd $(srcdir) && scripts/update_submodules.sh
37 .PHONY: update_submodules
44 mono-uninstalled.pc.in \
48 mcs/class/referencesource
50 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
52 # Distribute the 'mcs' tree too
53 GIT_DIR ?= $(srcdir)/.git
55 test -d $(distdir)/mcs || mkdir $(distdir)/mcs
56 d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
57 rm -rf `find $(top_distdir)/external -path '*\.git'`
58 rm -rf `find $(top_distdir)/external -path '*\.libs'`
59 rm -rf `find $(top_distdir)/external -path '*\.deps'`
60 rm -f `find $(top_distdir)/external -path '*\.o'`
61 rm -f `find $(top_distdir)/external -path '*\.so'`
62 rm -f `find $(top_distdir)/external -path '*\.lo'`
63 rm -f `find $(top_distdir)/external -path '*\.Plo'`
64 rm -f `find $(top_distdir)/external -name '\.dirstamp'`
65 rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
66 rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*' -not -path '*/helix-binaries/*'`
67 rm -rf "$(top_distdir)/external/linker/test"
69 pkgconfigdir = $(libdir)/pkgconfig
70 noinst_DATA = mono-uninstalled.pc
71 DISTCLEANFILES= mono-uninstalled.pc
73 # building with monolite
74 .PHONY: get-monolite-latest
76 $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
83 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-default.sh
85 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
90 MONO_LLVMONLY=$(BITCODE_CHECK) $(CI_TEST_SCRIPT)
92 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
93 validate: do-build-mono-mcs
95 do-build-mono-mcs: mcs-do-clean
98 cd runtime && $(MAKE) clean-local
99 cd mono/tests && $(MAKE) clean
101 cd runtime && $(MAKE) check-local
102 cd mono/tests && $(MAKE) check
104 .PHONY: compiler-tests mcs-do-compiler-tests
106 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
107 mcs-do-compiler-tests:
108 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
110 .PHONY: bootstrap-world
111 bootstrap-world: compiler-tests
115 monotouch-do-build: config.h
116 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
117 case "x$$subdir" in \
118 xmono ) target="monotouch-do-build";; \
121 echo "Making $$target in $$subdir"; \
122 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
124 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
127 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
128 case "x$$subdir" in \
129 xmono ) target="monotouch-do-clean";; \
130 * ) target="clean";; \
132 echo "Making $$target in $$subdir"; \
133 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
135 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
140 -rm msvc/scripts/order
141 -rm msvc/scripts/order.xml
142 -rm -rf msvc/scripts/inputs
143 -mkdir msvc/scripts/inputs
144 (cd runtime; $(MAKE) V=1 extra_targets=csproj-local)
147 echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
148 echo '<root>' >> msvc/scripts/order.xml
149 for i in `cat msvc/scripts/order`; do \
150 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
151 cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
152 (echo " <project dir=\"$$1\" library=\"$$2\">"; \
153 read boot; echo " <boot>$$boot</boot>"; \
154 read flags; echo " <flags>$$flags</flags>"; \
155 read sources;echo " <sources>$$sources</sources>"; \
156 read output; echo " <output>$$output</output>"; \
157 read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
158 read libou; echo " <library_output>$$libou</library_output>"; \
159 read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
160 read profile; echo " <profile>$$profile</profile>"; \
161 read resxt; echo " <resources>$$resxt</resources>"; \
162 read resp; echo " <response>$$resp</response>"; \
163 echo " </project>") >> msvc/scripts/order.xml; \
165 echo "</root>" >> msvc/scripts/order.xml
167 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
169 if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
170 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."
173 update-solution-files:
174 cd msvc/scripts && $(MAKE) genproj.exe || exit $$?;
175 $(MAKE) update-csproj
176 $(MAKE) package-inputs
177 (cd msvc/scripts; mono --debug genproj.exe $(GENPROJ_ARGS))
179 update-solution-files-with-tests:
180 $(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files