Makefile 14.4 KB
Newer Older
Neil Turton's avatar
Neil Turton committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Copyright 1996 Acorn Computers Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
15
# Makefile for Internet resources
Neil Turton's avatar
Neil Turton committed
16 17 18 19 20 21 22
#
# ***********************************
# ***    C h a n g e   L i s t    ***
# ***********************************
# Date           Name   Description
# ----           ----   -----------
# 03-Jul-96      KJB    Derived from Scrap makefile
23 24
# 05-Oct-99      SNB    Updated to allow slimmed down STB !Internet to be built.
#                       Passing OPTIONS=STB builds a cut down structure.
Neil Turton's avatar
Neil Turton committed
25 26 27 28 29 30 31 32 33
#

#
# Program specific options:
#
COMPONENT  = Internet
APP        = !${COMPONENT}
RDIR       = Resources
LDIR       = ${RDIR}.${LOCALE}
34
SDIR       = Sources
35
INSTAPP    = ${INSTDIR}.${APP}
36
RESD       = ${RESDIR}.Internet
Neil Turton's avatar
Neil Turton committed
37 38 39

# Generic options:
#
Steve Revill's avatar
Steve Revill committed
40 41
MKDIR   = do mkdir -p
CHMOD   = Unix.chmod ${CHMODFLAGS}
Neil Turton's avatar
Neil Turton committed
42 43
CP      = copy
RM      = remove
44
WIPE    = x wipe
45
AWK     = GNU.gawk
Neil Turton's avatar
Neil Turton committed
46 47 48

CPFLAGS = ~cfr~v
WFLAGS  = ~c~v
Steve Revill's avatar
Steve Revill committed
49
CHMODFLAGS = -R 0777
50 51 52 53 54

COMMONFILES=\
 ${SDIR}.arp.ARP\
 ${SDIR}.ifconfig.IfConfig\
 ${SDIR}.inetstat.InetStat\
Stewart Brodie's avatar
Stewart Brodie committed
55
 ${SDIR}.ipvars.IPVars\
56 57 58 59
 ${SDIR}.ping.Ping\
 ${SDIR}.route.Route\
 ${SDIR}.showstat.ShowStat\
 ${SDIR}.sysctl.SysCtl\
Steve Revill's avatar
Steve Revill committed
60 61
 ${SDIR}.traceroute.TraceRoute

62
STBFILES=${SDIR}.pong.Pong
63 64

DISCFILES= ${RDIR}.!Boot\
65
        ${LDIR}.!Help\
66
        ${LDIR}.!Run\
67 68
        ${RDIR}.!Sprites\
        ${RDIR}.!Sprites22\
69
        ${RDIR}.!Sprites11\
70 71 72
        ${SDIR}.gethost.GetHost\
        ${SDIR}.ifrconfig.IfRConfig\
        ${SDIR}.map-mbone.Map-MBone\
73
        ${SDIR}.md5.MD5\
74 75 76
        ${SDIR}.mrinfo.MRInfo\
        ${SDIR}.mtrace.MTrace\
        ${SDIR}.pong.Pong\
77
        ${SDIR}.tftp.Tftp\
78 79 80 81 82 83 84 85 86 87 88 89
        ${SDIR}.utils.utl.RMFind\
        ${RDIR}.files.AUNMap\
        ${RDIR}.files.Hosts\
        ${RDIR}.files.MimeMap\
        ${RDIR}.files.Networks\
        ${RDIR}.files.Protocols\
        ${RDIR}.files.Services\
        ${RDIR}.utils.BootNet\
        ${SDIR}.utils.utl.CheckMem\
        ${SDIR}.newfiler.NewFiler\
        ${SDIR}.utils.utl.ReadCMOSIP\
        ${SDIR}.utils.utl.TriggerCBs
Neil Turton's avatar
Neil Turton committed
90

91
FILES=\
92 93
        ${COMMONFILES} \
        ${DISCFILES} \
94
        ${STBFILES}
95 96 97 98 99 100 101 102

