Makefile 14 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:
#
40
MKDIR   = mkdir -p
Neil Turton's avatar
Neil Turton committed
41 42 43 44
ATTR    = -attr
CP      = copy
RM      = remove
WIPE    = -wipe
45
AWK     = GNU.gawk
Neil Turton's avatar
Neil Turton committed
46 47 48 49

CPFLAGS = ~cfr~v
WFLAGS  = ~c~v

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\
Neil Turton's avatar
Neil Turton committed
65 66 67 68
 ${LDIR}.!Help\
 ${RDIR}.!Run\
 ${RDIR}.!Sprites\
 ${RDIR}.!Sprites22\
69 70
 ${SDIR}.gethost.GetHost\
 ${SDIR}.ifrconfig.IfRConfig\
71
 ${SDIR}.map-mbone.Map-MBone\
Kevin Bracey's avatar
Kevin Bracey committed
72
 ${SDIR}.mrinfo.MRInfo\
73
 ${SDIR}.mtrace.MTrace\
74 75
 ${SDIR}.pong.Pong\
 ${SDIR}.utils.utl.RMFind\
Neil Turton's avatar
Neil Turton committed
76 77
 ${RDIR}.files.AUNMap\
 ${RDIR}.files.Hosts\
Steve Revill's avatar
Steve Revill committed
78
 ${RDIR}.files.MimeMap\
Neil Turton's avatar
Neil Turton committed
79 80 81 82
 ${RDIR}.files.Networks\
 ${RDIR}.files.Protocols\
 ${RDIR}.files.Services\
 ${RDIR}.utils.BootNet\
83 84 85 86
 ${SDIR}.utils.utl.CheckMem\
 ${SDIR}.newfiler.NewFiler\
 ${SDIR}.utils.utl.ReadCMOSIP\
 ${SDIR}.utils.utl.TriggerCBs
Neil Turton's avatar
Neil Turton committed
87

88 89
FILES=\
  ${COMMONFILES} \
90 91
  ${DISCFILES} \
  ${STBFILE}
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107

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

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

136
install: install_${OPTIONS} install_common dirs
137 138
        ${ATTR} -directories +wr -ww ${INSTAPP}
        ${ATTR} -files +or +ow +wr -ww ${INSTAPP}
139 140 141
        @echo ${COMPONENT}: All installed (Disc)

