File: Makefile.dj

package info (click to toggle)
liquidwar 5.6.4-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,040 kB
  • sloc: ansic: 25,422; xml: 3,985; sh: 3,355; makefile: 1,393; asm: 1,344; python: 537; php: 486; sql: 22
file content (200 lines) | stat: -rw-r--r-- 3,894 bytes parent folder | download | duplicates (4)
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
# Liquid War is a multiplayer wargame
# Copyright (C) 1998-2007 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 : http://www.ufoot.org/liquidwar/v5
# Contact author      : ufoot@ufoot.org
#
# This Makefile is used to compile the MS DOS 32-bit executable binary.
# 
# It requires a working DJGPP http://www.delorie.com/djgpp/ install to work.
# 
# Typical DJGPP requirements are:
# v2/copying.dj
# v2/djdev203.zip
# v2/faq230b.zip
# v2/readme.1st
# v2gnu/bnu2161b.zip
# v2gnu/fil41b.zip
# v2gnu/gcc401b.zip
# v2gnu/gdb611b.zip
# v2gnu/gpp401b.zip
# v2gnu/mak3791b.zip
# v2gnu/sed414b.zip
# v2gnu/txi48b.zip
# v2gnu/txt20b.zip
#
# To compile Allegro for MinGW, read "./docs/build/djgpp.txt" in the
# Allegro source distribution. Usually, the following sequence works:
# > fix djgpp
# > make
# > make install
#
# Then to compile Liquid War:
# > make -f makefile.dj > 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_dos" target
# of the main UNIX Makefile in Liquid War source distribution.

C_PATH=./src/
H_PATH=./src/
ASM_PATH=./src/
OBJ_PATH=./src/
OBJ_EXT=.dj.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 \
gfxmode \
grad \
graphics \
help \
httputil \
info \
init \
internet \
joystick \
keyboard \
keyexch \
lang \
langde \
langdk \
langen \
langfr \
language \
level \
logcli \
main \
map \
maptex \
menu \
mesh \
message \
mouse \
move \
music \
mutxdos \
netconf \
netkey \
netgame \
netmap \
netmess \
netplay \
network \
options \
palette \
parser \
path \
ping \
pion \
play \
profile \
protocol \
random \
rules \
score \
serial \
sock2cli \
sockdos \
sound \
speeds \
startinf \
startup \
team \
texture \
thrddos \
ticker \
time \
viewport \
volume \
watchdog \
wave \
wwwcli \
glouglou \
monster \
spread \
../utils/snprintf/snprintf

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_MAPGEN=$(addprefix $(OBJ_PATH),$(addsuffix $(OBJ_EXT),$(OBJ_NAMES_MAPGEN)))

C_FLAGS=-O2 -fomit-frame-pointer -Wall -I$(H_PATH)
C_COMPILE=gcc -c $< -o $@ $(C_FLAGS) -DDOS -DASM -DSNPRINTF
ASM_COMPILE=gcc -c $< -o $@

all: lwdos.exe lwdosmap.exe

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

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

lwdos.exe: $(OBJ_FILES)
	gcc -o $@ $(OBJ_FILES) -lalleg

lwdosmap.exe: $(OBJ_FILES_MAPGEN)
	gcc -o $@ $(OBJ_FILES_MAPGEN) -lalleg