EMERGENCYUTILS = \
        ${SDIR}.arp.ARP              \
        ${SDIR}.ifconfig.IfConfig    \
        ${SDIR}.ping.Ping            \
        ${SDIR}.utils.utl.CheckMem   \
        ${SDIR}.newfiler.NewFiler    \
        ${SDIR}.sysctl.SysCtl        \
103
        ${LDIR}.!Run                 \
104
  
105 106
NETUTILS = \
        ${SDIR}.arp.ARP              \
107
        ${SDIR}.ifrconfig.IfRConfig  \
108 109
        ${SDIR}.ifconfig.IfConfig    \
        ${SDIR}.inetstat.InetStat    \
Stewart Brodie's avatar
Stewart Brodie committed
110
        ${SDIR}.ipvars.IPVars        \
111
        ${SDIR}.map-mbone.Map-MBone  \
112
        ${SDIR}.md5.MD5              \
Kevin Bracey's avatar
Kevin Bracey committed
113
        ${SDIR}.mrinfo.MRInfo        \
114
        ${SDIR}.mtrace.MTrace        \
115 116 117 118
        ${SDIR}.ping.Ping            \
        ${SDIR}.pong.Pong            \
        ${SDIR}.utils.utl.RMFind     \
        ${SDIR}.route.Route          \
119
        ${SDIR}.showstat.ShowStat    \
120
        ${SDIR}.sysctl.SysCtl        \
121
        ${SDIR}.tftp.Tftp            \
122 123
        ${SDIR}.traceroute.TraceRoute \
        ${RDIR}.!Boot                 \
124
        ${LDIR}.!Run                  \
125
        ${RDIR}.!Sprites              \
126
        ${RDIR}.!Sprites11            \
127
        ${RDIR}.!Sprites22            \
Steve Revill's avatar
Steve Revill committed
128

Neil Turton's avatar
Neil Turton committed
129 130 131 132 133 134
#
# Main rules:
#
all: ${FILES}
        @echo ${COMPONENT}: All built (Disc)

135
install: install_${OPTIONS} install_common dirs
Steve Revill's avatar
Steve Revill committed
136
        ${CHMOD} ${INSTAPP}
137 138 139
        @echo ${COMPONENT}: All installed (Disc)

install_common: ${COMMONFILES}
140 141 142 143
        ${RM} ${INSTAPP}.!Help
        ${RM} ${INSTAPP}.!Run
        ${RM} ${INSTAPP}.!Boot
        ${RM} ${INSTAPP}.files.AUNMap
144 145 146 147 148 149 150 151 152
        ${CP} ${SDIR}.arp.ARP               ${INSTAPP}.bin.ARP          ${CPFLAGS}
        ${CP} ${SDIR}.ifconfig.IfConfig     ${INSTAPP}.bin.IfConfig     ${CPFLAGS}
        ${CP} ${SDIR}.inetstat.InetStat     ${INSTAPP}.bin.InetStat     ${CPFLAGS}
        ${CP} ${SDIR}.ipvars.IPVars         ${INSTAPP}.bin.IPVars       ${CPFLAGS}
        ${CP} ${SDIR}.ping.Ping             ${INSTAPP}.bin.Ping         ${CPFLAGS}
        ${CP} ${SDIR}.route.Route           ${INSTAPP}.bin.Route        ${CPFLAGS}
        ${CP} ${SDIR}.showstat.ShowStat     ${INSTAPP}.bin.ShowStat     ${CPFLAGS}
        ${CP} ${SDIR}.sysctl.SysCtl         ${INSTAPP}.bin.SysCtl       ${CPFLAGS}
        ${CP} ${SDIR}.traceroute.TraceRoute ${INSTAPP}.bin.TraceRoute   ${CPFLAGS}
Steve Revill's avatar
Steve Revill committed
153

154 155
install_STB: ${STBFILES}
        ${MKDIR} ${INSTAPP}.files
156
        ${AWK} -f awk.Version LocalUserIFRes:!Boot > ${INSTAPP}.!Boot
157
        SetType ${INSTAPP}.!Boot Obey
