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
vb@2
     1
include ../Makefile.conf
vb@2
     2
vb@66
     3
CC?=g++ -std=gnu++11 -pthread
vb@66
     4
CXX?=g++ -std=gnu++11 -pthread
vb@66
     5
LD?=$(CXX)
vb@66
     6
LDFLAGS?=-L$(HOME)/lib -lpEpEngine -lstdc++
vb@66
     7
CXXFLAGS?=-g -O0 -I../src
vb@2
     8
# CXXFLAGS=-O3 -DNDEBUG
vb@2
     9
vb@2
    10
TARGET=pEpEngineTest
vb@2
    11
vb@50
    12
UNIT_TESTS_SOURCE=$(wildcard *_test.cc)
vb@50
    13
UNIT_TESTS=$(subst .cc,,$(UNIT_TESTS_SOURCE))
vb@2
    14
vb@48
    15
all: $(TARGET) $(UNIT_TESTS)
vb@2
    16
vb@2
    17
.PHONY: clean
vb@2
    18
vb@2
    19
clean:
vb@48
    20
	rm -f *.o $(TARGET) *.a *~ $(UNIT_TESTS)
vb@2
    21
vb@48
    22
test: pEpEngineTest
vb@2
    23
	LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest
vb@2
    24
vb@48
    25
unit_tests: $(UNIT_TESTS)
vb@50
    26
	for t in ./*_test ; do \
vb@50
    27
		LD_LIBRARY_PATH=~/lib:../src $$t ; \
vb@50
    28
	done