Skip to content

Commit 953ab3c

Browse files
author
hogantp
committed
added update_dota_elo/Makefile
fixed a compile error with update_dota_elo on Linux
1 parent 1429cf7 commit 953ab3c

File tree

3 files changed

+60
-6
lines changed

3 files changed

+60
-6
lines changed

update_dota_elo.cfg

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
db_mysql_server = localhost
2-
db_mysql_database = ghost
3-
db_mysql_user = YOUR_USERNAME
4-
db_mysql_password = YOUR_PASSWORD
5-
db_mysql_port = 0
1+
db_mysql_server = localhost
2+
db_mysql_database = ghost
3+
db_mysql_user = YOUR_USERNAME
4+
db_mysql_password = YOUR_PASSWORD
5+
db_mysql_port = 0

update_dota_elo/Makefile

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
SHELL = /bin/sh
2+
SYSTEM = $(shell uname)
3+
C++ = g++
4+
DFLAGS =
5+
OFLAGS = -O3
6+
LFLAGS = -lmysqlclient
7+
CFLAGS =
8+
9+
ifeq ($(SYSTEM),Darwin)
10+
DFLAGS += -D__APPLE__
11+
OFLAGS += -flat_namespace
12+
endif
13+
14+
ifeq ($(SYSTEM),FreeBSD)
15+
DFLAGS += -D__FREEBSD__
16+
endif
17+
18+
ifeq ($(SYSTEM),SunOS)
19+
DFLAGS += -D__SOLARIS__
20+
LFLAGS += -lresolv -lsocket -lnsl
21+
endif
22+
23+
CFLAGS += $(OFLAGS) $(DFLAGS) -I. -I../ghost/
24+
25+
GHOSTOBJS = config.o
26+
OBJS = elo.o update_dota_elo.o
27+
PROGS = ./update_dota_elo
28+
29+
all: $(GHOSTOBJS) $(OBJS) $(PROGS)
30+
31+
./update_dota_elo: $(GHOSTOBJS) $(OBJS) $(COBJS)
32+
$(C++) -o ./update_dota_elo $(GHOSTOBJS) $(OBJS) $(LFLAGS)
33+
34+
clean:
35+
rm -f $(GHOSTOBJS) $(OBJS) $(PROGS)
36+
37+
$(GHOSTOBJS): %.o: ../ghost/%.cpp
38+
$(C++) -o $@ $(CFLAGS) -c $<
39+
40+
$(OBJS): %.o: %.cpp
41+
$(C++) -o $@ $(CFLAGS) -c $<
42+
43+
./update_dota_elo: $(GHOSTOBJS) $(OBJS)
44+
45+
all: $(PROGS)
46+
47+
config.o: ../ghost/ghost.h ../ghost/config.h
48+
elo.o: elo.h
49+
update_dota_elo.o: ../ghost/config.h elo.h

update_dota_elo/update_dota_elo.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@
2828

2929
using namespace std;
3030

31-
#include "ms_stdint.h"
31+
#ifdef WIN32
32+
#include "ms_stdint.h"
33+
#else
34+
#include <stdint.h>
35+
#endif
36+
3237
#include "config.h"
3338
#include "elo.h"
3439

0 commit comments

Comments
 (0)