diff --git a/Makefile b/Makefile index eab87537..35bc560f 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ BIN_TARGETS=$(patsubst imag-%,,$(BINS)) LIB_TARGETS=$(LIBS) LIB_TARGETS_TEST=$(foreach x,$(subst ./,,$(LIBS)),test-$(x)) TARGETS=$(BIN_TARGETS) $(LIB_TARGETS) +RELEASE_TARGETS=$(foreach x,$(TARGETS),$(x)-release) INSTALL_TARGETS=$(foreach x,$(BIN_TARGETS),$(x)-install) UPDATE_TARGETS=$(foreach x,$(TARGETS),$(x)-update) CLEAN_TARGETS=$(foreach x,$(TARGETS),$(x)-clean) @@ -20,6 +21,9 @@ CLEAN_TARGETS=$(foreach x,$(TARGETS),$(x)-clean) all: $(TARGETS) @$(ECHO) "\t[ALL ]" +release: $(RELEASE_TARGETS) + @$(ECHO) "\t[RELEASE] + bin: $(BIN_TARGETS) @$(ECHO) "\t[ALLBIN]" @@ -41,6 +45,10 @@ $(TARGETS): %: .FORCE @$(ECHO) "\t[CARGO ]:\t$@" @$(CARGO) build --manifest-path ./$@/Cargo.toml +$(RELEASE_TARGETS): %: .FORCE + @$(ECHO) "\t[RELEASE]:\t$(subst -release,,$@)" + @$(CARGO) build --release --manifest-path ./$(subst -release,,$@)/Cargo.toml + $(LIB_TARGETS_TEST): %: .FORCE @$(ECHO) "\t[TEST ]:\t$@" @$(CARGO) test --manifest-path ./$(subst test-,,$@)/Cargo.toml