Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added update_dota_elo/Makefile

fixed a compile error with update_dota_elo on Linux

git-svn-id: http://ghostplusplus.googlecode.com/svn/trunk@88 a7494f72-a4b0-11dd-a887-7ffe1a420f8d
  • Loading branch information...
commit 9541f1bb007fea9e2e1f741d8eada6b863e14ef2 1 parent 081cb25
hogantp authored
View
10 update_dota_elo.cfg
@@ -1,5 +1,5 @@
-db_mysql_server = localhost
-db_mysql_database = ghost
-db_mysql_user = YOUR_USERNAME
-db_mysql_password = YOUR_PASSWORD
-db_mysql_port = 0
+db_mysql_server = localhost
+db_mysql_database = ghost
+db_mysql_user = YOUR_USERNAME
+db_mysql_password = YOUR_PASSWORD
+db_mysql_port = 0
View
49 update_dota_elo/Makefile
@@ -0,0 +1,49 @@
+SHELL = /bin/sh
+SYSTEM = $(shell uname)
+C++ = g++
+DFLAGS =
+OFLAGS = -O3
+LFLAGS = -lmysqlclient
+CFLAGS =
+
+ifeq ($(SYSTEM),Darwin)
+DFLAGS += -D__APPLE__
+OFLAGS += -flat_namespace
+endif
+
+ifeq ($(SYSTEM),FreeBSD)
+DFLAGS += -D__FREEBSD__
+endif
+
+ifeq ($(SYSTEM),SunOS)
+DFLAGS += -D__SOLARIS__
+LFLAGS += -lresolv -lsocket -lnsl
+endif
+
+CFLAGS += $(OFLAGS) $(DFLAGS) -I. -I../ghost/
+
+GHOSTOBJS = config.o
+OBJS = elo.o update_dota_elo.o
+PROGS = ./update_dota_elo
+
+all: $(GHOSTOBJS) $(OBJS) $(PROGS)
+
+./update_dota_elo: $(GHOSTOBJS) $(OBJS) $(COBJS)
+ $(C++) -o ./update_dota_elo $(GHOSTOBJS) $(OBJS) $(LFLAGS)
+
+clean:
+ rm -f $(GHOSTOBJS) $(OBJS) $(PROGS)
+
+$(GHOSTOBJS): %.o: ../ghost/%.cpp
+ $(C++) -o $@ $(CFLAGS) -c $<
+
+$(OBJS): %.o: %.cpp
+ $(C++) -o $@ $(CFLAGS) -c $<
+
+./update_dota_elo: $(GHOSTOBJS) $(OBJS)
+
+all: $(PROGS)
+
+config.o: ../ghost/ghost.h ../ghost/config.h
+elo.o: elo.h
+update_dota_elo.o: ../ghost/config.h elo.h
View
7 update_dota_elo/update_dota_elo.cpp
@@ -28,7 +28,12 @@
using namespace std;
-#include "ms_stdint.h"
+#ifdef WIN32
+ #include "ms_stdint.h"
+#else
+ #include <stdint.h>
+#endif
+
#include "config.h"
#include "elo.h"
Please sign in to comment.
Something went wrong with that request. Please try again.