[Linker] properly read symbols
[mono.git] / Makefile.am
1 AUTOMAKE_OPTIONS = foreign
2 ACLOCAL_AMFLAGS = -I .
3
4 MOONLIGHT_SUBDIRS = $(libgc_dir) eglib/src mono
5
6 if CROSS_COMPILING
7 SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples msvc $(docs_dir)
8 # Keep in sync with SUBDIRS
9 ## 'tools' is not normally built
10 DIST_SUBDIRS = po libgc eglib mono ikvm-native         data runtime scripts man samples tools msvc docs
11 else
12 if ONLY_MOONLIGHT
13 SUBDIRS = $(MOONLIGHT_SUBDIRS) runtime
14 else
15 SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
16 # Keep in sync with SUBDIRS
17 ## 'tools' is not normally built
18 DIST_SUBDIRS = po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
19 endif
20 endif
21
22 EXTRA_DIST= nls.m4 po.m4 progtest.m4 mono-uninstalled.pc.in build-mingw32.sh LICENSE mkinstalldirs autogen.sh 
23
24 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
25
26 # Distribute the 'mcs' tree too
27 GIT_DIR ?= $(srcdir)/.git
28 dist-hook:
29         test -d $(distdir)/mcs || mkdir $(distdir)/mcs
30         d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
31         test ! -d $(GIT_DIR) || ./scripts/commits-to-changelog.py --root=$(distdir) last-commit-with-compulsory-changelog-entry
32
33 pkgconfigdir = $(libdir)/pkgconfig
34 noinst_DATA = mono-uninstalled.pc
35 DISTCLEANFILES= mono-uninstalled.pc
36
37 # building with monolite
38 mcslib = $(mcs_topdir)/class/lib
39 monolite = $(mcslib)/monolite
40 monolite_url = http://mono.ximian.com/daily/monolite-latest.tar.gz
41 .PHONY: get-monolite-latest 
42 get-monolite-latest:
43         -rm -fr $(mcslib)/monolite-*
44         -mkdir -p $(mcslib)
45         test ! -d $(monolite) || test ! -d $(monolite).old || rm -fr $(monolite).old
46         test ! -d $(monolite) || mv -f $(monolite) $(monolite).old
47         cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
48         cd $(mcslib) && mv -f monolite-* monolite
49
50 .PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
51 validate: do-build-mono-mcs
52         $(MAKE) mcs-do-tests
53 do-build-mono-mcs: mcs-do-clean
54         $(MAKE) all
55 mcs-do-clean:
56         cd runtime && $(MAKE) clean-local
57         cd mono/tests && $(MAKE) clean
58 mcs-do-tests:
59         cd runtime && $(MAKE) check-local
60         cd mono/tests && $(MAKE) check
61
62 .PHONY: compiler-tests mcs-do-compiler-tests
63 compiler-tests:
64         $(MAKE) test_select='TEST_SUBDIRS="tests errors"' validate
65 mcs-do-compiler-tests:
66         $(MAKE) test_select='TEST_SUBDIRS="tests errors"' mcs-do-tests
67
68 .PHONY: bootstrap-world
69 bootstrap-world: compiler-tests
70         $(MAKE) install
71
72 if MOONLIGHT
73 moon-do-build: config.h
74         @list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
75           case "x$$subdir" in \
76                 xmono ) target="moon-do-build";; \
77                 * ) target="all";; \
78           esac; \
79           echo "Making $$target in $$subdir"; \
80           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
81         done;
82         (cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-build)
83
84 moon-do-clean:
85         @list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
86           case "x$$subdir" in \
87                 xmono ) target="moon-do-clean";; \
88                 * ) target="clean";; \
89           esac; \
90           echo "Making $$target in $$subdir"; \
91           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
92         done;
93         (cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-clean)
94
95 endif
96
97 win32getdeps:
98         wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
99         wget http://www.go-mono.com/archive/glib-2.0.4-20020703.zip 
100         wget http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip 
101         wget http://www.go-mono.com/archive/libiconv-1.7.zip 
102         wget http://www.go-mono.com/archive/libiconv-dev-1.7.zip 
103         wget http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip
104         unzip -n -d / pkgconfig-0.11-20020310.zip
105         unzip -n -d / glib-2.0.4-20020703.zip
106         unzip -n -d / glib-dev-2.0.4-20020703.zip
107         unzip -n -d / libiconv-1.7.zip
108         unzip -n -d / libiconv-dev-1.7.zip
109         unzip -n -d / libintl-0.10.40-20020101.zip
110
111 win32setup:
112         makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi
113
114 patch-quiet:
115         find mono -name Makefile -exec scripts/patch-quiet.sh {} \;
116         find libgc -name Makefile -exec scripts/patch-quiet.sh {} \;
117
118 update-csproj:
119         -rm msvc/scripts/order 
120         -mkdir msvc/scripts/inputs
121         (cd runtime; make V=1 extra_targets=csproj-local)
122
123 package-inputs:
124         echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
125         echo '<root>' >> msvc/scripts/order.xml
126         for i in `cat msvc/scripts/order`; do \
127                 set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
128                 cat msvc/scripts/inputs/$$2.input | \
129                 (echo "    <project dir=\"$$1\" library=\"$$2\">"; \
130                  read boot;   echo "      <boot>$$boot</boot>"; \
131                  read mcs;    echo "      <mcs>$$mcs</mcs>"; \
132                  read flags;  echo "      <flags>$$flags</flags>"; \
133                  read output; echo "      <output>$$output</output>"; \
134                  read built;  echo "      <built_sources>$$built</built_sources>"; \
135                  read libou;  echo "      <library_output>$$libou</library_output>"; \
136                  read resp;   echo "      <response>$$resp</response>"; \
137                 echo "    </project>") >> msvc/scripts/order.xml; \
138         done
139         echo "</root>" >> msvc/scripts/order.xml