OSDN Git Service

gccでビルドが通らない問題を修正
authorh2so5 <in60jp@gmail.com>
Mon, 17 Sep 2012 04:19:12 +0000 (13:19 +0900)
committerh2so5 <h2so5@git.sourceforge.jp>
Mon, 17 Sep 2012 04:22:19 +0000 (13:22 +0900)
common/Logger.hpp
server/Makefile

index cc305ee..243819f 100644 (file)
@@ -10,7 +10,7 @@
 #include <boost/filesystem.hpp>
 
 #ifndef _WIN32
-#define OutputDebugString(str) (std::cout << str)
+#define OutputDebugString(str) (str)
 #endif
 
 class Logger {
index dc95532..adba71e 100644 (file)
@@ -13,11 +13,14 @@ OBJS += $(patsubst %.cpp,%.o,$(wildcard ../common/*.cpp))
 OBJS += $(patsubst %.cpp,%.o,$(wildcard ../common/network/*.cpp))
 OBJS += $(patsubst %.c,%.o,$(wildcard ../common/network/lz4/*.c))
 
-all: $(OBJS)
+all: stdafx.h.gch $(OBJS)
        $(LD) $(CXXFLAGS) -o $(TARGET) $(OBJS) $(LIBS) $(LIBDIRS)
 
 clean:
-       @rm -f $(OBJS) $(TARGET)
+       @rm -f $(OBJS) $(TARGET) stdafx.h.gch
 
 .cpp.o:
-       $(CXX) $(CXXFLAGS) -c -o $@ $<
+       $(CXX) $(CXXFLAGS) -include stdafx.h -c -o $@ $<
+
+stdafx.h.gch:
+       $(CXX) $(CXXFLAGS) stdafx.h