summaryrefslogtreecommitdiff
path: root/src/tool
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool')
-rw-r--r--src/tool/Makefile21
-rw-r--r--src/tool/adduser.c8
-rw-r--r--src/tool/marriage-info.c6
3 files changed, 18 insertions, 17 deletions
diff --git a/src/tool/Makefile b/src/tool/Makefile
index 5d37183..87393fb 100644
--- a/src/tool/Makefile
+++ b/src/tool/Makefile
@@ -1,16 +1,17 @@
include ../../make.defs
-BDIR=..
-COBJS=${BDIR}/common/timer.o ${BDIR}/common/malloc.o ${BDIR}/common/socket.o ${BDIR}/common/lock.o ${BDIR}/common/db.o ${BDIR}/char/int_storage.o ${BDIR}/char/inter.o ${BDIR}/char/int_party.o ${BDIR}/char/int_guild.o
-MOBJS=${BDIR}/common/socket.o ${BDIR}/common/timer.o ${BDIR}/common/db.o ${BDIR}/common/lock.o ${BDIR}/common/malloc.o ${BDIR}/char/int_guild.o ${BDIR}/char/int_party.o ${BDIR}/char/int_storage.o ${BDIR}/char/inter.o
+COBJS=../common/timer.o ../common/malloc.o ../common/socket.o ../common/lock.o ../common/db.o ../char/int_storage.o ../char/inter.o ../char/int_party.o ../char/int_guild.o
+MOBJS=../common/socket.o ../common/timer.o ../common/db.o ../common/lock.o ../common/malloc.o ../char/int_guild.o ../char/int_party.o ../char/int_storage.o ../char/inter.o
+all: adduser itemfrob mapfrob marriage-info eathena-monitor
+adduser: adduser.o ../common/socket.o
-all: ${COBJS} ${MOBJS}
- $(CC) $(CFLAGS) -o adduser adduser.c $(BDIR)/common/socket.o
- $(CC) $(CFLAGS) -I ${BDIR}/char -I ${BDIR}/common itemfrob.c -o itemfrob ${COBJS}
- $(CC) $(CFLAGS) -I ${BDIR}/char -I ${BDIR}/common mapfrob.c -o mapfrob ${COBJS}
- $(CC) $(CFLAGS) -I ${BDIR}/char -I ${BDIR}/common -I ${BDIR}/map -I ${BDIR}/login marriage-info.c -o marriage-info ${MOBJS}
- $(CC) $(CFLAGS) -o ${BDIR}/../eathena-monitor eathena-monitor.c
+itemfrob: itemfrob.o ${COBJS}
+mapfrob: mapfrob.o ${COBJS}
+marriage-info: marriage-info.o ${MOBJS}
+eathena-monitor: eathena-monitor.c
+ $(CC) $(CFLAGS) -o eathena-monitor eathena-monitor.c
clean:
- rm -f adduser itemfrob mapfrob marriage-info ${BDIR}/../eathena-monitor
+ rm -f adduser itemfrob mapfrob marriage-info eathena-monitor
rm -f *.exe
+ rm -f *.o
diff --git a/src/tool/adduser.c b/src/tool/adduser.c
index 6ebbdf1..1954b66 100644
--- a/src/tool/adduser.c
+++ b/src/tool/adduser.c
@@ -41,7 +41,7 @@ int main (int argc, char *argv[])
// Check to see if account.txt exists.
printf ("Checking if '%s' file exists...\n", account_txt);
- FILE *FPaccin = fopen_ (account_txt, "r");
+ FILE *FPaccin = fopen (account_txt, "r");
if (FPaccin == NULL)
{
printf ("'%s' file not found!\n", account_txt);
@@ -72,7 +72,7 @@ int main (int argc, char *argv[])
}
}
}
- close (FPaccin);
+ fclose (FPaccin);
printf ("File exists.\n");
printf ("Don't create an account if the login-server is online!!!\n");
@@ -105,11 +105,11 @@ int main (int argc, char *argv[])
scanf ("%s", &sex);
}
- FILE *FPaccout = fopen_ (account_txt, "r+");
+ FILE *FPaccout = fopen (account_txt, "r+");
fseek (FPaccout, 0, SEEK_END);
fprintf (FPaccout, "%i %s %s - %s -\r\n", next_id, username,
password, sex);
- close (FPaccout);
+ fclose (FPaccout);
printf ("Account added.\n");
}
diff --git a/src/tool/marriage-info.c b/src/tool/marriage-info.c
index cd13843..9b91955 100644
--- a/src/tool/marriage-info.c
+++ b/src/tool/marriage-info.c
@@ -7,9 +7,9 @@ src/char/int_party.o src/char/int_storage.o src/char/inter.o
#include <stdio.h>
#include <stdlib.h>
-#include "login.h"
-#include "mmo.h"
-#include "char.c"
+#include "../login/login.h"
+#include "../common/mmo.h"
+#include "../char/char.c"
int mode;
#define MODE_MARRIED 0