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