blob: 089d9d276af3e5d80ad919b9686de029c1e20a88 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
LOGIN_CONVERTER_OBJ = \
obj_login/login-converter.o \
../login/obj_txt/account_txt.o \
../login/obj_sql/account_sql.o \
../common/obj_all/minicore.o \
../common/obj_all/db.o \
../common/obj_all/ers.o \
../common/obj_all/lock.o \
../common/obj_all/malloc.o \
../common/obj_all/showmsg.o \
../common/obj_all/strlib.o \
../common/obj_all/timer.o \
../common/obj_sql/sql.o
LOGIN_CONVERTER_H = \
../login/account.h \
../common/cbasetypes.h \
../common/mmo.h \
../common/core.h \
../common/db.h \
../common/ers.h \
../common/lock.h \
../common/malloc.h \
../common/showmsg.h \
../common/strlib.h \
../common/timer.h \
../common/sql.h
CHAR_CONVERTER_OBJ = \
obj_char/char-converter.o \
obj_char/txt-char.o \
obj_char/txt-int_pet.o \
obj_char/txt-int_storage.o \
obj_char/txt-inter.o \
obj_char/txt-int_party.o \
obj_char/txt-int_guild.o \
obj_char/sql-char.o \
obj_char/sql-int_pet.o \
obj_char/sql-int_storage.o \
obj_char/sql-inter.o \
obj_char/sql-int_party.o \
obj_char/sql-int_guild.o \
obj_char/sql-int_mercenary.o \
../common/obj_all/minicore.o \
../common/obj_all/malloc.o \
../common/obj_all/strlib.o \
../common/obj_all/showmsg.o \
../common/obj_all/utils.o \
../common/obj_all/timer.o \
../common/obj_all/ers.o \
../common/obj_all/mapindex.o \
../common/obj_sql/sql.o
CHAR_CONVERTER_H = \
../char/char.h \
../char/int_pet.h \
../char/int_storage.h \
../char/inter.h \
../char/int_party.h \
../char/int_guild.h \
../char_sql/char.h \
../char_sql/int_pet.h \
../char_sql/int_storage.h \
../char_sql/inter.h \
../char_sql/int_party.h \
../char_sql/int_guild.h \
../char_sql/int_mercenary.h \
../common/cbasetypes.h \
../common/mmo.h \
../common/core.h \
../common/malloc.h \
../common/strlib.h \
../common/showmsg.h \
../common/timer.h \
../common/utils.h \
../common/ers.h \
../common/mapindex.h \
../common/sql.h
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
LOGIN_CONVERTER_DEPENDS=obj_login $(LOGIN_CONVERTER_OBJ)
CHAR_CONVERTER_DEPENDS=obj_char $(CHAR_CONVERTER_OBJ)
else
LOGIN_CONVERTER_DEPENDS=needs_mysql
CHAR_CONVERTER_DEPENDS=needs_mysql
endif
@SET_MAKE@
#####################################################################
.PHONY : all login-converter char-converter clean help
all: login-converter char-converter
login-converter: $(LOGIN_CONVERTER_DEPENDS)
@CC@ @LDFLAGS@ -o ../../tools/login-converter@EXEEXT@ $(LOGIN_CONVERTER_OBJ) @LIBS@ @MYSQL_LIBS@
char-converter: $(CHAR_CONVERTER_DEPENDS)
@CC@ @LDFLAGS@ -o ../../tools/char-converter@EXEEXT@ $(CHAR_CONVERTER_OBJ) @LIBS@ @MYSQL_LIBS@
clean:
rm -rf *.o obj_login obj_char ../../tools/login-converter@EXEEXT@ ../../tools/char-converter@EXEEXT@
help:
@echo "possible targets are 'login-converter' 'char-converter' 'all' 'clean' 'help'"
@echo "'login-converter' - login server converter"
@echo "'char-converter' - char server converter"
@echo "'all' - builds all above targets"
@echo "'clean' - cleans builds and objects"
@echo "'help' - outputs this message"
#####################################################################
needs_mysql:
@echo "MySQL not found or disabled by the configure script"
@exit 1
obj_login:
-mkdir obj_login
obj_char:
-mkdir obj_char
obj_login/%.o: %.c $(LOGIN_CONVERTER_H)
@CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -DWITH_TXT -DWITH_SQL -c $(OUTPUT_OPTION) $<
obj_char/%.o: %.c $(CHAR_CONVERTER_H)
@CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -DTXT_SQL_CONVERT -c $(OUTPUT_OPTION) $<
obj_char/txt-%.o: ../char/%.c $(CHAR_CONVERTER_H)
@CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -DTXT_SQL_CONVERT -c $(OUTPUT_OPTION) $<
obj_char/sql-%.o: ../char_sql/%.c $(CHAR_CONVERTER_H)
@CC@ @CFLAGS@ @MYSQL_CFLAGS@ @CPPFLAGS@ -DTXT_SQL_CONVERT -c $(OUTPUT_OPTION) $<
# missing common object files
../common/obj_all/%.o:
@$(MAKE) -C ../common sql
../common/obj_sql/%.o:
@$(MAKE) -C ../common sql
# missing login server files
../login/obj_txt/%.o:
@$(MAKE) -C ../login txt
../login/obj_sql/%.o:
@$(MAKE) -C ../login sql
|