summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/HPMHooking.c162
-rw-r--r--src/plugins/Makefile.in7
-rw-r--r--src/plugins/db2sql.c30
-rw-r--r--src/plugins/dbghelpplug.c9
-rw-r--r--src/plugins/sample.c22
5 files changed, 117 insertions, 113 deletions
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c
index c6fb6462d..4c15b06af 100644
--- a/src/plugins/HPMHooking.c
+++ b/src/plugins/HPMHooking.c
@@ -2,99 +2,99 @@
// See the LICENSE file
// Sample Hercules Plugin
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "../common/HPMi.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/socket.h"
+#include "common/HPMi.h"
+#include "common/db.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
#if defined (HPMHOOKING_LOGIN)
#define HPM_SERVER_TYPE SERVER_TYPE_LOGIN
-#define HPM_CORE_INCLUDE "../plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc"
-#define HPM_SYMBOL_INCLUDE "../plugins/HPMHooking/HPMHooking_login.GetSymbol.inc"
-#define HPM_HOOKS_INCLUDE "../plugins/HPMHooking/HPMHooking_login.Hooks.inc"
-#define HPM_POINTS_INCLUDE "../plugins/HPMHooking/HPMHooking_login.HookingPoints.inc"
-#define HPM_SOURCES_INCLUDE "../plugins/HPMHooking/HPMHooking_login.sources.inc"
-#include "../login/login.h"
+#define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_login.HPMHooksCore.inc"
+#define HPM_SYMBOL_INCLUDE "HPMHooking/HPMHooking_login.GetSymbol.inc"
+#define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking_login.Hooks.inc"
+#define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking_login.HookingPoints.inc"
+#define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_login.sources.inc"
+#include "login/login.h"
#elif defined (HPMHOOKING_CHAR)
#define HPM_SERVER_TYPE SERVER_TYPE_CHAR
-#define HPM_CORE_INCLUDE "../plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc"
-#define HPM_SYMBOL_INCLUDE "../plugins/HPMHooking/HPMHooking_char.GetSymbol.inc"
-#define HPM_HOOKS_INCLUDE "../plugins/HPMHooking/HPMHooking_char.Hooks.inc"
-#define HPM_POINTS_INCLUDE "../plugins/HPMHooking/HPMHooking_char.HookingPoints.inc"
-#define HPM_SOURCES_INCLUDE "../plugins/HPMHooking/HPMHooking_char.sources.inc"
-#include "../char/char.h"
-#include "../char/geoip.h"
-#include "../char/int_auction.h"
-#include "../char/int_elemental.h"
-#include "../char/int_guild.h"
-#include "../char/int_homun.h"
-#include "../char/int_mail.h"
-#include "../char/int_mercenary.h"
-#include "../char/int_party.h"
-#include "../char/int_pet.h"
-#include "../char/int_quest.h"
-#include "../char/int_storage.h"
-#include "../char/inter.h"
-#include "../char/loginif.h"
-#include "../char/mapif.h"
-#include "../char/pincode.h"
+#define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_char.HPMHooksCore.inc"
+#define HPM_SYMBOL_INCLUDE "HPMHooking/HPMHooking_char.GetSymbol.inc"
+#define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking_char.Hooks.inc"
+#define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking_char.HookingPoints.inc"
+#define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_char.sources.inc"
+#include "char/char.h"
+#include "char/geoip.h"
+#include "char/int_auction.h"
+#include "char/int_elemental.h"
+#include "char/int_guild.h"
+#include "char/int_homun.h"
+#include "char/int_mail.h"
+#include "char/int_mercenary.h"
+#include "char/int_party.h"
+#include "char/int_pet.h"
+#include "char/int_quest.h"
+#include "char/int_storage.h"
+#include "char/inter.h"
+#include "char/loginif.h"
+#include "char/mapif.h"
+#include "char/pincode.h"
#elif defined (HPMHOOKING_MAP)
#define HPM_SERVER_TYPE SERVER_TYPE_MAP
-#define HPM_CORE_INCLUDE "../plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc"
-#define HPM_SYMBOL_INCLUDE "../plugins/HPMHooking/HPMHooking_map.GetSymbol.inc"
-#define HPM_HOOKS_INCLUDE "../plugins/HPMHooking/HPMHooking_map.Hooks.inc"
-#define HPM_POINTS_INCLUDE "../plugins/HPMHooking/HPMHooking_map.HookingPoints.inc"
-#define HPM_SOURCES_INCLUDE "../plugins/HPMHooking/HPMHooking_map.sources.inc"
-#include "../map/atcommand.h"
-#include "../map/battle.h"
-#include "../map/battleground.h"
-#include "../map/channel.h"
-#include "../map/chat.h"
-#include "../map/chrif.h"
-#include "../map/clif.h"
-#include "../map/duel.h"
-#include "../map/elemental.h"
-#include "../map/guild.h"
-#include "../map/homunculus.h"
-#include "../map/instance.h"
-#include "../map/intif.h"
-#include "../map/irc-bot.h"
-#include "../map/itemdb.h"
-#include "../map/log.h"
-#include "../map/mail.h"
-#include "../map/map.h"
-#include "../map/mapreg.h"
-#include "../map/mercenary.h"
-#include "../map/mob.h"
-#include "../map/npc.h"
-#include "../map/npc.h"
-#include "../map/party.h"
-#include "../map/path.h"
-#include "../map/pc.h"
-#include "../map/pet.h"
-#include "../map/quest.h"
-#include "../map/script.h"
-#include "../map/skill.h"
-#include "../map/status.h"
-#include "../map/storage.h"
-#include "../map/trade.h"
-#include "../map/unit.h"
+#define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_map.HPMHooksCore.inc"
+#define HPM_SYMBOL_INCLUDE "HPMHooking/HPMHooking_map.GetSymbol.inc"
+#define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking_map.Hooks.inc"
+#define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking_map.HookingPoints.inc"
+#define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_map.sources.inc"
+#include "map/atcommand.h"
+#include "map/battle.h"
+#include "map/battleground.h"
+#include "map/channel.h"
+#include "map/chat.h"
+#include "map/chrif.h"
+#include "map/clif.h"
+#include "map/duel.h"
+#include "map/elemental.h"
+#include "map/guild.h"
+#include "map/homunculus.h"
+#include "map/instance.h"
+#include "map/intif.h"
+#include "map/irc-bot.h"
+#include "map/itemdb.h"
+#include "map/log.h"
+#include "map/mail.h"
+#include "map/map.h"
+#include "map/mapreg.h"
+#include "map/mercenary.h"
+#include "map/mob.h"
+#include "map/npc.h"
+#include "map/npc.h"
+#include "map/party.h"
+#include "map/path.h"
+#include "map/pc.h"
+#include "map/pet.h"
+#include "map/quest.h"
+#include "map/script.h"
+#include "map/skill.h"
+#include "map/status.h"
+#include "map/storage.h"
+#include "map/trade.h"
+#include "map/unit.h"
#else
#define HPM_SERVER_TYPE SERVER_TYPE_UNKNOWN
-#define HPM_CORE_INCLUDE "../plugins/HPMHooking/HPMHooking.HPMHooksCore.inc"
-#define HPM_SYMBOL_INCLUDE "../plugins/HPMHooking/HPMHooking.GetSymbol.inc"
-#define HPM_HOOKS_INCLUDE "../plugins/HPMHooking/HPMHooking.Hooks.inc"
-#define HPM_POINTS_INCLUDE "../plugins/HPMHooking/HPMHooking.HookingPoints.inc"
-#define HPM_SOURCES_INCLUDE "../plugins/HPMHooking/HPMHooking.sources.inc"
+#define HPM_CORE_INCLUDE "HPMHooking/HPMHooking.HPMHooksCore.inc"
+#define HPM_SYMBOL_INCLUDE "HPMHooking/HPMHooking.GetSymbol.inc"
+#define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking.Hooks.inc"
+#define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking.HookingPoints.inc"
+#define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking.sources.inc"
#error HPMHooking plugin needs to be compiled for a specific server type. Please make sure your Makefiles are up to date.
#endif
-#include "../common/HPMDataCheck.h"
+#include "common/HPMDataCheck.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
HPExport struct hplugin_info pinfo = {
"HPMHooking", // Plugin name
diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in
index 802d1015a..3184353d1 100644
--- a/src/plugins/Makefile.in
+++ b/src/plugins/Makefile.in
@@ -32,6 +32,9 @@ PLUGINS = sample db2sql HPMHooking_char HPMHooking_login HPMHooking_map $(MYPLUG
COMMON_D = ../common
COMMON_H = $(wildcard $(COMMON_D)/*.h)
+COMMON_INCLUDE = -I..
+
+THIRDPARTY_INCLUDE = -I../../3rdparty
CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
@@ -84,7 +87,7 @@ Makefile: Makefile.in
../../plugins/%@DLLEXT@: %.c $(ALL_H) $$(shell ls %/* 2>/dev/null)
@echo " CC $<"
- @$(CC) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $<
+ @$(CC) $(COMMON_INCLUDE) $(THIRDPARTY_INCLUDE) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $<
../../plugins/HPMHooking_login@DLLEXT@: HPMHOOKINGTYPE = LOGIN
../../plugins/HPMHooking_char@DLLEXT@: HPMHOOKINGTYPE = CHAR
@@ -92,4 +95,4 @@ Makefile: Makefile.in
../../plugins/HPMHooking_%@DLLEXT@: HPMHooking.c $(ALL_H) $$(shell ls HPMHooking/*_%* HPMHooking/*_common* 2>/dev/null)
@echo " CC $< ($(HPMHOOKINGTYPE))"
- @$(CC) -DHPMHOOKING_$(HPMHOOKINGTYPE) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $<
+ @$(CC) -DHPMHOOKING_$(HPMHOOKINGTYPE) $(COMMON_INCLUDE) $(THIRDPARTY_INCLUDE) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $<
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index 1e27058c0..7cef173d2 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -1,25 +1,25 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#include "../config/core.h"
+#include "config/core.h"
+
+#include "common/HPMi.h"
+#include "common/cbasetypes.h"
+#include "common/conf.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+#include "map/clif.h"
+#include "map/itemdb.h"
+#include "map/map.h"
+#include "map/pc.h"
+
+#include "common/HPMDataCheck.h"
#include <stdio.h>
#include <stdlib.h>
-#include "../common/HPMi.h"
-#include "../common/cbasetypes.h"
-#include "../common/conf.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
-#include "../map/clif.h"
-#include "../map/itemdb.h"
-#include "../map/map.h"
-#include "../map/pc.h"
-
-#include "../common/HPMDataCheck.h"
-
HPExport struct hplugin_info pinfo = {
"DB2SQL", // Plugin name
SERVER_TYPE_MAP, // Which server types this plugin works with?
diff --git a/src/plugins/dbghelpplug.c b/src/plugins/dbghelpplug.c
index ac72b8eb2..6ed16d7a6 100644
--- a/src/plugins/dbghelpplug.c
+++ b/src/plugins/dbghelpplug.c
@@ -5,12 +5,13 @@
// Ported from eAthena Dev Team's version @ http://eathena-project.googlecode.com/svn/trunk/src/plugins/dbghelpplug.c
// Currently supported dbghelp 5.1
+#include "common/sysinfo.h"
+#include "common/HPMi.h"
+
+#include "common/HPMDataCheck.h"
+
#include <stdio.h>
#include <string.h>
-#include "../common/sysinfo.h"
-#include "../common/HPMi.h"
-
-#include "../common/HPMDataCheck.h"
/**
* Plugin basic information
diff --git a/src/plugins/sample.c b/src/plugins/sample.c
index 82cb198bd..b034775b0 100644
--- a/src/plugins/sample.c
+++ b/src/plugins/sample.c
@@ -2,21 +2,21 @@
// See the LICENSE file
// Sample Hercules Plugin
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/clif.h"
+#include "map/pc.h"
+#include "map/script.h"
+
+#include "common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "../common/HPMi.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../map/clif.h"
-#include "../map/pc.h"
-#include "../map/script.h"
-
-#include "../common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
-
HPExport struct hplugin_info pinfo = {
"Sample", // Plugin name
SERVER_TYPE_CHAR|SERVER_TYPE_LOGIN|SERVER_TYPE_MAP,// Which server types this plugin works with?