summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-06-01 17:13:08 +0200
committerHaru <haru@dotalux.com>2015-06-19 12:38:06 +0200
commit080980071b952141275526f1745d8d74c10e4deb (patch)
tree724303ad5623d22f23a861a3ca3052724577520c /src/login
parente81d221cdd79da16f5f013ecb45ecbff192971fe (diff)
downloadhercules-080980071b952141275526f1745d8d74c10e4deb.tar.gz
hercules-080980071b952141275526f1745d8d74c10e4deb.tar.bz2
hercules-080980071b952141275526f1745d8d74c10e4deb.tar.xz
hercules-080980071b952141275526f1745d8d74c10e4deb.zip
Removed ".." from include directives
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/login')
-rw-r--r--src/login/HPMlogin.c32
-rw-r--r--src/login/HPMlogin.h4
-rw-r--r--src/login/Makefile.in12
-rw-r--r--src/login/account.h6
-rw-r--r--src/login/account_sql.c22
-rw-r--r--src/login/ipban.h2
-rw-r--r--src/login/ipban_sql.c22
-rw-r--r--src/login/login.c34
-rw-r--r--src/login/login.h4
-rw-r--r--src/login/loginlog.h2
-rw-r--r--src/login/loginlog_sql.c14
11 files changed, 78 insertions, 76 deletions
diff --git a/src/login/HPMlogin.c b/src/login/HPMlogin.c
index 6b223d249..c9e0e094c 100644
--- a/src/login/HPMlogin.c
+++ b/src/login/HPMlogin.c
@@ -5,27 +5,27 @@
#include "HPMlogin.h"
+#include "common/HPM.h"
+#include "common/cbasetypes.h"
+#include "common/conf.h"
+#include "common/db.h"
+#include "common/des.h"
+#include "common/ers.h"
+#include "common/malloc.h"
+#include "common/mapindex.h"
+#include "common/mmo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/sysinfo.h"
+
+#include "common/HPMDataCheck.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include "../common/HPM.h"
-#include "../common/cbasetypes.h"
-#include "../common/conf.h"
-#include "../common/db.h"
-#include "../common/des.h"
-#include "../common/ers.h"
-#include "../common/malloc.h"
-#include "../common/mapindex.h"
-#include "../common/mmo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/sysinfo.h"
-
-#include "../common/HPMDataCheck.h"
-
bool HPM_login_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) {
/* record address */
switch( type ) {
diff --git a/src/login/HPMlogin.h b/src/login/HPMlogin.h
index 6e01eae01..2a4d5c538 100644
--- a/src/login/HPMlogin.h
+++ b/src/login/HPMlogin.h
@@ -8,8 +8,8 @@
#error You should never include HPMlogin.h from a plugin.
#endif
-#include "../common/cbasetypes.h"
-#include "../common/HPM.h"
+#include "common/cbasetypes.h"
+#include "common/HPM.h"
struct hplugin;
diff --git a/src/login/Makefile.in b/src/login/Makefile.in
index 9b1db69c2..60382dc87 100644
--- a/src/login/Makefile.in
+++ b/src/login/Makefile.in
@@ -9,18 +9,20 @@ CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
COMMON_H = $(wildcard $(COMMON_D)/*.h)
SYSINFO_INC = $(COMMON_D)/sysinfo.inc
+COMMON_INCLUDE = -I..
-LIBCONFIG_D = ../../3rdparty/libconfig
+THIRDPARTY_D = ../../3rdparty
+THIRDPARTY_INCLUDE = -I$(THIRDPARTY_D)
+
+LIBCONFIG_D = $(THIRDPARTY_D)/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
scanner.o strbuf.o)
LIBCONFIG_H = $(addprefix $(LIBCONFIG_D)/, libconfig.h grammar.h parsectx.h \
scanctx.h scanner.h strbuf.h wincompat.h)
-LIBCONFIG_INCLUDE = -I$(LIBCONFIG_D)
-MT19937AR_D = ../../3rdparty/mt19937ar
+MT19937AR_D = $(THIRDPARTY_D)/mt19937ar
MT19937AR_OBJ = $(MT19937AR_D)/mt19937ar.o
MT19937AR_H = $(MT19937AR_D)/mt19937ar.h
-MT19937AR_INCLUDE = -I$(MT19937AR_D)
LOGIN_C = account_sql.c HPMlogin.c ipban_sql.c login.c loginlog_sql.c
LOGIN_OBJ = $(addprefix obj_sql/, $(patsubst %.c,%.o,$(LOGIN_C)))
@@ -94,7 +96,7 @@ login-server: ../../login-server@EXEEXT@
obj_sql/%.o: %.c $(LOGIN_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj_sql
@echo " CC $<"
- @$(CC) @CFLAGS@ @DEFS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+ @$(CC) @CFLAGS@ @DEFS@ $(COMMON_INCLUDE) $(THIRDPARTY_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
# missing object files
$(COMMON_D)/obj_all/common.a:
diff --git a/src/login/account.h b/src/login/account.h
index 82ae28bbb..1e95c19de 100644
--- a/src/login/account.h
+++ b/src/login/account.h
@@ -5,9 +5,9 @@
#ifndef LOGIN_ACCOUNT_H
#define LOGIN_ACCOUNT_H
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h" // ACCOUNT_REG2_NUM
-#include "../common/sql.h" // Sql
+#include "common/cbasetypes.h"
+#include "common/mmo.h" // ACCOUNT_REG2_NUM
+#include "common/sql.h" // Sql
typedef struct AccountDB AccountDB;
typedef struct AccountDBIterator AccountDBIterator;
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 8975250b8..8696666e3 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -4,22 +4,22 @@
#define HERCULES_CORE
-#include "../config/core.h" // CONSOLE_INPUT
+#include "config/core.h" // CONSOLE_INPUT
#include "account.h"
+#include "common/console.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+
#include <stdlib.h>
#include <string.h>
-#include "../common/console.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/sql.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
-
/// global defines
#define ACCOUNT_SQL_DB_VERSION 20110114
diff --git a/src/login/ipban.h b/src/login/ipban.h
index c6535ec10..8f3cac16c 100644
--- a/src/login/ipban.h
+++ b/src/login/ipban.h
@@ -4,7 +4,7 @@
#ifndef LOGIN_IPBAN_H
#define LOGIN_IPBAN_H
-#include "../common/cbasetypes.h"
+#include "common/cbasetypes.h"
#ifdef HERCULES_CORE
// TODO: Interface
diff --git a/src/login/ipban_sql.c b/src/login/ipban_sql.c
index f995450ce..533ee3c4c 100644
--- a/src/login/ipban_sql.c
+++ b/src/login/ipban_sql.c
@@ -6,20 +6,20 @@
#include "ipban.h"
+#include "login/login.h"
+#include "login/loginlog.h"
+#include "common/cbasetypes.h"
+#include "common/db.h"
+#include "common/malloc.h"
+#include "common/nullpo.h"
+#include "common/sql.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+
#include <stdlib.h>
#include <string.h>
-#include "login.h"
-#include "loginlog.h"
-#include "../common/cbasetypes.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/nullpo.h"
-#include "../common/sql.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
-
// global sql settings
static char global_db_hostname[32] = "127.0.0.1";
static uint16 global_db_port = 3306;
diff --git a/src/login/login.c b/src/login/login.c
index 9c01c3956..9175bed56 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -6,27 +6,27 @@
#include "login.h"
+#include "login/HPMlogin.h"
+#include "login/account.h"
+#include "login/ipban.h"
+#include "login/loginlog.h"
+#include "common/HPM.h"
+#include "common/core.h"
+#include "common/db.h"
+#include "common/malloc.h"
+#include "common/md5calc.h"
+#include "common/nullpo.h"
+#include "common/random.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+#include "common/utils.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "HPMlogin.h"
-#include "account.h"
-#include "ipban.h"
-#include "loginlog.h"
-#include "../common/HPM.h"
-#include "../common/core.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/md5calc.h"
-#include "../common/nullpo.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
-#include "../common/utils.h"
-
struct login_interface login_s;
struct Login_Config login_config;
struct mmo_char_server server[MAX_SERVERS]; // char server data
diff --git a/src/login/login.h b/src/login/login.h
index 22bae50e0..5343b31a0 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -5,8 +5,8 @@
#ifndef LOGIN_LOGIN_H
#define LOGIN_LOGIN_H
-#include "../common/core.h" // CORE_ST_LAST
-#include "../common/mmo.h" // NAME_LENGTH,SEX_*
+#include "common/core.h" // CORE_ST_LAST
+#include "common/mmo.h" // NAME_LENGTH,SEX_*
struct mmo_account;
struct AccountDB;
diff --git a/src/login/loginlog.h b/src/login/loginlog.h
index 2104ff277..f4327764a 100644
--- a/src/login/loginlog.h
+++ b/src/login/loginlog.h
@@ -4,7 +4,7 @@
#ifndef LOGIN_LOGINLOG_H
#define LOGIN_LOGINLOG_H
-#include "../common/cbasetypes.h"
+#include "common/cbasetypes.h"
#ifdef HERCULES_CORE
// TODO: Interface
diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c
index 2c6f76e38..da9beda4f 100644
--- a/src/login/loginlog_sql.c
+++ b/src/login/loginlog_sql.c
@@ -6,16 +6,16 @@
#include "loginlog.h"
+#include "common/cbasetypes.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h"
+
#include <string.h>
#include <stdlib.h> // exit
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/socket.h"
-#include "../common/sql.h"
-#include "../common/strlib.h"
-
// global sql settings (in ipban_sql.c)
static char global_db_hostname[32] = "127.0.0.1";
static uint16 global_db_port = 3306;