Browse files

Decreased the level of WTF in Makefile: now 'make tests' actually bui…

…lds and runs tests instead of just building the tests
  • Loading branch information...
valyala committed Aug 25, 2012
1 parent e8ad5ff commit 6a5af439c5fe95f11f151f8d068b86aa4cc071a3
Showing with 17 additions and 3 deletions.
  1. +17 −3 Makefile
@@ -12,20 +12,34 @@ CPP11_CFLAGS=$(COMMON_CFLAGS) -std=c++0x -DGHEAP_CPP11
all: tests perftests ops_count_test
$(C_COMPILER) tests.c $(C_CFLAGS) $(DEBUG_CFLAGS) -o tests_c
$(CPP_COMPILER) tests.cpp $(CPP03_CFLAGS) $(DEBUG_CFLAGS) -o tests_cpp03
$(CPP_COMPILER) tests.cpp $(CPP11_CFLAGS) $(DEBUG_CFLAGS) -o tests_cpp11
+tests: build-tests
+ ./tests_c
+ ./tests_cpp03
+ ./tests_cpp11
$(C_COMPILER) perftests.c $(C_CFLAGS) $(OPT_CFLAGS) -o perftests_c
$(CPP_COMPILER) perftests.cpp $(CPP03_CFLAGS) $(OPT_CFLAGS) -o perftests_cpp03
$(CPP_COMPILER) perftests.cpp $(CPP11_CFLAGS) $(OPT_CFLAGS) -o perftests_cpp11
+ ./perftests_c
+ ./perftests_cpp03
+ ./perftests_cpp11
$(CPP_COMPILER) ops_count_test.cpp $(CPP03_CFLAGS) $(OPT_CFLAGS) -o ops_count_test_cpp03
$(CPP_COMPILER) ops_count_test.cpp $(CPP11_CFLAGS) $(OPT_CFLAGS) -o ops_count_test_cpp11
+ ./ops_count_test_cpp03
+ ./ops_count_test_cpp11
rm -f ./tests_c
rm -f ./tests_cpp03

0 comments on commit 6a5af43

Please sign in to comment.