test/Makefile
author Volker Birk <vb@pep-project.org>
Sun, 21 Feb 2016 22:37:59 +0100
changeset 458 72b4da3d4e2d
parent 457 7802147af797
child 645 0bb373719dce
permissions -rw-r--r--
adding some i18n support
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@458
    25
	rm -f *.o $(TARGET) *.a *~ $(UNIT_TESTS) pep_Dokument_Titel.pdf msg4.asc
vb@457
    26
	rm -Rf *.dSYM
vb@2
    27
vb@48
    28
test: pEpEngineTest
vb@2
    29
	LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest
vb@2
    30
vb@48
    31
unit_tests: $(UNIT_TESTS)
vb@50
    32
	for t in ./*_test ; do \
vb@200
    33
		if LD_LIBRARY_PATH=~/lib:../src $$t ; then true; else break; fi \
vb@50
    34
	done
vb@142
    35
vb@142
    36
install:
vb@142
    37
	make -C .. install