cgmath/Makefile

31 lines
597 B
Makefile
Raw Normal View History

2012-09-08 08:54:32 +00:00
TARGET = omath
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):
2012-10-28 11:43:23 +00:00
@echo "building $(TARGET)"
@mkdir -p $(BUILD_DIR)
2012-10-28 11:43:23 +00:00
@rustc $(SRC_DIR)/$(SRC_CRATE) --out-dir=$(BUILD_DIR)
2012-09-08 08:54:32 +00:00
@echo "Success! \o/"
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 tests"
@mkdir -p $(TEST_BUILD_DIR)
2012-10-28 11:43:23 +00:00
@rustc $(SRC_DIR)/$(SRC_CRATE) --test --out-dir=$(TEST_BUILD_DIR)
2012-09-08 08:54:32 +00:00
@echo "Success! \o/"
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)