base_prog = $(notdir $(PROGRAM))
prog_dir := $(filter-out . ./, $(dir $(PROGRAM)))
-sourcefile = $(base_prog).sources
+ifndef sourcefile
+sourcefile := $(base_prog).sources
+endif
base_prog_config := $(wildcard $(base_prog).config.$(PROFILE))
ifndef base_prog_config
base_prog_config := $(wildcard $(base_prog).config)
BOOTSTRAP_PROFILE = basic
BUILD_TOOLS_PROFILE = basic
+INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/basic.exe
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
ikvm.cs
ifeq (basic, $(PROFILE))
-PROGRAM = $(topdir)/class/lib/basic/mcs.exe
+PROGRAM = $(topdir)/class/lib/$(PROFILE)/basic.exe
+sourcefile = mcs.exe.sources
else
PROGRAM = $(topdir)/class/lib/build/mcs.exe
LOCAL_MCS_FLAGS += -lib:$(topdir)/class/lib/build