test/Makefile
author vb
Wed, 25 Jun 2014 18:48:18 +0200
changeset 2 f1fc3afacfd6
child 39 66b5cc6cb987
permissions -rw-r--r--
extra files for db and testing
     1 include ../Makefile.conf
     2 
     3 ifeq ($(BUILD_FOR),Windoze)
     4 CXX=i686-w64-mingw32-g++
     5 LD=i686-w64-mingw32-c++
     6 LDFLAGS=-lstdc++
     7 else ifeq ($(BUILD_FOR),MINGW32_NT-6.1)
     8 CXX=g++ -std=gnu++11 -DWIN32
     9 LD=g++
    10 LDFLAGS=-pthread -L../src -lpEpEngine -lstdc++
    11 else
    12 CXX=g++ -std=gnu++11
    13 LD=g++
    14 LDFLAGS=-L~/lib -pthread -L../src -lpEpEngine -lstdc++
    15 endif
    16 CXXFLAGS=-g -O0
    17 # CXXFLAGS=-O3 -DNDEBUG
    18 
    19 TARGET=pEpEngineTest
    20 
    21 ifeq ($(BUILD_FOR),Windoze)
    22 all: $(TARGET).exe
    23 
    24 $(TARGET).exe: $(TARGET).o ../src/libpEpEngine.a
    25 	$(CXX) $(LDFLAGS) -o $(TARGET).exe $(TARGET).o ../src/libpEpEngine.a
    26 else ifeq ($(BUILD_FOR),MINGW32_NT-6.1)
    27 all: $(TARGET).exe pEpEngine.dll
    28 
    29 $(TARGET).exe: $(TARGET).o ../src/libpEpEngine.a
    30 	$(CXX) $(LDFLAGS) -o $(TARGET).exe $(TARGET).o ../src/libpEpEngine.a
    31 else
    32 all: $(TARGET)
    33 
    34 $(TARGET): $(TARGET).o
    35 	$(CXX) $(LDFLAGS) -o $(TARGET) $(TARGET).o
    36 endif
    37 
    38 %.o: %.cc ../pEpEngine.h
    39 	$(CXX) $(CXXFLAGS) -c -o $@ $<
    40 
    41 pEpEngine.dll: ../src/pEpEngine.dll
    42 	cp $< $@
    43 
    44 .PHONY: clean
    45 
    46 clean:
    47 	rm -f *.o $(TARGET) *.exe *.a *~ pEpEngine.dll
    48 
    49 test: all
    50 	LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest
    51