158 159 160 161 162 163 164 165
        ${CP} LocalUserIFRes:CopyLocal ${INSTAPP}.CopyLocal       ${CPFLAGS}
        ${CP} LocalUserIFRes:RTime     ${INSTAPP}.bin.RTime       ${CPFLAGS}
        ${CP} ${SDIR}.pong.Pong        ${INSTAPP}.bin.Pong        ${CPFLAGS}
        ${CP} ${RDIR}.files.Hosts      ${INSTAPP}.files.Hosts     ${CPFLAGS}
        ${CP} LocalUserIFRes:MimeMap   ${INSTAPP}.files.MimeMap   ${CPFLAGS}
        ${CP} ${RDIR}.files.Networks   ${INSTAPP}.files.Networks  ${CPFLAGS}
        ${CP} ${RDIR}.files.Protocols  ${INSTAPP}.files.Protocols ${CPFLAGS}
        ${CP} ${RDIR}.files.Services   ${INSTAPP}.files.Services  ${CPFLAGS}
166 167

install_: ${DISCFILES} dirs
168
        ${AWK} -f awk.Version ${RDIR}.!Boot > ${INSTAPP}.!Boot
169
        SetType ${INSTAPP}.!Boot Obey
170
        ${AWK} -f awk.Version ${LDIR}.!Help > ${INSTAPP}.!Help
171
        ${AWK} -f awk.Version ${LDIR}.!Run >  ${INSTAPP}.!Run
172
        SetType ${INSTAPP}.!Run Obey
173 174 175 176 177 178 179 180
        |
        ${MKDIR} ${INSTAPP}.Themes
        ${CP} ${RDIR}.!Sprites   ${INSTAPP}.Themes.!Sprites   ${CPFLAGS}
        ${CP} ${RDIR}.!Sprites11 ${INSTAPP}.Themes.!Sprites11 ${CPFLAGS}
        ${CP} ${RDIR}.!Sprites22 ${INSTAPP}.Themes.!Sprites22 ${CPFLAGS}
        ${CP} ${LDIR}.Ursula     ${INSTAPP}.Themes.Ursula     ${CPFLAGS}
        ${CP} ${LDIR}.Morris4    ${INSTAPP}.Themes.Morris4    ${CPFLAGS}
        |
181
        ${CP} ${RDIR}.files      ${INSTAPP}.files      ${CPFLAGS}
182 183
        ${AWK} -f awk.Version ${RDIR}.files.AUNMap > ${INSTAPP}.files.AUNMap
        SetType ${INSTAPP}.files.AUNMap Obey
184
        ${CP} ${RDIR}.utils      ${INSTAPP}.utils      ${CPFLAGS}
Neil Turton's avatar
Neil Turton committed
185
        |
186 187
        ${CP} ${SDIR}.gethost.GetHost       ${INSTAPP}.bin.GetHost      ${CPFLAGS}
        ${CP} ${SDIR}.ifrconfig.IfRConfig   ${INSTAPP}.bin.IfRConfig    ${CPFLAGS}
188 189
        ${CP} ${SDIR}.map-mbone.Map-MBone   ${INSTAPP}.bin.Map-MBone    ${CPFLAGS}
        ${CP} ${SDIR}.md5.MD5               ${INSTAPP}.bin.MD5          ${CPFLAGS}
190 191 192 193
        ${CP} ${SDIR}.mrinfo.MRInfo         ${INSTAPP}.bin.MRInfo       ${CPFLAGS}
        ${CP} ${SDIR}.mtrace.MTrace         ${INSTAPP}.bin.MTrace       ${CPFLAGS}
        ${CP} ${SDIR}.pong.Pong             ${INSTAPP}.bin.Pong         ${CPFLAGS}
        ${CP} ${SDIR}.utils.utl.RMFind      ${INSTAPP}.bin.RMFind       ${CPFLAGS}
194
        ${CP} ${SDIR}.tftp.Tftp             ${INSTAPP}.bin.Tftp         ${CPFLAGS}
