test/Makefile
author vb
Sat, 24 Jan 2015 15:26:40 +0100
changeset 46 7471e31bb278
parent 39 66b5cc6cb987
child 48 9ff5d2dfa75a
permissions -rw-r--r--
BUGFIX: init of transports wrong
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@46
     8
CXX=g++ -std=gnu++11 -DWIN32 -pthread
vb@2
     9
LD=g++
vb@46
    10
LDFLAGS=-L../src -lpEpEngine -lstdc++
vb@2
    11
else
vb@46
    12
CC=g++ -std=gnu++11 -pthread
vb@46
    13
CXX=g++ -std=gnu++11 -pthread
vb@2
    14
LD=g++
vb@46
    15
LDFLAGS=-L$(HOME)/lib -lpEpEngine -lstdc++
vb@2
    16
endif
vb@39
    17
CXXFLAGS=-g -O0 -I../src
vb@2
    18
# CXXFLAGS=-O3 -DNDEBUG
vb@2
    19
vb@2
    20
TARGET=pEpEngineTest
vb@2
    21
vb@2
    22
ifeq ($(BUILD_FOR),Windoze)
vb@2
    23
all: $(TARGET).exe
vb@2
    24
vb@2
    25
$(TARGET).exe: $(TARGET).o ../src/libpEpEngine.a
vb@2
    26
	$(CXX) $(LDFLAGS) -o $(TARGET).exe $(TARGET).o ../src/libpEpEngine.a
vb@2
    27
else ifeq ($(BUILD_FOR),MINGW32_NT-6.1)
vb@2
    28
all: $(TARGET).exe pEpEngine.dll
vb@2
    29
vb@2
    30
$(TARGET).exe: $(TARGET).o ../src/libpEpEngine.a
vb@2
    31
	$(CXX) $(LDFLAGS) -o $(TARGET).exe $(TARGET).o ../src/libpEpEngine.a
vb@2
    32
else
vb@2
    33
all: $(TARGET)
vb@2
    34
vb@2
    35
$(TARGET): $(TARGET).o
vb@2
    36
	$(CXX) $(LDFLAGS) -o $(TARGET) $(TARGET).o
vb@2
    37
endif
vb@2
    38
vb@2
    39
%.o: %.cc ../pEpEngine.h
vb@2
    40
	$(CXX) $(CXXFLAGS) -c -o $@ $<
vb@2
    41
vb@2
    42
pEpEngine.dll: ../src/pEpEngine.dll
vb@2
    43
	cp $< $@
vb@2
    44
vb@2
    45
.PHONY: clean
vb@2
    46
vb@2
    47
clean:
vb@39
    48
	rm -f *.o $(TARGET) *.exe *.a *~ pEpEngine.dll message_api_test
vb@2
    49
vb@2
    50
test: all
vb@2
    51
	LD_LIBRARY_PATH=~/lib:../src ./pEpEngineTest
vb@2
    52
vb@39
    53
message_api_test: message_api_test.o
vb@46
    54
	$(LD) $(LDFLAGS) -o message_api_test message_api_test.o
vb@39
    55