test/Makefile
author vb
Sun, 22 Feb 2015 15:49:02 +0100
changeset 66 805bfae3cdc4
parent 50 e713c3e6faf1
child 134 53e0802d1d38
permissions -rw-r--r--
Makefile stuff
     1 include ../Makefile.conf
     2 
     3 CC?=g++ -std=gnu++11 -pthread
     4 CXX?=g++ -std=gnu++11 -pthread
     5 LD?=$(CXX)
     6 LDFLAGS?=-L$(HOME)/lib -lpEpEngine -lstdc++
     7 CXXFLAGS?=-g -O0 -I../src
     8 # CXXFLAGS=-O3 -DNDEBUG
     9 
    10 TARGET=pEpEngineTest
    11 
    12 UNIT_TESTS_SOURCE=$(wildcard *_test.cc)
    13 UNIT_TESTS=$(subst .cc,,$(UNIT_TESTS_SOURCE))
    14 
    15 all: $(TARGET) $(UNIT_TESTS)
    16 
    17 .PHONY: clean
    18 
    19 clean:
    20 	rm -f *.o $(TARGET) *.a *~ $(UNIT_TESTS)
    21 
    22 test: pEpEngineTest
    23 	LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest
    24 
    25 unit_tests: $(UNIT_TESTS)
    26 	for t in ./*_test ; do \
    27 		LD_LIBRARY_PATH=~/lib:../src $$t ; \
    28 	done