Makefile release builds

This commit is contained in:
Dzmitry Malyshau 2018-04-22 16:07:39 -04:00 committed by Dzmitry Malyshau
parent 9ae74be774
commit cdaaf5c60a

View file

@ -39,11 +39,14 @@ endif
FULL_LIBRARY_PATH=$(CURDIR)/target/debug FULL_LIBRARY_PATH=$(CURDIR)/target/debug
LIBRARY=target/debug/libportability.$(LIB_EXTENSION) LIBRARY=target/debug/libportability.$(LIB_EXTENSION)
LIBRARY_FAST=target/release/libportability.$(LIB_EXTENSION)
.PHONY: all binding run cts .PHONY: all release binding run cts cts-pick cts-debug clean
all: $(TARGET) all: $(TARGET)
release: $(LIBRARY_FAST)
binding: $(BINDING) binding: $(BINDING)
$(BINDING): $(VULKAN_DIR)/vulkan/*.h $(BINDING): $(VULKAN_DIR)/vulkan/*.h
@ -54,6 +57,10 @@ $(LIBRARY): libportability*/src/*.rs libportability*/Cargo.toml Cargo.lock
cargo build --manifest-path libportability-icd/Cargo.toml --features $(BACKEND) cargo build --manifest-path libportability-icd/Cargo.toml --features $(BACKEND)
mkdir -p target/native mkdir -p target/native
$(LIBRARY_FAST): libportability*/src/*.rs libportability*/Cargo.toml Cargo.lock
cargo build --release --manifest-path libportability/Cargo.toml --features $(BACKEND)
cargo build --release --manifest-path libportability-icd/Cargo.toml --features $(BACKEND)
$(NATIVE_DIR)/%.o: native/%.cpp $(DEPS) Makefile $(NATIVE_DIR)/%.o: native/%.cpp $(DEPS) Makefile
$(CC) -c -o $@ $< $(CFLAGS) $(CC) -c -o $@ $< $(CFLAGS)