test/Makefile
author Edouard Tisserant
Thu, 02 Apr 2015 16:19:23 +0200
changeset 178 77d056daf06d
parent 165 f0894860af4a
child 200 06655f7634a6
permissions -rw-r--r--
netpgp : updated tests makefile
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
Edouard@178
    11
ifeq ("$(OPENPGP)","NETPGP")
Edouard@178
    12
	LDLIBS+= -lnetpgp
Edouard@178
    13
endif
Edouard@178
    14
vb@2
    15
TARGET=pEpEngineTest
vb@2
    16
vb@50
    17
UNIT_TESTS_SOURCE=$(wildcard *_test.cc)
vb@50
    18
UNIT_TESTS=$(subst .cc,,$(UNIT_TESTS_SOURCE))
vb@2
    19
vb@48
    20
all: $(TARGET) $(UNIT_TESTS)
vb@2
    21
vb@2
    22
.PHONY: clean
vb@2
    23
vb@2
    24
clean:
vb@165
    25
	rm -f *.o $(TARGET) *.a *~ $(UNIT_TESTS) pep_Dokument_Titel.pdf
vb@2
    26
vb@48
    27
test: pEpEngineTest
vb@2
    28
	LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest
vb@2
    29
vb@48
    30
unit_tests: $(UNIT_TESTS)
vb@50
    31
	for t in ./*_test ; do \
vb@50
    32
		LD_LIBRARY_PATH=~/lib:../src $$t ; \
vb@50
    33
	done
vb@142
    34
vb@142
    35
install:
vb@142
    36
	make -C .. install