- Fixed pointer type
[mono.git] / mcs / gmcs / Makefile
index d9c310b5496b8c20e9e986bd411974aedd4f2c54..28011ef28376c10a21291104bf9eae5cc1a1622b 100644 (file)
@@ -2,80 +2,28 @@ 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                \
-       $(topdir)/class/Mono.CSharp.Debugger/MonoSymbolFile.cs  \
-       $(topdir)/class/Mono.CSharp.Debugger/MonoSymbolTable.cs \
-       $(topdir)/class/Mono.CSharp.Debugger/MonoSymbolWriter.cs
-
-all_sources = $(COMPILER_SOURCES) cs-parser.cs
-
-DISTFILES = \
-       $(COMPILER_SOURCES)     \
-       cs-parser.jay           \
-       gmcs.exe.config
-#      compiler.csproj         \
-#      compiler.doc            \
-#      compiler.sln            \
-#      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)
 
-PROGRAM_INSTALL_DIR = $(prefix)/lib/mono/2.0
+BUILT_SOURCES = cs-parser.cs
 
-install-local: gmcs.exe
-       $(MKINSTALLDIRS) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
-       $(INSTALL_BIN) gmcs.exe $(DESTDIR)$(PROGRAM_INSTALL_DIR)
-       $(INSTALL_DATA) gmcs.exe.config $(DESTDIR)$(PROGRAM_INSTALL_DIR)
-       $(INSTALL_DATA) gmcs.exe.mdb $(DESTDIR)$(PROGRAM_INSTALL_DIR)
+EXTRA_DISTFILES = cs-parser.jay
 
-uninstall-local:
-       -rm -f $(DESTDIR)$(PROGRAM_INSTALL_DIR)/gmcs.exe*
+PROGRAM = gmcs.exe
+PROGRAM_COMPILE = $(BOOT_COMPILE)
 
-test-local run-test-local:
+CLEAN_FILES = y.output
 
-clean-local:
-       rm -f *.exe *.pdb cs-parser.cs y.output *.mdb
-       cd .. && $(MAKE) PROFILE=net_2_0_bootstrap clean
+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 $@
 
-dist-local: dist-default
+include ../build/executable.make
+
+clean-local: clean-net_2_0_bootstrap
+clean-net_2_0_bootstrap:
+       cd .. && $(MAKE) PROFILE=net_2_0_bootstrap clean
 
 bootstrap_libs = mscorlib.dll System.dll System.Xml.dll Mono.CompilerServices.SymbolWriter.dll
 bootstrap_libfiles = $(bootstrap_libs:%=$(topdir)/class/lib/net_2_0_bootstrap/%)
@@ -86,20 +34,17 @@ $(bootstrap_libfiles): bootstrap-libs
 bootstrap-libs:
        cd .. && $(MAKE) PROFILE=net_2_0_bootstrap all
 
-gmcs.exe: $(all_sources) $(bootstrap_libfiles)
-       MONO_PATH="../class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" mono ../mcs/mcs.exe $(DEBUG_FLAGS) -2 /target:exe /debug /out:$@ $(all_sources)
+gmcs.exe: $(bootstrap_libfiles)
 
-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) 
+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: $(all_sources)
+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
 
@@ -138,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