summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--Makefile33
-rw-r--r--src/common/cbasetypes.h4
-rw-r--r--src/common/grfio.c4
-rw-r--r--src/common/mapindex.c2
5 files changed, 42 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index a080b8536..f6fffb1d0 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -5,6 +5,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/03/02
+ * Applied Snufkin's patch to fix compilation on FreeBSD. [Skotlex]
* Fixed mobs targetting themselves after using a support skill. [Skotlex]
* Gospel no longer blocks item usage of whoever is in the area of effect,
only the caster of Gospel can't use healing items now. [Skotlex]
diff --git a/Makefile b/Makefile
index e2c37ffe3..14bc1b204 100644
--- a/Makefile
+++ b/Makefile
@@ -208,3 +208,36 @@ src/map/GNUmakefile: src/map/Makefile
src/plugins/GNUmakefile: src/plugins/Makefile
src/ladmin/GNUmakefile: src/ladmin/Makefile
src/txt-converter/GNUmakefile: src/txt-converter/Makefile
+
+install: conf/%.conf conf/%.txt
+ $(shell mkdir -p /opt/eathena/bin/)
+ $(shell mkdir -p /opt/eathena/etc/eathena/)
+ $(shell mkdir -p /opt/eathena/var/log/eathena/)
+ $(shell mv save /opt/eathena/etc/eathena/save)
+ $(shell mv db /opt/eathena/etc/eathena/db)
+ $(shell mv conf /opt/eathena/etc/eathena/conf)
+ $(shell mv npc /opt/eathena/etc/eathena/npc)
+ $(shell mv log/* /opt/eathena/var/log/eathena/)
+ $(shell cp *-server* /opt/eathena/bin/)
+ $(shell cp ladmin /opt/eathena/bin/)
+ $(shell ln -s /opt/eathena/etc/eathena/save/ /opt/eathena/bin/)
+ $(shell ln -s /opt/eathena/etc/eathena/db/ /opt/eathena/bin/)
+ $(shell ln -s /opt/eathena/etc/eathena/conf/ /opt/eathena/bin/)
+ $(shell ln -s /opt/eathena/etc/eathena/npc/ /opt/eathena/bin/)
+ $(shell ln -s /opt/eathena/var/log/eathena/ /opt/eathena/bin/log)
+
+bin-clean:
+ $(shell rm /opt/eathena/bin/login-server*)
+ $(shell rm /opt/eathena/bin/char-server*)
+ $(shell rm /opt/eathena/bin/map-server*)
+ $(shell rm /opt/eathena/bin/ladmin)
+
+uninstall:
+ bin-clean
+ $(shell rm /opt/eathena/bin/save)
+ $(shell rm /opt/eathena/bin/db)
+ $(shell rm /opt/eathena/bin/conf)
+ $(shell rm /opt/eathena/bin/npc)
+ $(shell rm /opt/eathena/bin/log)
+ $(shell rm -rf /opt/eathena/etc/eathena)
+ $(shell rm -rf /opt/eathena/var/log/eathena)
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index ff9109dd1..505eb6752 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -59,9 +59,13 @@
typedef unsigned char uchar;
typedef signed char schar;
typedef signed short sshort;
+#ifndef __FREEBSD__
typedef unsigned short ushort;
+#endif
typedef signed int sint; // don't use (only for ie. scanf)
+#ifndef __FREEBSD__
typedef unsigned int uint; // don't use
+#endif
typedef signed long slong; // don't use (only for ie. file-io)
typedef unsigned long ulong; // don't use
diff --git a/src/common/grfio.c b/src/common/grfio.c
index eef4ea654..fcc1ee461 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -40,7 +40,9 @@
#include "../zlib/zlib.h"
#include "../zlib/iowin32.h"
#else
- #include <zlib.h>
+ #ifndef __FREEBSD__
+ #include <zlib.h>
+ #endif
#endif
typedef unsigned char BYTE;
diff --git a/src/common/mapindex.c b/src/common/mapindex.c
index e600b5ad7..156dc6243 100644
--- a/src/common/mapindex.c
+++ b/src/common/mapindex.c
@@ -2,7 +2,7 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include <showmsg.h>
+#include "showmsg.h"
#define MAX_MAPINDEX 2000