cgmath/Makefile

32 lines
686 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
TEST = test_$(TARGET)
TEST_DIR = $(ROOT_DIR)/test
TEST_BUILD_DIR = $(TEST_DIR)/build
TEST_CRATE = $(TEST).rc
$(TARGET):
@echo "Building $(TARGET)"
@mkdir -p $(BUILD_DIR)
2012-09-08 08:54:32 +00:00
@rustc $(SRC_DIR)/$(SRC_CRATE) --lib -g --out-dir=$(BUILD_DIR)
@echo "Success! \o/"
all: $(TARGET)
2012-09-07 10:48:47 +00:00
test: all
2012-09-08 08:54:32 +00:00
@echo "..."
@echo "Building $(TEST)"
@mkdir -p $(TEST_BUILD_DIR)
2012-09-08 08:54:32 +00:00
@rustc --test -L lib $(TEST_DIR)/$(TEST_CRATE) -g --out-dir=$(TEST_BUILD_DIR)
@echo "Success! \o/"
@$(TEST_BUILD_DIR)/$(TEST)
2012-09-07 10:48:47 +00:00
clean:
rm -R -f $(BUILD_DIR)
rm -R -f $(TEST_BUILD_DIR)