diff --git a/YSFGateway/Makefile b/YSFGateway/Makefile index ea5e6e7..0508eb8 100644 --- a/YSFGateway/Makefile +++ b/YSFGateway/Makefile @@ -1,19 +1,19 @@ CC = gcc CXX = g++ -CFLAGS = -g -O3 -Wall -std=c++0x -LIBS = +CFLAGS = -g -O3 -Wall -std=c++0x -pthread +LIBS = -lpthread LDFLAGS = -g OBJECTS = Network.o StopWatch.o Timer.o UDPSocket.o Utils.o YSFReflector.o -all: YSFReflector +all: YSFGateway -YSFReflector: $(OBJECTS) - $(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o YSFReflector +YSFGateway: $(OBJECTS) + $(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o YSFGateway %.o: %.cpp $(CXX) $(CFLAGS) -c -o $@ $< clean: - $(RM) YSFReflector *.o *.d *.bak *~ + $(RM) YSFGateway *.o *.d *.bak *~ \ No newline at end of file diff --git a/YSFGateway/Thread.cpp b/YSFGateway/Thread.cpp index 9f43374..b334436 100644 --- a/YSFGateway/Thread.cpp +++ b/YSFGateway/Thread.cpp @@ -61,6 +61,8 @@ void CThread::sleep(unsigned int ms) #else +#include + CThread::CThread() : m_thread() { diff --git a/YSFGateway/Thread.h b/YSFGateway/Thread.h index 8a6843f..352d938 100644 --- a/YSFGateway/Thread.h +++ b/YSFGateway/Thread.h @@ -41,7 +41,7 @@ public: private: #if defined(_WIN32) || defined(_WIN64) - HANDLE m_handle; + HANDLE m_handle; #else pthread_t m_thread; #endif