test/Makefile
author Roker <roker@pep-project.org>
Tue, 20 Sep 2016 15:54:57 +0200
branchroker-linux
changeset 1168 4d4e3ecbaf8b
parent 778 2740958d5401
permissions -rw-r--r--
merge "default" into my branch
     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 -fstack-protector-strong
     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 %_test_gdb : %_test
    39 	LD_LIBRARY_PATH=~/lib:../src gdb ./$<
    40 
    41 unit_tests: $(UNIT_TESTS) $(UNIT_TESTS_RUN)
    42 
    43 install:
    44 	make -C .. install