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
build
lib
*.sublime-workspace
sublime
test
!src/test

View file

@ -6,26 +6,25 @@ 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
TEST = $(TARGET)
TEST_BUILD_DIR = $(ROOT_DIR)/test
.PHONY: test
$(TARGET):
@echo "Building $(TARGET)"
@echo "building $(TARGET)"
@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/"
all: $(TARGET)
test: all
@echo "..."
@echo "Building $(TEST)"
test:
@echo "building tests"
@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/"
@$(TEST_BUILD_DIR)/$(TEST)
@$(TEST_BUILD_DIR)/$(TARGET)
clean:
rm -R -f $(BUILD_DIR)

View file

@ -11,4 +11,13 @@ pub mod mat;
pub mod math;
pub mod projection;
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 omath::vec::*;
use mat::*;
use vec::*;
// TODO

View file

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

View file

@ -1,5 +1,5 @@
use std::cmp::FuzzyEq;
use omath::vec::*;
use vec::*;
// 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;