195 196 197 198
        ${CP} ${SDIR}.utils.utl.CheckMem    ${INSTAPP}.utils.CheckMem   ${CPFLAGS}
        ${CP} ${SDIR}.newfiler.NewFiler     ${INSTAPP}.utils.NewFiler   ${CPFLAGS}
        ${CP} ${SDIR}.utils.utl.ReadCMOSIP  ${INSTAPP}.utils.ReadCMOSIP ${CPFLAGS}
        ${CP} ${SDIR}.utils.utl.TriggerCBs  ${INSTAPP}.utils.TriggerCBs ${CPFLAGS}
199 200

dirs:
201 202
        ${MKDIR} ${INSTAPP}
        ${MKDIR} ${INSTAPP}.bin
Neil Turton's avatar
Neil Turton committed
203 204

clean:
205 206 207
        dir ${SDIR}
        !MkMods clean
        up
Neil Turton's avatar
Neil Turton committed
208 209
        @echo ${COMPONENT}: cleaned

210 211 212
resources: resources-${TYPE}

resources-:
213
        @echo ${COMPONENT}: No resource files to copy
214 215

resources-NetUtils: ${NETUTILS}
216
        ${MKDIR} ${RESD}.Themes
217 218
        ${MKDIR} ${RESD}.bin
        ${MKDIR} ${RESD}.files
219 220
        ${CP} ${SDIR}.arp.ARP               ${RESD}.bin.ARP          ${CPFLAGS}
        ${CP} ${SDIR}.ifconfig.IfConfig     ${RESD}.bin.IfConfig     ${CPFLAGS}
221
        ${CP} ${SDIR}.ifrconfig.IfRConfig   ${RESD}.bin.IfRConfig    ${CPFLAGS}
Stewart Brodie's avatar
Stewart Brodie committed
222
        ${CP} ${SDIR}.ipvars.IPVars         ${RESD}.bin.IPVars       ${CPFLAGS}
223
        ${CP} ${SDIR}.inetstat.InetStat     ${RESD}.bin.InetStat     ${CPFLAGS}
224
        ${CP} ${SDIR}.map-mbone.Map-MBone   ${RESD}.bin.Map-MBone    ${CPFLAGS}
225
        ${CP} ${SDIR}.md5.MD5               ${RESD}.bin.MD5          ${CPFLAGS}
Kevin Bracey's avatar
Kevin Bracey committed
226
        ${CP} ${SDIR}.mrinfo.MRInfo         ${RESD}.bin.MRInfo       ${CPFLAGS}
227
        ${CP} ${SDIR}.mtrace.MTrace         ${RESD}.bin.MTrace       ${CPFLAGS}
228 229 230 231 232
        ${CP} ${SDIR}.ping.Ping             ${RESD}.bin.Ping         ${CPFLAGS}
        ${CP} ${SDIR}.pong.Pong             ${RESD}.bin.Pong         ${CPFLAGS}
        ${CP} ${SDIR}.utils.utl.RMFind      ${RESD}.bin.RMFind       ${CPFLAGS}
        ${CP} ${SDIR}.route.Route           ${RESD}.bin.Route        ${CPFLAGS}
        ${CP} ${SDIR}.sysctl.SysCtl         ${RESD}.bin.SysCtl       ${CPFLAGS}
233
        ${CP} ${SDIR}.showstat.ShowStat     ${RESD}.bin.ShowStat     ${CPFLAGS}
234
        ${CP} ${SDIR}.traceroute.TraceRoute ${RESD}.bin.TraceRoute   ${CPFLAGS}
235
        ${CP} ${SDIR}.tftp.Tftp             ${RESD}.bin.Tftp         ${CPFLAGS}
236
        ${AWK} -f awk.Version ${RDIR}.files.AUNMap > ${RESD}.files.AUNMap
237
        SetType ${RESD}.files.AUNMap Obey
238 239 240 241
        ${CP} ${RDIR}.files.Hosts           ${RESD}.files.Hosts      ${CPFLAGS}
        ${CP} ${RDIR}.files.Networks        ${RESD}.files.Networks   ${CPFLAGS}
        ${CP} ${RDIR}.files.Protocols       ${RESD}.files.Protocols  ${CPFLAGS}
        ${CP} ${RDIR}.files.Services        ${RESD}.files.Services   ${CPFLAGS}
