test/Makefile
author Roker <roker@pep-project.org>
Thu, 23 Jun 2016 16:18:49 +0200
changeset 762 3836d04a9af7
parent 745 32d7952cccfa
child 768 3db578658a38
child 770 265f59c3343f
permissions -rw-r--r--
setting of CXX?=... does not work
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
vb@645
     7
LDLIBS?=-letpan -lpEpEngine -lstdc++ -L../asn.1 -lasn1
roker@762
     8
CXXFLAGS?=-std=c++11 -g -O0 -I../src -I../asn.1
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))
Edouard@699
    19
UNIT_TESTS_RUN=$(subst .cc,_run,$(UNIT_TESTS_SOURCE))
vb@2
    20
vb@48
    21
all: $(TARGET) $(UNIT_TESTS)
vb@2
    22
vb@2
    23
.PHONY: clean
vb@2
    24
vb@2
    25
clean:
vb@458
    26
	rm -f *.o $(TARGET) *.a *~ $(UNIT_TESTS) pep_Dokument_Titel.pdf msg4.asc
vb@457
    27
	rm -Rf *.dSYM
vb@2
    28
vb@48
    29
test: pEpEngineTest
vb@2
    30
	LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest
vb@2
    31
Edouard@699
    32
%_test_run : %_test
Edouard@699
    33
	LD_LIBRARY_PATH=~/lib:../src ./$<
Edouard@699
    34
Edouard@745
    35
%_test_lldb : %_test
Edouard@745
    36
	LD_LIBRARY_PATH=~/lib:../src lldb ./$<
Edouard@745
    37
Edouard@699
    38
unit_tests: $(UNIT_TESTS) $(UNIT_TESTS_RUN)
vb@142
    39
vb@142
    40
install:
vb@142
    41
	make -C .. install