test/Makefile
author Edouard Tisserant
Sun, 19 Jun 2016 15:25:25 +0200
changeset 745 32d7952cccfa
parent 699 5665c57e9965
child 758 9679c776ff5e
child 762 3836d04a9af7
permissions -rw-r--r--
Make a consistent error when cannot decrypt because of missing key
     1 include ../Makefile.conf
     2 
     3 CC?=g++ -std=gnu++11 -pthread
     4 CXX?=g++ -std=gnu++11 -pthread
     5 LD?=$(CXX)
     6 LDFLAGS?=-L$(HOME)/lib
     7 LDLIBS?=-letpan -lpEpEngine -lstdc++ -L../asn.1 -lasn1
     8 CXXFLAGS?=-g -O0 -I../src -I../asn.1
     9 # CXXFLAGS=-O3 -DNDEBUG
    10 
    11 ifeq ("$(OPENPGP)","NETPGP")
    12 	LDLIBS+= -lnetpgp
    13 endif
    14 
    15 TARGET=pEpEngineTest
    16 
    17 UNIT_TESTS_SOURCE=$(wildcard *_test.cc)
    18 UNIT_TESTS=$(subst .cc,,$(UNIT_TESTS_SOURCE))
    19 UNIT_TESTS_RUN=$(subst .cc,_run,$(UNIT_TESTS_SOURCE))
    20 
    21 all: $(TARGET) $(UNIT_TESTS)
    22 
    23 .PHONY: clean
    24 
    25 clean:
    26 	rm -f *.o $(TARGET) *.a *~ $(UNIT_TESTS) pep_Dokument_Titel.pdf msg4.asc
    27 	rm -Rf *.dSYM
    28 
    29 test: pEpEngineTest
    30 	LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest
    31 
    32 %_test_run : %_test
    33 	LD_LIBRARY_PATH=~/lib:../src ./$<
    34 
    35 %_test_lldb : %_test
    36 	LD_LIBRARY_PATH=~/lib:../src lldb ./$<
    37 
    38 unit_tests: $(UNIT_TESTS) $(UNIT_TESTS_RUN)
    39 
    40 install:
    41 	make -C .. install