test/Makefile
author Edouard Tisserant
Thu, 02 Apr 2015 16:19:23 +0200
changeset 178 77d056daf06d
parent 165 f0894860af4a
child 200 06655f7634a6
permissions -rw-r--r--
netpgp : updated tests makefile
     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++
     8 CXXFLAGS?=-g -O0 -I../src
     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 
    20 all: $(TARGET) $(UNIT_TESTS)
    21 
    22 .PHONY: clean
    23 
    24 clean:
    25 	rm -f *.o $(TARGET) *.a *~ $(UNIT_TESTS) pep_Dokument_Titel.pdf
    26 
    27 test: pEpEngineTest
    28 	LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest
    29 
    30 unit_tests: $(UNIT_TESTS)
    31 	for t in ./*_test ; do \
    32 		LD_LIBRARY_PATH=~/lib:../src $$t ; \
    33 	done
    34 
    35 install:
    36 	make -C .. install