Makefile 13.9 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 44
CP      = copy
RM      = remove
WIPE    = -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\
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
Steve Revill's avatar
Steve Revill committed
137
        ${CHMOD} ${INSTAPP}
138 139 140
        @echo ${COMPONENT}: All installed (Disc)

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

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

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

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

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

197 198 199
resources: resources-${TYPE}

resources-:
200
        @echo ${COMPONENT}: No resource files to copy
201 202

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

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

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
267
        SetType ${RESD}.!Boot 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


Neil Turton's avatar
Neil Turton committed
406 407
#---------------------------------------------------------------------------
# Dynamic dependencies: