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