Combine rust's executable and depfile target. Thanks terrible rust docs for not properly explaining that you can have multiple targets generated on a single invocation
This commit is contained in:
parent
634881f00b
commit
02b18bd3ac
@ -120,14 +120,11 @@ endif
|
|||||||
flags-update: rustflags-update ldflags-update
|
flags-update: rustflags-update ldflags-update
|
||||||
|
|
||||||
#Compile all the rust 'crates'
|
#Compile all the rust 'crates'
|
||||||
$(MAIN_EXECUTABLE): $(MAIN_SOURCE_FILE) $(LDFLAGS_TMPFILE) $(RUSTFLAGS_TMPFILE) $(MAIN_DEP_FILE)
|
$(MAIN_EXECUTABLE): $(MAIN_SOURCE_FILE) $(LDFLAGS_TMPFILE) $(RUSTFLAGS_TMPFILE) | $(DEPDIR)
|
||||||
$(COMPILER) $< $(COMPILE_FLAGS) -o $@ $(ALL_LDFLAGS)
|
$(COMPILER) $< $(COMPILE_FLAGS) $(ALL_LDFLAGS) --emit link=$@ --emit dep-info=$(MAIN_DEP_FILE)
|
||||||
ifeq ($(RELEASE),1)
|
ifeq ($(RELEASE),1)
|
||||||
$(STRIP) --strip-all "$(MAIN_EXECUTABLE)"
|
$(STRIP) --strip-all "$(MAIN_EXECUTABLE)"
|
||||||
endif
|
endif
|
||||||
#create a dependency tracking file so that the project rebuilds when any dep is updated
|
|
||||||
$(MAIN_DEP_FILE): $(MAIN_SOURCE_FILE) $(RUSTFLAGS_TMPFILE) | $(DEPDIR)
|
|
||||||
$(COMPILER) $< --emit dep-info $(COMPILE_FLAGS) -o $@
|
|
||||||
|
|
||||||
$(DEPDIR):
|
$(DEPDIR):
|
||||||
$(call mkdir,"$(DEPDIR)")
|
$(call mkdir,"$(DEPDIR)")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user