test/Makefile
author Volker Birk <vb@pep.foundation>
Tue, 18 Oct 2016 19:31:38 +0200
changeset 1310 f4089c6c5649
parent 1304 049a46c6519f
child 1422 860391e5e5b9
permissions -rw-r--r--
correcting 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
vb@1304
     7
LDLIBS?=-letpan -lpEpEngine -lstdc++ -L../asn.1 -lasn1
vb@1304
     8
ifeq ($(BUILD_FOR),Linux)
vb@1310
     9
	LDLIBS+= -luuid
vb@1304
    10
endif
roker@762
    11
CXXFLAGS?=-std=c++11 -g -O0 -I../src -I../asn.1
vb@2
    12
# CXXFLAGS=-O3 -DNDEBUG
vb@2
    13
Edouard@178
    14
ifeq ("$(OPENPGP)","NETPGP")
Edouard@178
    15
	LDLIBS+= -lnetpgp
Edouard@178
    16
endif
Edouard@178
    17
vb@2
    18
TARGET=pEpEngineTest
vb@2
    19
vb@50
    20
UNIT_TESTS_SOURCE=$(wildcard *_test.cc)
vb@50
    21
UNIT_TESTS=$(subst .cc,,$(UNIT_TESTS_SOURCE))
Edouard@699
    22
UNIT_TESTS_RUN=$(subst .cc,_run,$(UNIT_TESTS_SOURCE))
vb@2
    23
vb@48
    24
all: $(TARGET) $(UNIT_TESTS)
vb@2
    25
vb@2
    26
.PHONY: clean
vb@2
    27
vb@2
    28
clean:
vb@458
    29
	rm -f *.o $(TARGET) *.a *~ $(UNIT_TESTS) pep_Dokument_Titel.pdf msg4.asc
vb@457
    30
	rm -Rf *.dSYM
vb@2
    31
vb@48
    32
test: pEpEngineTest
vb@2
    33
	LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest
vb@2
    34
Edouard@699
    35
%_test_run : %_test
Edouard@699
    36
	LD_LIBRARY_PATH=~/lib:../src ./$<
Edouard@699
    37
Edouard@745
    38
%_test_lldb : %_test
Edouard@745
    39
	LD_LIBRARY_PATH=~/lib:../src lldb ./$<
Edouard@745
    40
Edouard@770
    41
%_test_gdb : %_test
Edouard@770
    42
	LD_LIBRARY_PATH=~/lib:../src gdb ./$<
Edouard@770
    43
Edouard@699
    44
unit_tests: $(UNIT_TESTS) $(UNIT_TESTS_RUN)
vb@142
    45
vb@142
    46
install:
vb@142
    47
	make -C .. install