Reorganise directories

This commit is contained in:
Brendan Zabarauskas 2012-10-28 21:43:23 +10:00
parent c92771a2ae
commit e285c77238
10 changed files with 30 additions and 50 deletions

5
.gitignore vendored
View file

@ -1,4 +1,5 @@
.DS_Store .DS_Store
build
lib lib
*.sublime-workspace sublime
test
!src/test

View file

@ -6,26 +6,25 @@ SRC_DIR = $(ROOT_DIR)/src
SRC_CRATE = $(TARGET).rc SRC_CRATE = $(TARGET).rc
BUILD_DIR = $(ROOT_DIR)/lib BUILD_DIR = $(ROOT_DIR)/lib
TEST = test_$(TARGET) TEST = $(TARGET)
TEST_DIR = $(ROOT_DIR)/test TEST_BUILD_DIR = $(ROOT_DIR)/test
TEST_BUILD_DIR = $(TEST_DIR)/build
TEST_CRATE = $(TEST).rc .PHONY: test
$(TARGET): $(TARGET):
@echo "Building $(TARGET)" @echo "building $(TARGET)"
@mkdir -p $(BUILD_DIR) @mkdir -p $(BUILD_DIR)
@rustc $(SRC_DIR)/$(SRC_CRATE) --lib -g --out-dir=$(BUILD_DIR) @rustc $(SRC_DIR)/$(SRC_CRATE) --out-dir=$(BUILD_DIR)
@echo "Success! \o/" @echo "Success! \o/"
all: $(TARGET) all: $(TARGET)
test: all test:
@echo "..." @echo "building tests"
@echo "Building $(TEST)"
@mkdir -p $(TEST_BUILD_DIR) @mkdir -p $(TEST_BUILD_DIR)
@rustc --test -L lib $(TEST_DIR)/$(TEST_CRATE) -g --out-dir=$(TEST_BUILD_DIR) @rustc $(SRC_DIR)/$(SRC_CRATE) --test --out-dir=$(TEST_BUILD_DIR)
@echo "Success! \o/" @echo "Success! \o/"
@$(TEST_BUILD_DIR)/$(TEST) @$(TEST_BUILD_DIR)/$(TARGET)
clean: clean:
rm -R -f $(BUILD_DIR) rm -R -f $(BUILD_DIR)

View file

@ -12,3 +12,12 @@ pub mod math;
pub mod projection; pub mod projection;
pub mod quat; pub mod quat;
pub mod vec; pub mod vec;
#[test]
pub mod test {
pub mod test_mat;
pub mod test_math;
pub mod test_projection;
pub mod test_quat;
pub mod test_vec;
}

View file

@ -1,5 +1,5 @@
use omath::mat::*; use mat::*;
use omath::vec::*; use vec::*;
// TODO // TODO

View file

@ -1,6 +1,6 @@
use omath::mat::*; use mat::*;
use omath::quat::*; use quat::*;
use omath::vec::*; use vec::*;
// TODO // TODO

View file

@ -1,5 +1,5 @@
use std::cmp::FuzzyEq; use std::cmp::FuzzyEq;
use omath::vec::*; use vec::*;
// TODO // TODO

View file

@ -1,14 +0,0 @@
{
"folders":
[
{
"path": "../",
"file_exclude_patterns": ["*.sublime-workspace"],
"folder_exclude_patterns": ["*.dSYM"]
},
{
"path": "/usr/local/src/rust/src",
"name": "rust"
}
]
}

View file

@ -1,15 +0,0 @@
#[link(name = "test_omath",
vers = "0.1",
author = "Brendan Zabarauskas")];
#[comment = "Unittests for omath"];
#[crate_type = "unittests"];
extern mod std;
extern mod omath;
mod test_mat;
mod test_math;
mod test_projection;
mod test_quat;
mod test_vec;