test/Makefile
author Edouard Tisserant
Wed, 25 Mar 2015 18:42:23 +0100
changeset 134 53e0802d1d38
parent 66 805bfae3cdc4
child 142 025a3d115c2b
permissions -rw-r--r--
fixed gcc build
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)
Edouard@134
     6
LDFLAGS?=-L$(HOME)/lib
Edouard@134
     7
LDLIBS?=-letpan -lpEpEngine -lstdc++
vb@66
     8
CXXFLAGS?=-g -O0 -I../src
vb@2
     9
# CXXFLAGS=-O3 -DNDEBUG
vb@2
    10
vb@2
    11
TARGET=pEpEngineTest
vb@2
    12
vb@50
    13
UNIT_TESTS_SOURCE=$(wildcard *_test.cc)
vb@50
    14
UNIT_TESTS=$(subst .cc,,$(UNIT_TESTS_SOURCE))
vb@2
    15
vb@48
    16
all: $(TARGET) $(UNIT_TESTS)
vb@2
    17
vb@2
    18
.PHONY: clean
vb@2
    19
vb@2
    20
clean:
vb@48
    21
	rm -f *.o $(TARGET) *.a *~ $(UNIT_TESTS)
vb@2
    22
vb@48
    23
test: pEpEngineTest
vb@2
    24
	LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest
vb@2
    25
vb@48
    26
unit_tests: $(UNIT_TESTS)
vb@50
    27
	for t in ./*_test ; do \
vb@50
    28
		LD_LIBRARY_PATH=~/lib:../src $$t ; \
vb@50
    29
	done