242
        ${AWK} -f awk.Version ${RDIR}.!Boot > ${RESD}.!Boot
243
        SetType ${RESD}.!Boot Obey
244
        ${AWK} -f awk.Version ${LDIR}.!Run > ${RESD}.!Run
245
        SetType ${RESD}.!Run Obey
246 247
        ${CP} ${RDIR}.!Sprites              ${RESD}.Themes.!Sprites   ${CPFLAGS}
        ${CP} ${RDIR}.!Sprites22            ${RESD}.Themes.!Sprites22 ${CPFLAGS}
248

249 250 251 252 253 254 255 256 257 258 259 260
resources-EmergencyUtils: ${EMERGENCYUTILS}
        ${MKDIR} ${RESD}
        ${MKDIR} ${RESD}.bin
        ${MKDIR} ${RESD}.utils
        ${MKDIR} ${RESD}.files
        ${CP} ${SDIR}.arp.ARP               ${RESD}.bin.ARP          ${CPFLAGS}
        ${CP} ${SDIR}.ifconfig.IfConfig     ${RESD}.bin.IfConfig     ${CPFLAGS}
        ${CP} ${SDIR}.ping.Ping             ${RESD}.bin.Ping         ${CPFLAGS}
        ${CP} ${SDIR}.utils.utl.CheckMem    ${RESD}.utils.CheckMem   ${CPFLAGS}
        ${CP} ${SDIR}.newfiler.NewFiler     ${RESD}.utils.NewFiler   ${CPFLAGS}
        ${CP} ${SDIR}.sysctl.SysCtl         ${RESD}.bin.SysCtl       ${CPFLAGS}
        ${AWK} -f awk.Version ${RDIR}.files.AUNMap > ${RESD}.files.AUNMap
261
        SetType ${RESD}.files.AUNMap Obey
262 263 264 265
        ${CP} ${RDIR}.files.Hosts           ${RESD}.files.Hosts      ${CPFLAGS}
        ${CP} ${RDIR}.files.Networks        ${RESD}.files.Networks   ${CPFLAGS}
        ${CP} ${RDIR}.files.Protocols       ${RESD}.files.Protocols  ${CPFLAGS}
        ${CP} ${RDIR}.files.Services        ${RESD}.files.Services   ${CPFLAGS}
266
        ${AWK} -f awk.Version ${LDIR}.!Run > ${RESD}.!Run
267
        SetType ${RESD}.!Run Obey
268

269
${SDIR}.arp.ARP: ${SDIR}.arp.c.ARP
270 271 272 273
        dir ${SDIR}.arp
        @amu_machine
        @up
        @up
274 275

${SDIR}.ifconfig.IfConfig: ${SDIR}.ifconfig.c.IfConfig
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291
        dir ${SDIR}.ifconfig
        @amu_machine
        @up
        @up

${SDIR}.ifrconfig.IfRConfig: ${SDIR}.ifrconfig.c.IfRConfig
        dir ${SDIR}.ifrconfig
        @amu_machine
        @up
        @up

${SDIR}.gethost.GetHost: ${SDIR}.gethost.c.gethost
        dir ${SDIR}.gethost
        @amu_machine
        @up
        @up
292

Stewart Brodie's avatar
Stewart Brodie committed
293
${SDIR}.ipvars.IPVars: ${SDIR}.ipvars.c.ipvars
294 295 296 297
        dir ${SDIR}.ipvars
        @amu_machine
        @up
        @up
Stewart Brodie's avatar
Stewart Brodie committed
298

299
${SDIR}.inetstat.InetStat: ${SDIR}.inetstat.c.main \
300 301 302 303 304 305 306 307
        ${SDIR}.inetstat.c.if\
        ${SDIR}.inetstat.c.inet\
        ${SDIR}.inetstat.c.route\
        ${SDIR}.inetstat.c.mroute
        dir ${SDIR}.inetstat
        @amu_machine
        @up
        @up
308

