test/Makefile
author Edouard Tisserant
Mon, 27 Jun 2016 11:14:12 +0200
changeset 770 265f59c3343f
parent 762 3836d04a9af7
child 778 2740958d5401
child 1201 571f488333be
permissions -rw-r--r--
added *_test_gdb target, hgignored garbage in build_linux
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@770
    38
%_test_gdb : %_test
Edouard@770
    39
	LD_LIBRARY_PATH=~/lib:../src gdb ./$<
Edouard@770
    40
Edouard@699
    41
unit_tests: $(UNIT_TESTS) $(UNIT_TESTS_RUN)
vb@142
    42
vb@142
    43
install:
vb@142
    44
	make -C .. install