- Fixed pointer type
[mono.git] / mcs / gmcs / Makefile
index 6fc8a2d768cb9ed9a72be87b3528bff2b195f456..28011ef28376c10a21291104bf9eae5cc1a1622b 100644 (file)
@@ -2,87 +2,49 @@ thisdir := gmcs
 SUBDIRS := 
 include ../build/rules.make
 
-COMPILER_SOURCES = \
-       AssemblyInfo.cs                 \
-       anonymous.cs                    \
-       assign.cs                       \
-       attribute.cs                    \
-       driver.cs                       \
-       cs-tokenizer.cs                 \
-       cfold.cs                        \
-       class.cs                        \
-       codegen.cs                      \
-       const.cs                        \
-       constant.cs                     \
-       convert.cs                      \
-       decl.cs                         \
-       delegate.cs                     \
-       enum.cs                         \
-       ecore.cs                        \
-       expression.cs                   \
-       flowanalysis.cs                 \
-       generic.cs                      \
-       iterators.cs                    \
-       literal.cs                      \
-       location.cs                     \
-       modifiers.cs                    \
-       namespace.cs                    \
-       parameter.cs                    \
-       pending.cs                      \
-       report.cs                       \
-       rootcontext.cs                  \
-       statement.cs                    \
-       support.cs                      \
-       typemanager.cs                  \
-       symbolwriter.cs                 \
-       tree.cs                         \
-       CryptoConvert.cs
-
-all_sources = $(COMPILER_SOURCES) cs-parser.cs
-
-DISTFILES = \
-       $(COMPILER_SOURCES)     \
-       compiler.csproj         \
-       compiler.doc            \
-       compiler.sln            \
-       cs-parser.jay           \
-       gmcs.exe.config         \
-       NOTES                   \
-       TODO
 #uncomment to enable some debug stuff
 #DEBUG_FLAGS=/define:MCS_DEBUG
 
-all-local: gmcs.exe
+BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(topdir)/class/lib/net_2_0_bootstrap/mcs.exe $(DEBUG_FLAGS)
 
-install-local: gmcs.exe
-       $(MKINSTALLDIRS) $(DESTDIR)$(prefix)/lib/mono/2.0
-       $(INSTALL_BIN) gmcs.exe $(DESTDIR)$(prefix)/lib/mono/2.0
-       $(INSTALL_DATA) gmcs.exe.config $(DESTDIR)$(prefix)/lib/mono/2.0
+BUILT_SOURCES = cs-parser.cs
 
-uninstall-local:
-       -rm -f $(DESTDIR)$(prefix)/bin/mcs.exe
+EXTRA_DISTFILES = cs-parser.jay
 
-test-local run-test-local:
+PROGRAM = gmcs.exe
+PROGRAM_COMPILE = $(BOOT_COMPILE)
 
-clean-local:
-       rm -f *.exe *.pdb cs-parser.cs y.output
+CLEAN_FILES = y.output
 
-dist-local: dist-default
+cs-parser.cs: cs-parser.jay $(topdir)/jay/skeleton.cs
+       $(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
+
+include ../build/executable.make
+
+clean-local: clean-net_2_0_bootstrap
+clean-net_2_0_bootstrap:
+       cd .. && $(MAKE) PROFILE=net_2_0_bootstrap clean
 
-gmcs.exe: $(all_sources)
-       MONO_PATH="../class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" mono ../mcs/mcs.exe $(DEBUG_FLAGS) -2 /target:exe /debug /out:$@ $^
+bootstrap_libs = mscorlib.dll System.dll System.Xml.dll Mono.CompilerServices.SymbolWriter.dll
+bootstrap_libfiles = $(bootstrap_libs:%=$(topdir)/class/lib/net_2_0_bootstrap/%)
 
-gmcs2.exe: $(all_sources)
-       MONO_PATH="../class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" time mcs -2 /target:exe /debug /out:$@ $^ $(DEBUG_FLAGS) 
+$(bootstrap_libfiles): bootstrap-libs
+       @:
+.PHONY: bootstrap-libs
+bootstrap-libs:
+       cd .. && $(MAKE) PROFILE=net_2_0_bootstrap all
 
-gmcs3.exe: $(all_sources)
+gmcs.exe: $(bootstrap_libfiles)
+
+gmcs2.exe: $(PROGRAM)
+       MONO_PATH="../class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" time $(PROGRAM) -2 /target:exe /debug /out:$@ $^ $(DEBUG_FLAGS) 
+
+gmcs3.exe: gmcs2.exe
        MONO_PATH="../class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" time $(RUNTIME) ./gmcs2.exe $(USE_MCS_FLAGS) $(DEBUG_FLAGS) -2 /target:exe /debug /out:$@ $^
 
-gmcs4.exe: $(all_sources)
+gmcs4.exe: gmcs3.exe
        MONO_PATH="../class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" time $(RUNTIME) ./gmcs3.exe $(USE_MCS_FLAGS) $(DEBUG_FLAGS) -2 /target:exe /debug /out:$@ $^
 
-cs-parser.cs: cs-parser.jay $(topdir)/jay/skeleton.cs
-       $(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
 
 # Testing targets
 
@@ -121,7 +83,6 @@ do-corlib:
 PROFILER=default
 
 profile : gmcs2.exe
-       make gmcs3.exe RUNTIME="$(RUNTIME) --profile"
+       -rm -f gmcs3.exe
+       make gmcs3.exe RUNTIME="$(RUNTIME) --profile=$(PROFILER)"
 
-response:
-       echo $(all_sources) > res