X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fbuild%2Fexecutable.make;h=7ac941ca83996de7f98bc0f36cedb5ebf3568e46;hb=b2a11ac756f940c30b05aa0a8baf733572df4ce5;hp=1a9ffab0e7f5d774e95bc328d436941d260fc7c0;hpb=7a950a04504aca14aacd241def6b3369006723a9;p=mono.git diff --git a/mcs/build/executable.make b/mcs/build/executable.make index 1a9ffab0e7f..7ac941ca839 100644 --- a/mcs/build/executable.make +++ b/mcs/build/executable.make @@ -19,7 +19,7 @@ executable_CLEAN_FILES += $(response) endif ifndef the_libdir -the_libdir = $(topdir)/class/lib/$(PROFILE)/ +the_libdir = $(topdir)/class/lib/$(PROFILE_DIRECTORY)/ ifdef PROGRAM_USE_INTERMEDIATE_FILE build_libdir = $(the_libdir)tmp/ else @@ -42,8 +42,20 @@ executable_CLEAN_FILES += $(build_lib) $(build_lib).so $(build_lib).mdb $(build_ makefrag = $(depsdir)/$(PROFILE)_$(base_prog).makefrag -MCS_REFERENCES = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(LIB_REFS)) -MCS_REFERENCES += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.exe,$(EXE_REFS)) +ifdef TARGET_NET_REFERENCE +# System.*.dll references come from the TARGET_NET_REFERENCE dir, others from the profile dir +LIB_REFS_MONO = $(call _FILTER_OUT,System,$(LIB_REFS)) +LIB_REFS_SYSTEM = $(filter-out $(LIB_REFS_MONO),$(LIB_REFS)) + +MCS_REFERENCES = $(patsubst %,-r:$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/%.dll,$(LIB_REFS_SYSTEM)) +MCS_REFERENCES += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS_MONO)) +else +MCS_REFERENCES = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS)) +endif + +ifdef KEYFILE +LIB_MCS_FLAGS += /keyfile:$(KEYFILE) +endif ifndef NO_BUILD all-local: $(the_lib) $(PROGRAM_config) @@ -117,7 +129,12 @@ ifndef PROGRAM_COMPILE PROGRAM_COMPILE = $(CSCOMPILE) endif -$(the_lib): $(the_libdir)/.stamp +$(the_lib): $(the_libdir)/.stamp $(if $(PROFILE_PLATFORM),$(if $(filter $(HOST_PLATFORM),$(BUILD_PLATFORM)),$(topdir)/class/lib/$(PROFILE)/.stamp)) + +ifdef PROFILE_PLATFORM +$(topdir)/class/lib/$(PROFILE)/.stamp: | $(topdir)/class/lib/$(PROFILE)-$(HOST_PLATFORM)/.stamp + $(if $(filter $(HOST_PLATFORM),$(BUILD_PLATFORM)),$(if $(filter $(BUILD_PLATFORM),win32),CYGWIN=winsymlinks:nativestrict) ln -s $(abspath $(topdir)/class/lib/$(PROFILE)-$(BUILD_PLATFORM)) $(abspath $(topdir)/class/lib/$(PROFILE))) +endif $(build_lib): $(BUILT_SOURCES) $(EXTRA_SOURCES) $(response) $(build_libdir:=/.stamp) $(PROGRAM_COMPILE) $(MCS_REFERENCES) -target:exe -out:$@ $(BUILT_SOURCES) $(EXTRA_SOURCES) @$(response)