File: Makefile.mgw

package info (click to toggle)
liquidwar 5.6.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 26,240 kB
  • sloc: ansic: 26,238; xml: 4,011; sh: 3,825; makefile: 1,346; asm: 1,344; python: 537; php: 487; perl: 29; sql: 22
file content (229 lines) | stat: -rw-r--r-- 4,370 bytes parent folder | download
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# Liquid War is a multiplayer wargame
# Copyright (C) 1998-2018 Christian Mauduit
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA #
# Liquid War homepage : https://ufoot.org/liquidwar/v5
# Contact author      : ufoot@ufoot.org

# This Makefile is used to compile the MS Windows 32-bit executable binary.
#
# It requires a working MinGW http://www.mingw.org/ install to work.
# Previous releases of Liquid War required MSVC (Microsoft Visual C++).
# It is not the case any more, Liquid War can be built with free tools.
#
# To compile Allegro for MinGW, read "./docs/build/mingw32.txt" in the
# Allegro source distribution. Usually, the following sequence works:
# > fix mingw
# > make
# > make install
#
# Then to compile Liquid War:
# > mingw32-make -f makefile.mgw > make-log.txt 2> make-err.txt
#
# Note that the .exe produced won't work as is, you need to put the datafile
# in the right path, and a few other things, see the "package_win32" target
# of the main UNIX Makefile in Liquid War source distribution.

C_PATH=./src/
H_PATH=./src/
ASM_PATH=./src/
OBJ_PATH=./src/
RC_PATH=./src/
OBJ_EXT=.mgw.o

OBJ_NAMES=\
about \
advanced \
alleg2 \
area \
army \
asm \
autoplay \
back \
basicopt \
bigdata \
capture \
chat \
checksum \
code \
config \
connect \
controls \
cursor \
decal \
dialog \
disk \
disp \
distor \
dnsutil \
error \
exec2 \
exit \
fighter \
game \
httputil \
gfxmode \
grad \
graphics \
help \
info \
init \
internet \
joystick \
keyboard \
keyexch \
lang \
langde \
langdk \
langen \
langfr \
langpl \
language \
level \
logcli \
lw6 \
main \
map \
maptex \
menu \
mesh \
message \
mouse \
move \
music \
mutxw32 \
netconf \
netkey \
netgame \
netmap \
netmess \
netplay\
network \
options \
palette \
parser \
path \
ping \
pion \
play \
popupw32 \
profile \
protocol \
random \
rules \
score \
serial \
sock2cli \
sockex \
sockw32 \
sound \
speeds \
startinf \
startup \
team \
texture \
thrdw32 \
ticker \
time \
viewport \
volume \
watchdog \
wave \
wwwcli \
glouglou \
monster \
spread \
lwwin 

OBJ_NAMES_SRV=\
basicopt \
chat \
dnsutil \
execw32 \
httputil \
logsrv \
netconf \
netkey \
netmap \
netmess \
parser \
serial \
server \
sock2srv \
sockex \
sockw32 \
srvchan \
srvcont \
srvteam \
srvtime \
startinf \
thrdw32 \
wwwsrv

OBJ_NAMES_MAPGEN=\
../utils/lwmapgen/big_quad \
../utils/lwmapgen/boxes \
../utils/lwmapgen/bubbles \
../utils/lwmapgen/circles \
../utils/lwmapgen/circuit \
../utils/lwmapgen/cut \
../utils/lwmapgen/func \
../utils/lwmapgen/hole \
../utils/lwmapgen/lines \
../utils/lwmapgen/main \
../utils/lwmapgen/map \
../utils/lwmapgen/map_generator \
../utils/lwmapgen/misc \
../utils/lwmapgen/rand_box \
../utils/lwmapgen/rand_func \
../utils/lwmapgen/rand_poly \
../utils/lwmapgen/rand_poly_cut \
../utils/lwmapgen/street \
../utils/lwmapgen/worms 
       
OBJ_FILES=$(addprefix $(OBJ_PATH),$(addsuffix $(OBJ_EXT),$(OBJ_NAMES)))

OBJ_FILES_SRV=$(addprefix $(OBJ_PATH),$(addsuffix $(OBJ_EXT),$(OBJ_NAMES_SRV)))

OBJ_FILES_MAPGEN=$(addprefix $(OBJ_PATH),$(addsuffix $(OBJ_EXT),$(OBJ_NAMES_MAPGEN)))

C_FLAGS=-O2 -fomit-frame-pointer -Wall -I$(H_PATH)
C_COMPILE=gcc $(C_FLAGS) -o $@ -c $< -DWIN32 -DASM
ASM_COMPILE=gcc $(C_FLAGS) -o $@ -c $<
RC_COMPILE=windres -o $@ -i $<

all: lwwin.exe lwwinsrv.exe lwwinmap.exe

$(OBJ_PATH)%$(OBJ_EXT): $(C_PATH)%.c
	$(C_COMPILE)

$(OBJ_PATH)%$(OBJ_EXT): $(ASM_PATH)%.s
	$(ASM_COMPILE)

$(OBJ_PATH)%$(OBJ_EXT): $(RC_PATH)%.rc
	$(RC_COMPILE)


lwwin.exe: $(OBJ_FILES)
	gcc -Wl,--subsystem,windows -o $@ $(OBJ_FILES) -lalleg -lws2_32

lwwinsrv.exe: $(OBJ_FILES_SRV)
	gcc -Wl,--subsystem,console -o $@ $(OBJ_FILES_SRV) -lws2_32

lwwinmap.exe: $(OBJ_FILES_MAPGEN)
	gcc -Wl,--subsystem,console -o $@ $(OBJ_FILES_MAPGEN) -lalleg