3 include ../build/rules.make
16 ifeq (1.0, $(FRAMEWORK_VERSION))
20 ifeq (2.0, $(FRAMEWORK_VERSION))
21 LOCAL_MCS_FLAGS += -d:GMCS_SOURCE
25 ifeq (2.1, $(FRAMEWORK_VERSION))
26 LOCAL_MCS_FLAGS += -d:GMCS_SOURCE -d:SMCS_SOURCE
30 PROGRAM = $(topdir)/class/lib/$(PROFILE)/$(COMPILER_NAME).exe
32 BUILT_SOURCES = cs-parser.cs
34 PROGRAM_COMPILE = $(BOOT_COMPILE)
36 CLEAN_FILES += y.output
38 %-parser.cs: %-parser.jay $(topdir)/jay/skeleton.cs
39 $(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
42 ifeq (net_2_0_bootstrap, $(PROFILE))
44 all-local $(STD_TARGETS:=-local):
47 all-local: $(PROGRAM) $(PROGRAM).config
48 clean-local: clean-program
50 rm -f $(PROGRAM) $(PROGRAM).config
52 $(PROGRAM) $(PROGRAM).config: $(dir $(PROGRAM))/.stamp
54 $(PROGRAM): $(topdir)/class/lib/default/mcs.exe
57 $(PROGRAM).config: gmcs.exe.config
62 ifeq (net_2_0, $(PROFILE))
64 BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/net_2_0_bootstrap/gmcs.exe $(DEBUG_FLAGS)
66 clean-local: clean-net_2_0_bootstrap
67 clean-net_2_0_bootstrap:
68 cd .. && $(MAKE) NO_DIR_CHECK=yes PROFILE=net_2_0_bootstrap clean
70 bootstrap_libs = mscorlib.dll System.dll System.Xml.dll Mono.CompilerServices.SymbolWriter.dll
71 bootstrap_libfiles = $(bootstrap_libs:%=$(topdir)/class/lib/net_2_0_bootstrap/%)
73 $(bootstrap_libfiles): bootstrap-libs
75 .PHONY: bootstrap-libs
77 cd .. && $(MAKE) NO_DIR_CHECK=yes PROFILE=net_2_0_bootstrap all
79 $(PROGRAM): $(bootstrap_libfiles)
82 KEEP_OUTPUT_FILE_COPY = yes
84 include ../build/executable.make
91 # This used to be called test, but that conflicts with the global
94 btest: mcs2.exe mcs3.exe
95 ls -l mcs2.exe mcs3.exe
98 $(TIME) $(RUNTIME) $(RUNTIME_FLAGS) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:$@ $(BUILT_SOURCES) @$(response)
101 $(TIME) $(RUNTIME) $(RUNTIME_FLAGS) ./mcs2.exe $(USE_MCS_FLAGS) -target:exe -out:$@ $(BUILT_SOURCES) @$(response)
104 wc -l $(BUILT_SOURCES) `cat $(sourcefile)`
107 rm -f mcs2.exe mcs3.exe
108 $(MAKE) USE_MCS_FLAGS="-d:NET_1_1 -d:ONLY_1_1" btest
110 # we need this because bash tries to use its own crappy timer
111 FRIENDLY_TIME = $(shell which time) -f'%U seconds'
116 @ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs2.exe > /dev/null || (echo FAILED; exit 1)
119 @ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs3.exe > /dev/null || (echo FAILED; exit 1)
124 @ rm -f ../class/lib/mscorlib.dll
125 @ cd ../class/corlib ; $(MAKE) BOOTSTRAP_MCS='$(FRIENDLY_TIME) mono $$(topdir)/class/lib/$(PROFILE)/mcs.exe' > /dev/null || (echo FAILED; exit 1)
130 $(RUNTIME) $(RUNTIME_FLAGS) --profile=$(PROFILER) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:mcs2.exe $(BUILT_SOURCES) @$(response)
133 MONO_PATH="../class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) ../class/lib/net_2_0_bootstrap/gmcs.exe /codepage:65001 -d:GMCS_SOURCE -d:NET_1_1 -d:NET_2_0 -debug -target:exe -out:gmcs.exe cs-parser.cs @gmcs.exe.sources
134 @ cp $(COMPILER_NAME).exe* $(topdir)/class/lib/$(PROFILE)/