Skip to content

Commit

Permalink
Mehr buildsystem fixes 🚑🚑🚑
Browse files Browse the repository at this point in the history
Siehe RIOT-OS#2
  • Loading branch information
nmeum committed Dec 9, 2016
1 parent b64425c commit c8f1f22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 6 additions & 4 deletions pkg/rust/Makefile.crate
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
CRATE_NAME ?= $(PKG_NAME)
CRATE_TYPE = lib

LIBNAME = lib$(CRATE_NAME:lib%=%)

.PHONY: all

all: | git-download $(BINDIR)/rust/$(PKG_NAME).a

$(CRATE_DEPS:%=$(BINDIR)/rust/%.rlib):
"$(MAKE)" -C $(RIOTPKG)/$(patsubst $(BINDIR)/%.rlib,%,$@)
$(CRATE_DEPS:%=$(BINDIR)/rust/%.a):
"$(MAKE)" -C $(RIOTPKG)/$(patsubst $(BINDIR)/%.a,%,$@)

$(BINDIR)/rust/$(PKG_NAME).a: $(BINDIR)/rust/$(PKG_NAME).rlib
$(BINDIR)/rust/$(PKG_NAME).a: $(BINDIR)/rust/$(LIBNAME).rlib
$(AD)ln -fs $< $@

$(BINDIR)/rust/$(PKG_NAME).rlib: $(SOURCE_FILE) $(CRATE_DEPS:%=$(BINDIR)/rust/%.rlib)
$(BINDIR)/rust/$(LIBNAME).rlib: $(SOURCE_FILE) $(CRATE_DEPS:%=$(BINDIR)/rust/%.a)
$(AD)mkdir -p $(BINDIR)/rust
$(AD)rustc $(RUSTC_FLAGS) -o $@ $(SOURCE_FILE)

Expand Down
3 changes: 0 additions & 3 deletions sys/rust/fmt/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
USEPKG = rust/libcore
USEMODULE =

include $(RIOTBASE)/sys/rust/Makefile.crate

0 comments on commit c8f1f22

Please sign in to comment.