summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/Makefile29
-rw-r--r--src/map/atcommand.c8
-rw-r--r--src/map/battle.c8
-rw-r--r--src/map/chat.c6
-rw-r--r--src/map/chrif.c6
-rw-r--r--src/map/clif.c12
-rw-r--r--src/map/guild.c10
-rw-r--r--src/map/intif.c6
-rw-r--r--src/map/itemdb.c8
-rw-r--r--src/map/magic-interpreter-lexer.l (renamed from src/map/magic-interpreter.l)0
-rw-r--r--src/map/magic-interpreter-parser.y2
-rw-r--r--src/map/magic-interpreter.h4
-rw-r--r--src/map/map.c14
-rw-r--r--src/map/map.h2
-rw-r--r--src/map/mob.c10
-rw-r--r--src/map/npc.c8
-rw-r--r--src/map/party.c10
-rw-r--r--src/map/path.c2
-rw-r--r--src/map/pc.c10
-rw-r--r--src/map/script.c12
-rw-r--r--src/map/skill-pools.c6
-rw-r--r--src/map/skill.c6
-rw-r--r--src/map/tmw.c10
-rw-r--r--src/map/trade.c2
24 files changed, 96 insertions, 95 deletions
diff --git a/src/map/Makefile b/src/map/Makefile
index a1a4381..c7c982e 100644
--- a/src/map/Makefile
+++ b/src/map/Makefile
@@ -2,27 +2,25 @@ include ../../make.defs
all: txt
-txt: obj map-server
+txt: map
obj:
mkdir obj
COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/grfio.o ../common/db.o ../common/lock.o ../common/nullpo.o ../common/malloc.o ../common/mt_rand.o ../common/md5calc.o
-LIBS = -lz -lm
+LDLIBS = -lz -lm
-map-server: obj/tmw.o obj/magic-interpreter-lexer.o obj/magic-interpreter-parser.o obj/magic-interpreter-base.o obj/magic-expr.o obj/magic-stmt.o obj/magic.o obj/map.o obj/chrif.o obj/clif.o obj/pc.o obj/npc.o obj/chat.o obj/path.o obj/itemdb.o obj/mob.o obj/script.o obj/storage.o obj/skill.o obj/skill-pools.o obj/atcommand.o obj/battle.o obj/intif.o obj/trade.o obj/party.o obj/guild.o $(COMMON_OBJ)
- $(CC) -o ../../$@ $^ $(LIBS)
+map: obj/tmw.o obj/magic-interpreter-lexer.o obj/magic-interpreter-parser.o obj/magic-interpreter-base.o obj/magic-expr.o obj/magic-stmt.o obj/magic.o obj/map.o obj/chrif.o obj/clif.o obj/pc.o obj/npc.o obj/chat.o obj/path.o obj/itemdb.o obj/mob.o obj/script.o obj/storage.o obj/skill.o obj/skill-pools.o obj/atcommand.o obj/battle.o obj/intif.o obj/trade.o obj/party.o obj/guild.o $(COMMON_OBJ)
+ ${LINK.c} $^ ${LDLIBS} -o $@
+obj/%.o: %.c | obj
+ ${COMPILE.c} $< -o $@
-obj/%.o: %.c
- $(COMPILE.c) $(OUTPUT_OPTION) $<
+magic-interpreter-lexer.c: magic-interpreter-lexer.l
+magic-interpreter-parser.c magic-interpreter-parser.h: magic-interpreter-parser.y
+#The builtin yacc rule is insufficient, (but yacc can be used in place of bison)
+ ${YACC} $^ -d -o magic-interpreter-parser.c
-magic-interpreter-lexer.c: magic-interpreter.l
- $(LEX) -o magic-interpreter-lexer.c magic-interpreter.l
-
-magic-interpreter-parser.c: magic-interpreter-parser.y
- $(BISON) -v -d -o magic-interpreter-parser.c magic-interpreter-parser.y
-
-obj/magic-interpreter-lexer.o: magic-interpreter-lexer.c magic-interpreter-parser.c magic-expr.h magic-interpreter.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h atcommand.h ../common/core.h ../common/timer.h ../common/db.h ../common/grfio.h ../common/mmo.h
+obj/magic-interpreter-lexer.o: magic-interpreter-lexer.c magic-interpreter-parser.h magic-expr.h magic-interpreter.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h atcommand.h ../common/core.h ../common/timer.h ../common/db.h ../common/grfio.h ../common/mmo.h
obj/magic-interpreter-parser.o: magic-interpreter-parser.c magic-expr.h magic-interpreter.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h atcommand.h ../common/core.h ../common/timer.h ../common/db.h ../common/grfio.h ../common/mmo.h
obj/magic-interpreter-base.o: magic-interpreter-base.c magic-expr-eval.h magic-interpreter-aux.h magic-expr.h magic-interpreter.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h atcommand.h ../common/core.h ../common/timer.h ../common/db.h ../common/grfio.h ../common/mmo.h
obj/magic-expr.o: magic-expr.c magic-expr-eval.h magic-interpreter-aux.h magic-expr.h magic-interpreter.h chrif.h clif.h npc.h pc.h mob.h chat.h skill.h itemdb.h storage.h party.h atcommand.h ../common/core.h ../common/timer.h ../common/db.h ../common/grfio.h ../common/mmo.h
@@ -47,6 +45,9 @@ obj/intif.o: intif.c intif.h chrif.h clif.h party.h guild.h storage.h map.h batt
obj/trade.o: trade.c trade.h clif.h itemdb.h map.h pc.h npc.h ../common/mmo.h
obj/party.o: party.c party.h clif.h intif.h pc.h map.h battle.h ../common/db.h ../common/socket.h ../common/timer.h ../common/mmo.h
obj/tmw.o: tmw.c tmw.h map.h clif.h
+obj/guild.o: guild.c guild.h storage.h ../common/mmo.h ../common/utils.h \
+ ../common/mt_rand.h ../common/timer.h ../common/socket.h \
+ ../common/nullpo.h battle.h npc.h pc.h map.h mob.h intif.h clif.h tmw.h
clean:
- rm -rf *.o ../../map-server obj
+ rm -rf *.o map obj magic-interpreter-parser.c magic-interpreter-parser.h magic-interpreter-lexer.c
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 681cccf..cb9e93c 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -10,9 +10,9 @@
#include <time.h>
#include <unistd.h>
-#include "socket.h"
-#include "timer.h"
-#include "nullpo.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/nullpo.h"
#include "atcommand.h"
#include "battle.h"
@@ -30,7 +30,7 @@
#include "skill.h"
#include "trade.h"
-#include "core.h"
+#include "../common/core.h"
#include "tmw.h"
#define STATE_BLIND 0x10
diff --git a/src/map/battle.c b/src/map/battle.c
index f81aaf0..c9e341d 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6,9 +6,9 @@
#include "battle.h"
-#include "timer.h"
-#include "nullpo.h"
-#include "malloc.h"
+#include "../common/timer.h"
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
#include "clif.h"
#include "guild.h"
@@ -18,7 +18,7 @@
#include "pc.h"
#include "skill.h"
#include "../common/socket.h"
-#include "mt_rand.h"
+#include "../common/mt_rand.h"
#ifdef MEMWATCH
#include "memwatch.h"
diff --git a/src/map/chat.c b/src/map/chat.c
index 772ac4c..0163eed 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -3,9 +3,9 @@
#include <stdlib.h>
#include <string.h>
-#include "db.h"
-#include "nullpo.h"
-#include "malloc.h"
+#include "../common/db.h"
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
#include "map.h"
#include "clif.h"
#include "pc.h"
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 4bcfa45..8bbeb59 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -13,8 +13,8 @@
#include <sys/types.h>
#include <time.h>
-#include "socket.h"
-#include "timer.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
#include "map.h"
#include "battle.h"
#include "chrif.h"
@@ -22,7 +22,7 @@
#include "intif.h"
#include "npc.h"
#include "pc.h"
-#include "nullpo.h"
+#include "../common/nullpo.h"
#include "itemdb.h"
#ifdef MEMWATCH
diff --git a/src/map/clif.c b/src/map/clif.c
index ce79490..d630815 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -18,12 +18,12 @@
#endif
#include <time.h>
-#include "socket.h"
-#include "timer.h"
-#include "malloc.h"
-#include "version.h"
-#include "nullpo.h"
-#include "md5calc.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/malloc.h"
+#include "../common/version.h"
+#include "../common/nullpo.h"
+#include "../common/md5calc.h"
#include "atcommand.h"
#include "battle.h"
diff --git a/src/map/guild.c b/src/map/guild.c
index 1d328ea..4a7552a 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -5,11 +5,11 @@
#include "guild.h"
#include "storage.h"
-#include "db.h"
-#include "timer.h"
-#include "socket.h"
-#include "nullpo.h"
-#include "malloc.h"
+#include "../common/db.h"
+#include "../common/timer.h"
+#include "../common/socket.h"
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
#include "battle.h"
#include "npc.h"
#include "pc.h"
diff --git a/src/map/intif.c b/src/map/intif.c
index efde695..629eade 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -18,9 +18,9 @@
#include <fcntl.h>
#include <string.h>
-#include "nullpo.h"
-#include "socket.h"
-#include "timer.h"
+#include "../common/nullpo.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
#include "battle.h"
#include "chrif.h"
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index d589e35..dfa3d36 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -3,10 +3,10 @@
#include <stdlib.h>
#include <string.h>
-#include "db.h"
-#include "grfio.h"
-#include "nullpo.h"
-#include "malloc.h"
+#include "../common/db.h"
+#include "../common/grfio.h"
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
#include "map.h"
#include "battle.h"
#include "itemdb.h"
diff --git a/src/map/magic-interpreter.l b/src/map/magic-interpreter-lexer.l
index 2c9792f..2c9792f 100644
--- a/src/map/magic-interpreter.l
+++ b/src/map/magic-interpreter-lexer.l
diff --git a/src/map/magic-interpreter-parser.y b/src/map/magic-interpreter-parser.y
index 04d5630..8484902 100644
--- a/src/map/magic-interpreter-parser.y
+++ b/src/map/magic-interpreter-parser.y
@@ -409,7 +409,7 @@ expr : value
arg_list : /* empty */
{ $$.args_nr = 0; }
| arg_list_ne
- { $$ = $1 }
+ { $$ = $1; }
;
diff --git a/src/map/magic-interpreter.h b/src/map/magic-interpreter.h
index 7db7d3e..006c8fb 100644
--- a/src/map/magic-interpreter.h
+++ b/src/map/magic-interpreter.h
@@ -8,8 +8,8 @@
#include <string.h>
#include <math.h>
-#include "malloc.h"
-#include "nullpo.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
#include "battle.h"
#include "chat.h"
diff --git a/src/map/map.c b/src/map/map.c
index 57183d1..e1adcef 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -9,11 +9,11 @@
#include <netdb.h>
#endif
-#include "core.h"
-#include "timer.h"
-#include "db.h"
-#include "grfio.h"
-#include "malloc.h"
+#include "../common/core.h"
+#include "../common/timer.h"
+#include "../common/db.h"
+#include "../common/grfio.h"
+#include "../common/malloc.h"
#include "map.h"
#include "chrif.h"
@@ -32,8 +32,8 @@
#include "script.h"
#include "guild.h"
#include "atcommand.h"
-#include "nullpo.h"
-#include "socket.h"
+#include "../common/nullpo.h"
+#include "../common/socket.h"
#include "magic.h"
#ifdef MEMWATCH
diff --git a/src/map/map.h b/src/map/map.h
index 53f6dfc..a558397 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -7,7 +7,7 @@
#include <time.h>
#include <sys/time.h>
#include <netinet/in.h>
-#include "mmo.h"
+#include "../common/mmo.h"
#ifndef MAX
# define MAX(x,y) (((x)>(y)) ? (x) : (y))
diff --git a/src/map/mob.c b/src/map/mob.c
index 7962114..99d1cc2 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -5,11 +5,11 @@
#include <stdarg.h>
#include <string.h>
-#include "timer.h"
-#include "socket.h"
-#include "db.h"
-#include "nullpo.h"
-#include "malloc.h"
+#include "../common/timer.h"
+#include "../common/socket.h"
+#include "../common/db.h"
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
#include "map.h"
#include "clif.h"
#include "intif.h"
diff --git a/src/map/npc.c b/src/map/npc.c
index 0335e9c..5fd8291 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -6,13 +6,13 @@
#include <math.h>
#include <time.h>
-#include "malloc.h"
-#include "nullpo.h"
-#include "timer.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
+#include "../common/timer.h"
#include "battle.h"
#include "clif.h"
-#include "db.h"
+#include "../common/db.h"
#include "intif.h"
#include "itemdb.h"
#include "map.h"
diff --git a/src/map/party.c b/src/map/party.c
index f87d390..4e59fae 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -4,11 +4,11 @@
#include <string.h>
#include "party.h"
-#include "db.h"
-#include "timer.h"
-#include "socket.h"
-#include "nullpo.h"
-#include "malloc.h"
+#include "../common/db.h"
+#include "../common/timer.h"
+#include "../common/socket.h"
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
#include "pc.h"
#include "map.h"
#include "battle.h"
diff --git a/src/map/path.c b/src/map/path.c
index 93ce960..7a864ed 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -5,7 +5,7 @@
#include "map.h"
#include "battle.h"
-#include "nullpo.h"
+#include "../common/nullpo.h"
#ifdef MEMWATCH
#include "memwatch.h"
diff --git a/src/map/pc.c b/src/map/pc.c
index fb98bcb..fc2732f 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5,12 +5,12 @@
#include <ctype.h>
#include <time.h>
-#include "socket.h" // [Valaris]
-#include "timer.h"
-#include "db.h"
+#include "../common/socket.h" // [Valaris]
+#include "../common/timer.h"
+#include "../common/db.h"
-#include "malloc.h"
-#include "nullpo.h"
+#include "../common/malloc.h"
+#include "../common/nullpo.h"
#include "atcommand.h"
#include "battle.h"
diff --git a/src/map/script.c b/src/map/script.c
index 27567c3..0c01ac0 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -15,21 +15,21 @@
#include <time.h>
#include <math.h>
-#include "socket.h"
-#include "timer.h"
-#include "malloc.h"
-#include "lock.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/malloc.h"
+#include "../common/lock.h"
#include "atcommand.h"
#include "battle.h"
#include "chat.h"
#include "chrif.h"
#include "clif.h"
-#include "db.h"
+#include "../common/db.h"
#include "guild.h"
#include "intif.h"
#include "itemdb.h"
-#include "lock.h"
+#include "../common/lock.h"
#include "map.h"
#include "mob.h"
#include "npc.h"
diff --git a/src/map/skill-pools.c b/src/map/skill-pools.c
index d533ae3..50dafcb 100644
--- a/src/map/skill-pools.c
+++ b/src/map/skill-pools.c
@@ -3,9 +3,9 @@
#include <string.h>
#include <time.h>
-#include "timer.h"
-#include "nullpo.h"
-#include "malloc.h"
+#include "../common/timer.h"
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
#include "magic.h"
#include "battle.h"
diff --git a/src/map/skill.c b/src/map/skill.c
index 8a2b6b5..54ff545 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6,9 +6,9 @@
#include <string.h>
#include <time.h>
-#include "timer.h"
-#include "nullpo.h"
-#include "malloc.h"
+#include "../common/timer.h"
+#include "../common/nullpo.h"
+#include "../common/malloc.h"
#include "magic.h"
#include "battle.h"
diff --git a/src/map/tmw.c b/src/map/tmw.c
index a71c93c..c04c9c8 100644
--- a/src/map/tmw.c
+++ b/src/map/tmw.c
@@ -6,11 +6,11 @@
#include "tmw.h"
-#include "socket.h"
-#include "timer.h"
-#include "malloc.h"
-#include "version.h"
-#include "nullpo.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/malloc.h"
+#include "../common/version.h"
+#include "../common/nullpo.h"
#include "atcommand.h"
#include "battle.h"
diff --git a/src/map/trade.c b/src/map/trade.c
index 664d2fa..ae70f0d 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -9,7 +9,7 @@
#include "npc.h"
#include "battle.h"
#include "storage.h"
-#include "nullpo.h"
+#include "../common/nullpo.h"
/*==========================================
* 取引要請を相手に送る