install_common: ${COMMONFILES}
142 143 144 145 146 147 148 149 150
        ${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
151

152 153
install_STB: ${STBFILES}
        ${MKDIR} ${INSTAPP}.files
154
        ${AWK} -f awk.Version LocalUserIFRes:!Boot > ${INSTAPP}.!Boot
155
        SetType ${INSTAPP}.!Boot Obey
156 157 158 159 160 161 162 163
        ${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}
164 165

install_: ${DISCFILES} dirs
166
        ${AWK} -f awk.Version ${RDIR}.!Boot > ${INSTAPP}.!Boot
167
        SetType ${INSTAPP}.!Boot Obey
168 169
        ${AWK} -f awk.Version ${LDIR}.!Help > ${INSTAPP}.!Help
        ${AWK} -f awk.Version ${RDIR}.!Run > ${INSTAPP}.!Run
170
        SetType ${INSTAPP}.!Run Obey
171 172 173 174 175
        ${CP} ${RDIR}.!Sprites   ${INSTAPP}.!Sprites   ${CPFLAGS}
        ${CP} ${RDIR}.!Sprites22 ${INSTAPP}.!Sprites22 ${CPFLAGS}
        ${CP} ${RDIR}.bin        ${INSTAPP}.bin        ${CPFLAGS}
        ${CP} ${RDIR}.files      ${INSTAPP}.files      ${CPFLAGS}
        ${CP} ${RDIR}.utils      ${INSTAPP}.utils      ${CPFLAGS}
Neil Turton's avatar
Neil Turton committed
176
        |
177
        ${CP} ${SDIR}.map-mbone.Map-MBone   ${INSTAPP}.bin.Map-MBone    ${CPFLAGS}
178 179
        ${CP} ${SDIR}.gethost.GetHost       ${INSTAPP}.bin.GetHost      ${CPFLAGS}
        ${CP} ${SDIR}.ifrconfig.IfRConfig   ${INSTAPP}.bin.IfRConfig    ${CPFLAGS}
180 181 182 183 184 185 186 187
        ${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}
        ${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}
188 189

dirs:
190 191
        ${MKDIR} ${INSTAPP}
        ${MKDIR} ${INSTAPP}.bin
Neil Turton's avatar
Neil Turton committed
192 193

clean:
194 195 196
        dir ${SDIR}
        !MkMods clean
        up
Neil Turton's avatar
Neil Turton committed
197 198
        @echo ${COMPONENT}: cleaned

199 200 201
resources: resources-${TYPE}

resources-:
202
        @echo ${COMPONENT}: No resource files to copy
203 204

resources-NetUtils: ${NETUTILS}
205 206 207
        ${MKDIR} ${RESD}
        ${MKDIR} ${RESD}.bin
        ${MKDIR} ${RESD}.files
208 209
        ${CP} ${SDIR}.arp.ARP               ${RESD}.bin.ARP          ${CPFLAGS}
        ${CP} ${SDIR}.ifconfig.IfConfig     ${RESD}.bin.IfConfig     ${CPFLAGS}
210
        ${CP} ${SDIR}.ifrconfig.IfRConfig   ${RESD}.bin.IfRConfig    ${CPFLAGS}
Stewart Brodie's avatar
Stewart Brodie committed
211
        ${CP} ${SDIR}.ipvars.IPVars         ${RESD}.bin.IPVars       ${CPFLAGS}
212
        ${CP} ${SDIR}.inetstat.InetStat     ${RESD}.bin.InetStat     ${CPFLAGS}
213
        ${CP} ${SDIR}.map-mbone.Map-MBone   ${RESD}.bin.Map-MBone    ${CPFLAGS}
Kevin Bracey's avatar
Kevin Bracey committed
214
        ${CP} ${SDIR}.mrinfo.MRInfo         ${RESD}.bin.MRInfo       ${CPFLAGS}
215
        ${CP} ${SDIR}.mtrace.MTrace         ${RESD}.bin.MTrace       ${CPFLAGS}
216 217 218 219 220
        ${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}
221
        ${CP} ${SDIR}.showstat.ShowStat     ${RESD}.bin.ShowStat     ${CPFLAGS}
222
        ${CP} ${SDIR}.traceroute.TraceRoute ${RESD}.bin.TraceRoute   ${CPFLAGS}
223
        ${AWK} -f awk.Version ${RDIR}.files.AUNMap > ${RESD}.files.AUNMap
224
        SetType ${RESD}.files.AUNMap Obey
225 226 227 228
        ${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}
229
        ${AWK} -f awk.Version ${RDIR}.!Boot > ${RESD}.!Boot
230
        SetType ${RESD}.!Boot Obey
231
        ${AWK} -f awk.Version ${RDIR}.!Run > ${RESD}.!Run
232
        SetType ${RESD}.!Run Obey
233 234
        ${CP} ${RDIR}.!Sprites              ${RESD}.!Sprites   ${CPFLAGS}
        ${CP} ${RDIR}.!Sprites22            ${RESD}.!Sprites22 ${CPFLAGS}
235

236 237 238 239 240 241 242 243 244 245 246 247 248
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}.pong.Pong             ${RESD}.bin.Pong         ${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
249
        SetType ${RESD}.files.AUNMap Obey
250 251 252 253 254
        ${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}
        ${AWK} -f awk.Version ${RDIR}.!Boot > ${RESD}.!Boot
255
        SetType ${RESD}.!Boot Obey
256
        ${AWK} -f awk.Version ${RDIR}.!Run > ${RESD}.!Run
257
        SetType ${RESD}.!Run Obey
258 259 260 261 262 263 264 265 266 267 268

resources-BareMinUtils: ${BAREMINUTILS}
        ${MKDIR} ${RESD}
        ${MKDIR} ${RESD}.bin
        ${MKDIR} ${RESD}.files
        ${CP} ${SDIR}.ifconfig.IfConfig     ${RESD}.bin.IfConfig     ${CPFLAGS}
        ${CP} ${SDIR}.ping.Ping             ${RESD}.bin.Ping         ${CPFLAGS}
        ${CP} ${RDIR}.files.Hosts           ${RESD}.files.Hosts      ${CPFLAGS}
        ${CP} ${RDIR}.files.Protocols       ${RESD}.files.Protocols  ${CPFLAGS}
        ${CP} ${RDIR}.files.Services        ${RESD}.files.Services   ${CPFLAGS}
        ${AWK} -f awk.Version ${RDIR}.!Boot > ${RESD}.!Boot
269
        SetType ${RESD}.!Boot Obey
270

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

${SDIR}.ifconfig.IfConfig: ${SDIR}.ifconfig.c.IfConfig
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293
        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
294

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

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

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

Kevin Bracey's avatar
Kevin Bracey committed
320
${SDIR}.mrinfo.MRInfo: ${SDIR}.mrinfo.c.MRInfo \
321 322 323 324 325 326 327
        ${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
328

329
${SDIR}.mtrace.MTrace: ${SDIR}.mtrace.c.MTrace
330 331 332 333
        dir ${SDIR}.mtrace
        @amu_machine
        @up
        @up
334

335
${SDIR}.ping.Ping: ${SDIR}.ping.c.Ping
336 337 338 339
        dir ${SDIR}.ping
        @amu_machine
        @up
        @up
340 341

${SDIR}.pong.Pong: ${SDIR}.pong.c.Pong
342 343 344 345
        dir ${SDIR}.pong
        @amu_machine
        @up
        @up
346 347

${SDIR}.route.Route: ${SDIR}.route.c.Route
348 349 350 351
        dir ${SDIR}.route
        @amu_machine
        @up
        @up
352

353
${SDIR}.showstat.ShowStat:
354 355 356 357
        dir ${SDIR}.showstat
        @amu_machine 
        @up
        @up
358

359
${SDIR}.sysctl.SysCtl: ${SDIR}.sysctl.c.SysCtl
360 361 362 363
        dir ${SDIR}.sysctl
        @amu_machine
        @up
        @up
364 365

${SDIR}.traceroute.TraceRoute: ${SDIR}.traceroute.c.TraceRoute
366 367 368 369
        dir ${SDIR}.traceroute
        @amu_machine
        @up
        @up
370 371

${SDIR}.newfiler.NewFiler: ${SDIR}.newfiler.c.NewFiler
372 373 374 375
        dir ${SDIR}.newfiler
        @amu_machine
        @up
        @up
376 377

${SDIR}.utils.utl.CheckMem: ${SDIR}.utils.s.CheckMem
378 379 380 381
        dir ${SDIR}.utils
        @amu_machine utl.CheckMem
        @up
        @up
382 383

${SDIR}.utils.utl.ReadCMOSIP: ${SDIR}.utils.s.ReadCMOSIP
384 385 386 387
        dir ${SDIR}.utils
        @amu_machine utl.ReadCMOSIP
        @up
        @up
388 389

${SDIR}.utils.utl.RMFind: ${SDIR}.utils.s.RMFind
390 391 392 393
        dir ${SDIR}.utils
        @amu_machine utl.RMFind
        @up
        @up
394 395

${SDIR}.utils.utl.TriggerCBs: ${SDIR}.utils.s.TriggerCBs
396 397 398 399
        dir ${SDIR}.utils
        @amu_machine utl.TriggerCBs
        @up
        @up
400 401

${SDIR}.utils.utl.X: ${SDIR}.utils.s.X
402 403 404 405
        dir ${SDIR}.utils
        @amu_machine utl.X
        @up
        @up
406 407


Neil Turton's avatar
Neil Turton committed
408 409
#---------------------------------------------------------------------------
# Dynamic dependencies: