test/Makefile
author Roker <roker@pep-project.org>
Thu, 23 Jun 2016 16:17:32 +0200
branchroker-linux
changeset 761 04fc0f0a3dc3
parent 758 9679c776ff5e
child 768 3db578658a38
permissions -rw-r--r--
setting of CXX?=... does not work
     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)/local/lib
     7 LDLIBS?=-letpan -lpEpEngine -lstdc++ -L../asn.1 -lasn1
     8 CXXFLAGS?=-std=c++11 -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=~/local/lib:../src ./pEpEngineTest
    31 
    32 %_test_run : %_test
    33 	LD_LIBRARY_PATH=~/local/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