mirror of
https://github.com/solemnwarning/directplay-lite
synced 2024-12-30 16:45:37 +01:00
The threading model used for processing messages here will need redesigning; we can't allow the application to block the event loop when processing a message in case it calls something which won't return until a message is processed. Final model will probably use a pool of workers which will handle I/O one-at-a-time, blocking and allowing other threads to deal with the I/O when in the application message callback.
39 lines
1.6 KiB
Makefile
39 lines
1.6 KiB
Makefile
CXX := i686-w64-mingw32-g++
|
|
CXXFLAGS := -std=c++11 -Wall -D_WIN32_WINNT=0x0600 -ggdb
|
|
|
|
TEST_CXXFLAGS := $(CXXFLAGS) -I./googletest/include/
|
|
|
|
all: dpnet.dll
|
|
|
|
check: tests/all-tests.exe
|
|
ifeq ($(OS),Windows_NT)
|
|
tests/all-tests.exe
|
|
else
|
|
wine tests/all-tests.exe
|
|
endif
|
|
|
|
dpnet.dll: src/dpnet.o src/dpnet.def src/DirectPlay8Address.o src/DirectPlay8Peer.o src/network.o src/packet.o src/SendQueue.o src/AsyncHandleAllocator.o src/HostEnumerator.o src/COMAPIException.o
|
|
$(CXX) $(CXXFLAGS) -Wl,--enable-stdcall-fixup -shared -o $@ $^ -ldxguid -lws2_32 -static-libstdc++ -static-libgcc
|
|
|
|
tests/DirectPlay8Address.exe: tests/DirectPlay8Address.o src/DirectPlay8Address.o googletest/src/gtest-all.o googletest/src/gtest_main.o
|
|
$(CXX) $(TEST_CXXFLAGS) -o $@ $^ -ldxguid -lole32 -static-libstdc++ -static-libgcc
|
|
|
|
tests/PacketSerialiser.exe: tests/PacketSerialiser.o src/packet.o googletest/src/gtest-all.o googletest/src/gtest_main.o
|
|
$(CXX) $(TEST_CXXFLAGS) -o $@ $^ -ldxguid -lole32 -static-libstdc++ -static-libgcc
|
|
|
|
tests/all-tests.exe: tests/DirectPlay8Address.o src/DirectPlay8Address.o \
|
|
tests/PacketSerialiser.o tests/PacketDeserialiser.o src/packet.o \
|
|
tests/DirectPlay8Peer.o src/DirectPlay8Peer.o \
|
|
src/SendQueue.o src/AsyncHandleAllocator.o src/HostEnumerator.o src/network.o src/COMAPIException.o \
|
|
googletest/src/gtest-all.o googletest/src/gtest_main.o
|
|
$(CXX) $(TEST_CXXFLAGS) -o $@ $^ -ldxguid -lole32 -static-libstdc++ -static-libgcc -lws2_32
|
|
|
|
src/%.o: src/%.cpp
|
|
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
|
|
|
tests/%.o: tests/%.cpp
|
|
$(CXX) $(TEST_CXXFLAGS) -c -o $@ $<
|
|
|
|
googletest/src/%.o: googletest/src/%.cc
|
|
$(CXX) $(TEST_CXXFLAGS) -I./googletest/ -c -o $@ $<
|