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
24 SUBDIRS = mk llvm mono runtime netcore
26 update_submodules = update_submodules
27 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
30 # Keep in sync with SUBDIRS
31 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
33 all: $(update_submodules)
36 @cd $(srcdir) && scripts/update_submodules.sh
38 .PHONY: update_submodules
45 mono-uninstalled.pc.in \
50 mcs/class/referencesource
52 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_RUNTIME=false
54 # Distribute the 'mcs' tree too
55 GIT_DIR ?= $(srcdir)/.git
57 test -d $(distdir)/mcs || mkdir $(distdir)/mcs
58 d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
59 rm -rf `find $(top_distdir)/external -path '*\.git'`
60 rm -rf `find $(top_distdir)/external -path '*\.libs'`
61 rm -rf `find $(top_distdir)/external -path '*\.deps'`
62 rm -f `find $(top_distdir)/external -path '*\.o'`
63 rm -f `find $(top_distdir)/external -path '*\.so'`
64 rm -f `find $(top_distdir)/external -path '*\.lo'`
65 rm -f `find $(top_distdir)/external -path '*\.Plo'`
66 rm -f `find $(top_distdir)/external -name '\.dirstamp'`
67 rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
68 rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*' -not -path '*/helix-binaries/*'`
69 rm -rf "$(top_distdir)/external/linker/test"
71 pkgconfigdir = $(libdir)/pkgconfig
72 noinst_DATA = mono-uninstalled.pc
73 DISTCLEANFILES= mono-uninstalled.pc
75 # building with monolite
76 .PHONY: get-monolite-latest
78 $(MAKE) -C $(mcs_topdir)/class get-monolite-latest
85 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-default.sh
87 CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
92 MONO_LLVMONLY=$(BITCODE_CHECK) $(CI_TEST_SCRIPT)
94 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
95 validate: do-build-mono-mcs
97 do-build-mono-mcs: mcs-do-clean
100 cd runtime && $(MAKE) clean-local
101 cd mono/tests && $(MAKE) clean
103 cd runtime && $(MAKE) check-local
104 cd mono/tests && $(MAKE) check
106 .PHONY: compiler-tests mcs-do-compiler-tests
108 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
109 mcs-do-compiler-tests:
110 $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
112 .PHONY: bootstrap-world
113 bootstrap-world: compiler-tests
117 monotouch-do-build: config.h
118 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
119 case "x$$subdir" in \
120 xmono ) target="monotouch-do-build";; \
123 echo "Making $$target in $$subdir"; \
124 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
126 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
129 @list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
130 case "x$$subdir" in \
131 xmono ) target="monotouch-do-clean";; \
132 * ) target="clean";; \
134 echo "Making $$target in $$subdir"; \
135 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
137 (cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
142 -rm msvc/scripts/order
143 -rm msvc/scripts/order.xml
144 -rm -rf msvc/scripts/inputs
145 -mkdir msvc/scripts/inputs
146 (cd runtime; $(MAKE) V=1 extra_targets=csproj-local)
149 echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
150 echo '<root>' >> msvc/scripts/order.xml
151 for i in `cat msvc/scripts/order`; do \
152 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
153 cat msvc/scripts/inputs/$$2.input | sed -e 's/\\\\/\\/g' -e 's/\\/\\\\/g' | \
154 (echo " <project dir=\"$$1\" library=\"$$2\">"; \
155 read boot; echo " <boot>$$boot</boot>"; \
156 read flags; echo " <flags>$$flags</flags>"; \
157 read sources;echo " <sources>$$sources</sources>"; \
158 read output; echo " <output>$$output</output>"; \
159 read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
160 read libou; echo " <library_output>$$libou</library_output>"; \
161 read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
162 read profile; echo " <profile>$$profile</profile>"; \
163 read resxt; echo " <resources>$$resxt</resources>"; \
164 read resp; echo " <response>$$resp</response>"; \
165 echo " </project>") >> msvc/scripts/order.xml; \
167 echo "</root>" >> msvc/scripts/order.xml
169 # Update llvm version in configure.ac to the output of $LLVM_DIR/bin/llvm-config --version
171 if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
172 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."
175 update-solution-files:
176 cd msvc/scripts && $(MAKE) genproj.exe || exit $$?;
177 $(MAKE) update-csproj
178 $(MAKE) package-inputs
179 (cd msvc/scripts; mono --debug genproj.exe $(GENPROJ_ARGS))
181 update-solution-files-with-tests:
182 $(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files