cgmath/Makefile

31 lines
612 B
Makefile
Raw Normal View History

TARGET = lmath
2012-09-08 08:54:32 +00:00
ROOT_DIR = .
SRC_DIR = $(ROOT_DIR)/src
SRC_CRATE = $(TARGET).rc
BUILD_DIR = $(ROOT_DIR)/lib
2012-10-28 11:43:23 +00:00
TEST = $(TARGET)
TEST_BUILD_DIR = $(ROOT_DIR)/test
.PHONY: test
2012-09-08 08:54:32 +00:00
$(TARGET):
@echo "Building $(TARGET)..."
@mkdir -p $(BUILD_DIR)
2012-10-28 11:43:23 +00:00
@rustc $(SRC_DIR)/$(SRC_CRATE) --out-dir=$(BUILD_DIR)
@echo "Success"
2012-10-28 11:43:23 +00:00
2012-09-08 08:54:32 +00:00
all: $(TARGET)
2012-09-07 10:48:47 +00:00
2012-10-28 11:43:23 +00:00
test:
@echo "Building unit tests for $(TARGET)..."
@mkdir -p $(TEST_BUILD_DIR)
2012-10-28 11:43:23 +00:00
@rustc $(SRC_DIR)/$(SRC_CRATE) --test --out-dir=$(TEST_BUILD_DIR)
@echo "Success"
2012-10-28 11:43:23 +00:00
@$(TEST_BUILD_DIR)/$(TARGET)
2012-09-08 08:54:32 +00:00
2012-09-07 10:48:47 +00:00
clean:
rm -R -f $(BUILD_DIR)
rm -R -f $(TEST_BUILD_DIR)