test/Makefile
author Volker Birk <vb@pep-project.org>
Fri, 27 Mar 2015 13:36:57 +0100
changeset 142 025a3d115c2b
parent 134 53e0802d1d38
child 165 f0894860af4a
permissions -rw-r--r--
decoding body correctly
     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
     7 LDLIBS?=-letpan -lpEpEngine -lstdc++
     8 CXXFLAGS?=-g -O0 -I../src
     9 # CXXFLAGS=-O3 -DNDEBUG
    10 
    11 TARGET=pEpEngineTest
    12 
    13 UNIT_TESTS_SOURCE=$(wildcard *_test.cc)
    14 UNIT_TESTS=$(subst .cc,,$(UNIT_TESTS_SOURCE))
    15 
    16 all: $(TARGET) $(UNIT_TESTS)
    17 
    18 .PHONY: clean
    19 
    20 clean:
    21 	rm -f *.o $(TARGET) *.a *~ $(UNIT_TESTS)
    22 
    23 test: pEpEngineTest
    24 	LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest
    25 
    26 unit_tests: $(UNIT_TESTS)
    27 	for t in ./*_test ; do \
    28 		LD_LIBRARY_PATH=~/lib:../src $$t ; \
    29 	done
    30 
    31 install:
    32 	make -C .. install