3 # This is the makefile fragment with default rules
4 # for building things in MCS
6 # To customize the build, you should edit config.make.
7 # If you need to edit this file, that's a bug; email
8 # peter@newton.cx about it.
10 # Some more variables. The leading period in the sed expression prevents
11 # thisdir = . from being changed into '..' for the toplevel directory.
13 dots
:= $(shell echo
$(thisdir
) |sed
-e
's,[^./][^/]*,..,g')
18 USE_MCS_FLAGS
= $(LOCAL_MCS_FLAGS
) $(PLATFORM_MCS_FLAGS
) $(PROFILE_MCS_FLAGS
) $(MCS_FLAGS
)
19 USE_MBAS_FLAGS
= $(LOCAL_MBAS_FLAGS
) $(PLATFORM_MBAS_FLAGS
) $(PROFILE_MBAS_FLAGS
) $(MBAS_FLAGS
)
20 USE_CFLAGS
= $(LOCAL_CFLAGS
) $(CFLAGS
)
21 CSCOMPILE
= $(MCS
) $(USE_MCS_FLAGS
)
22 BASCOMPILE
= $(MBAS
) $(USE_MBAS_FLAGS
)
23 CCOMPILE
= $(CC
) $(USE_CFLAGS
)
24 BOOT_COMPILE
= $(BOOTSTRAP_MCS
) $(USE_MCS_FLAGS
)
26 INSTALL_DATA
= $(INSTALL
) -c
-m
644
27 INSTALL_BIN
= $(INSTALL
) -c
-m
755
28 INSTALL_LIB
= $(INSTALL_BIN
)
29 MKINSTALLDIRS
= $(SHELL
) $(topdir
)/mkinstalldirs
33 INTERNAL_ILASM
= ilasm
34 INTERNAL_RESGEN
= resgen
37 depsdir
= $(topdir
)/build
/deps
39 # Make sure these propagate if set manually
54 # Get this so the platform.make platform-check rule doesn't become the
60 # Get initial configuration. pre-config is so that the builder can
61 # override PLATFORM or PROFILE
63 include $(topdir
)/build
/config-default.make
64 -include $(topdir
)/build
/pre-config.make
66 # Default PLATFORM and PROFILE if they're not already defined.
69 ifeq ($(OS
),Windows_NT
)
78 include $(topdir
)/build
/platforms
/$(PLATFORM
).make
81 corlib
= $(PLATFORM_CORLIB
)
85 ifeq ($(PLATFORM_RUNTIME
),$(RUNTIME
))
86 PLATFORM_MONO_NATIVE
= yes
89 # Rest of the configuration
95 include $(topdir
)/build
/profiles
/$(PROFILE
).make
96 -include $(topdir
)/build
/config.make
98 ifdef OVERRIDE_TARGET_ALL
104 STD_TARGETS
= test run-test run-test-ondotnet
clean install uninstall
106 $(STD_TARGETS
): %: do-
%
109 ok
=:; $(MAKE
) run-test-recursive || ok
=false
; $(MAKE
) run-test-local || ok
=false
; $$ok
114 # The way this is set up, any profile-specific subdirs list should
115 # be listed _before_ including rules.make. However, the default
116 # SUBDIRS list can come after, so don't use the eager := syntax when
117 # using the defaults.
118 PROFILE_SUBDIRS
:= $($(PROFILE
)_SUBDIRS
)
119 ifndef PROFILE_SUBDIRS
120 PROFILE_SUBDIRS
= $(SUBDIRS
)
124 @set .
$$MAKEFLAGS; final_exit
=:; \
125 case
$$2 in
--unix
) shift
;; esac
; \
126 case
$$2 in
*=*) dk
="exit 1" ;; *k
*) dk
=: ;; *) dk
="exit 1" ;; esac
; \
127 list
='$(PROFILE_SUBDIRS)'; for d in
$$list ; do \
128 (cd
$$d && $(MAKE
) $*) ||
{ final_exit
="exit 1"; $$dk; } ; \
133 DIST_SUBDIRS
= $(SUBDIRS
) $(DIST_ONLY_SUBDIRS
)
135 dist-recursive
: dist-local
136 @case
'$(distdir)' in
[\\/$$]* | ?
:[\\/]* ) reldir
='$(distdir)' ;; *) reldir
='../$(distdir)' ;; esac
; \
137 list
='$(DIST_SUBDIRS)'; for d in
$$list ; do \
138 (cd
$$d && $(MAKE
) distdir
=$$reldir/$$d $@
) || exit
1 ; \
141 # The following target can be used like
143 # dist-local: dist-default
144 # ... additional commands ...
147 # 1. we invert the test here to not end in an error if ChangeLog doesn't exist.
148 # 2. we error out if we try to dist a nonexistant file.
149 # 3. we pick up Makefile, makefile, or GNUmakefile.
152 test '!' -f ChangeLog || cp ChangeLog
$(distdir
)
153 if
test -f Makefile
; then m
=M
; fi
; \
154 if
test -f makefile
; then m
=m
; fi
; \
155 if
test -f GNUmakefile
; then m
=GNUm
; fi
; \
156 for f in
$${m}akefile
$(DISTFILES
) ; do \
157 dest
=`dirname $(distdir)/$$f` ; \
158 $(MKINSTALLDIRS
) $$dest && cp
-p
$$f $$dest || exit
1 ; \
164 $(MAKE
) MCS
='$(INTERNAL_MCS)' BOOTSTRAP_MCS
='$(INTERNAL_MCS)' all
167 echo
"../../build/common/Consts.cs" > $(LIBRARY
).sources
168 echo
"../../build/common/MonoTODOAttribute.cs" >> $(LIBRARY
).sources
169 ls
*/*.cs
>> $(LIBRARY
).sources
170 cd Test
; ls
*/*.cs
> ..
/$(LIBRARY
:.dll
=_test.dll
).sources
; cd ..