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
     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?=-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=~/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 %_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