add tests (unittests) to Makefile
move SkTSort.h into public includes
git-svn-id: http://skia.googlecode.com/svn/trunk@98 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/Makefile b/Makefile
index 63fe6e6..94528bb 100644
--- a/Makefile
+++ b/Makefile
@@ -69,6 +69,8 @@
$(HIDE)$(AR) ru $@ $(OBJ_LIST)
$(HIDE)ranlib $@
+##############################################################################
+
BENCH_SRCS := RectBench.cpp SkBenchmark.cpp main.cpp BitmapBench.cpp
BENCH_SRCS := $(addprefix bench/, $(BENCH_SRCS))
@@ -86,6 +88,21 @@
@echo "linking bench..."
$(HIDE)g++ $(BENCH_OBJS) out/libskia.a -o out/bench/bench $(LINKER_OPTS)
+##############################################################################
+
+TESTS_SRCS := GeometryTest.cpp MathTest.cpp MatrixTest.cpp PackBitsTest.cpp \
+ Sk64Test.cpp StringTest.cpp Test.cpp UtilsTest.cpp main.cpp
+TESTS_SRCS := $(addprefix tests/, $(TESTS_SRCS))
+
+TESTS_OBJS := $(TESTS_SRCS:.cpp=.o)
+TESTS_OBJS := $(addprefix out/, $(TESTS_OBJS))
+
+tests: $(TESTS_OBJS) out/libskia.a
+ @echo "linking tests..."
+ $(HIDE)g++ $(TESTS_OBJS) out/libskia.a -o out/tests/tests $(LINKER_OPTS)
+
+##############################################################################
+
.PHONY: clean
clean:
$(HIDE)rm -rf out
@@ -95,6 +112,7 @@
@echo "Targets:"
@echo " <default>: out/libskia.a"
@echo " bench: out/bench/bench"
+ @echo " tests: out/tests/tests"
@echo " clean: removes entire out/ directory"
@echo " help: this text"
@echo "Options: (after make, or in bash shell)"