309
${SDIR}.map-mbone.Map-MBone: ${SDIR}.map-mbone.c.Map-MBone \
310 311 312 313 314 315 316
        ${SDIR}.map-mbone.c.igmp \
        ${SDIR}.map-mbone.c.inet \
        ${SDIR}.map-mbone.c.kern
        dir ${SDIR}.map-mbone
        @amu_machine
        @up
        @up
317

318 319 320 321 322 323 324 325
${SDIR}.md5.MD5: ${SDIR}.md5.c.md5 \
        ${SDIR}.md5.c.md5c \
        ${SDIR}.md5.c.mdXhl
        dir ${SDIR}.md5
        @amu_machine
        @up
        @up

Kevin Bracey's avatar
Kevin Bracey committed
326
${SDIR}.mrinfo.MRInfo: ${SDIR}.mrinfo.c.MRInfo \
327 328 329 330 331 332 333
        ${SDIR}.mrinfo.c.igmp \
        ${SDIR}.mrinfo.c.inet \
        ${SDIR}.mrinfo.c.kern
        dir ${SDIR}.mrinfo
        @amu_machine
        @up
        @up
Kevin Bracey's avatar
Kevin Bracey committed
334

335
${SDIR}.mtrace.MTrace: ${SDIR}.mtrace.c.MTrace
336 337 338 339
        dir ${SDIR}.mtrace
        @amu_machine
        @up
        @up
340

341
${SDIR}.ping.Ping: ${SDIR}.ping.c.Ping
342 343 344 345
        dir ${SDIR}.ping
        @amu_machine
        @up
        @up
346 347

${SDIR}.pong.Pong: ${SDIR}.pong.c.Pong
348 349 350 351
        dir ${SDIR}.pong
        @amu_machine
        @up
        @up
352 353

${SDIR}.route.Route: ${SDIR}.route.c.Route
354 355 356 357
        dir ${SDIR}.route
        @amu_machine
        @up
        @up
358

359
${SDIR}.showstat.ShowStat:
360 361 362 363
        dir ${SDIR}.showstat
        @amu_machine 
        @up
        @up
364

365
${SDIR}.sysctl.SysCtl: ${SDIR}.sysctl.c.SysCtl
366 367 368 369
        dir ${SDIR}.sysctl
        @amu_machine
        @up
        @up
370

371 372 373 374 375 376 377 378
${SDIR}.tftp.Tftp: ${SDIR}.tftp.c.main \
        ${SDIR}.tftp.c.tftp \
        ${SDIR}.tftp.c.tftpsubs
        dir ${SDIR}.tftp
        @amu_machine
        @up
        @up

379
${SDIR}.traceroute.TraceRoute: ${SDIR}.traceroute.c.TraceRoute
380 381 382 383
        dir ${SDIR}.traceroute
        @amu_machine
        @up
        @up
384 385

${SDIR}.newfiler.NewFiler: ${SDIR}.newfiler.c.NewFiler
386 387 388 389
        dir ${SDIR}.newfiler
        @amu_machine
        @up
        @up
390 391

${SDIR}.utils.utl.CheckMem: ${SDIR}.utils.s.CheckMem
392 393 394 395
        dir ${SDIR}.utils
        @amu_machine utl.CheckMem
        @up
        @up
396 397

${SDIR}.utils.utl.ReadCMOSIP: ${SDIR}.utils.s.ReadCMOSIP
398 399 400 401
        dir ${SDIR}.utils
        @amu_machine utl.ReadCMOSIP
        @up
        @up
402 403

${SDIR}.utils.utl.RMFind: ${SDIR}.utils.s.RMFind
404 405 406 407
        dir ${SDIR}.utils
        @amu_machine utl.RMFind
        @up
        @up
408 409

${SDIR}.utils.utl.TriggerCBs: ${SDIR}.utils.s.TriggerCBs
410 411 412 413
        dir ${SDIR}.utils
        @amu_machine utl.TriggerCBs
        @up
        @up
414 415

${SDIR}.utils.utl.X: ${SDIR}.utils.s.X
416 417 418 419
        dir ${SDIR}.utils
        @amu_machine utl.X
        @up
        @up
420

Neil Turton's avatar
Neil Turton committed
421
# Dynamic dependencies: