Makefile 9.93 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 40 41 42 43 44 45 46 47 48

# Generic options:
#
MKDIR   = cdir
ATTR    = -attr
CP      = copy
RM      = remove
WIPE    = -wipe

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

49 50 51 52 53

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

DISCFILES= ${RDIR}.!Boot\
Neil Turton's avatar
Neil Turton committed
63 64 65 66
 ${LDIR}.!Help\
 ${RDIR}.!Run\
 ${RDIR}.!Sprites\
 ${RDIR}.!Sprites22\
67 68
 ${RDIR}.bin.GetHost\
 ${RDIR}.bin.Host\
69
 ${SDIR}.map-mbone.Map-MBone\
Kevin Bracey's avatar
Kevin Bracey committed
70
 ${SDIR}.mrinfo.MRInfo\
71
 ${SDIR}.mtrace.MTrace\
72 73
 ${SDIR}.pong.Pong\
 ${SDIR}.utils.utl.RMFind\
Neil Turton's avatar
Neil Turton committed
74 75 76 77 78 79
 ${RDIR}.files.AUNMap\
 ${RDIR}.files.Hosts\
 ${RDIR}.files.Networks\
 ${RDIR}.files.Protocols\
 ${RDIR}.files.Services\
 ${RDIR}.utils.BootNet\
80 81 82 83
 ${SDIR}.utils.utl.CheckMem\
 ${SDIR}.newfiler.NewFiler\
 ${SDIR}.utils.utl.ReadCMOSIP\
 ${SDIR}.utils.utl.TriggerCBs
Neil Turton's avatar
Neil Turton committed
84

85 86 87 88
FILES=\
  ${COMMONFILES} \
  ${DISCFILES}
  
89 90 91 92
NETUTILS = \
        ${SDIR}.arp.ARP              \
        ${SDIR}.ifconfig.IfConfig    \
        ${SDIR}.inetstat.InetStat    \
Stewart Brodie's avatar
Stewart Brodie committed
93
        ${SDIR}.ipvars.IPVars        \
94
        ${SDIR}.map-mbone.Map-MBone  \
Kevin Bracey's avatar
Kevin Bracey committed
95
        ${SDIR}.mrinfo.MRInfo        \
96
        ${SDIR}.mtrace.MTrace        \
97 98 99 100
        ${SDIR}.ping.Ping            \
        ${SDIR}.pong.Pong            \
        ${SDIR}.utils.utl.RMFind     \
        ${SDIR}.route.Route          \
101
        ${SDIR}.showstat.ShowStat    \
102
        ${SDIR}.sysctl.SysCtl        \
103 104 105 106 107 108
        ${SDIR}.traceroute.TraceRoute \
        ${SDIR}.utils.utl.X           \
        ${RDIR}.!Boot                 \
        ${RDIR}.!Run                  \
        ${RDIR}.!Sprites              \
        ${RDIR}.!Sprites22
109

Neil Turton's avatar
Neil Turton committed
110 111 112 113 114 115
#
# Main rules:
#
all: ${FILES}
        @echo ${COMPONENT}: All built (Disc)

116
install: install_${OPTIONS} install_common dirs
117 118
        ${ATTR} -directories +wr -ww ${INSTAPP}
        ${ATTR} -files +or +ow +wr -ww ${INSTAPP}
119 120 121
        @echo ${COMPONENT}: All installed (Disc)

install_common: ${COMMONFILES}
122 123 124 125 126 127 128 129 130 131
        ${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}
        ${CP} ${SDIR}.utils.utl.X           ${INSTAPP}.bin.X            ${CPFLAGS}
132 133

install_STB:
134 135 136 137 138
        ${MKDIR} ${INSTAPP}.etc
        ${CP} LocalUserIFRes:!Boot     ${INSTAPP}.!Boot         ${CPFLAGS}
        ${CP} ${RDIR}.files.Hosts      ${INSTAPP}.etc.hosts     ${CPFLAGS}
        ${CP} ${RDIR}.files.protocols  ${INSTAPP}.etc.protocols ${CPFLAGS}
        ${CP} ${RDIR}.files.services   ${INSTAPP}.etc.services  ${CPFLAGS}
139 140

install_: ${DISCFILES} dirs
141 142 143 144 145 146 147 148
        ${CP} ${RDIR}.!Boot      ${INSTAPP}.!Boot      ${CPFLAGS}
        ${CP} ${LDIR}.!Help      ${INSTAPP}.!Help      ${CPFLAGS}
        ${CP} ${RDIR}.!Run       ${INSTAPP}.!Run       ${CPFLAGS}
        ${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
149
        |
150 151 152 153 154 155 156 157 158
        ${CP} ${SDIR}.map-mbone.Map-MBone   ${INSTAPP}.bin.Map-MBone    ${CPFLAGS}
        ${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}
159 160

dirs:
161 162
        ${MKDIR} ${INSTAPP}
        ${MKDIR} ${INSTAPP}.bin
Neil Turton's avatar
Neil Turton committed
163 164

clean:
165 166 167
	dir ${SDIR}
	!MkMods clean
	up
Neil Turton's avatar
Neil Turton committed
168 169
        @echo ${COMPONENT}: cleaned

170 171 172 173 174 175 176 177
resources: resources-${TYPE}

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

resources-NetUtils: ${NETUTILS}
	${MKDIR} ${RESD}
	${MKDIR} ${RESD}.bin
178
	${MKDIR} ${RESD}.files
179 180
        ${CP} ${SDIR}.arp.ARP               ${RESD}.bin.ARP          ${CPFLAGS}
        ${CP} ${SDIR}.ifconfig.IfConfig     ${RESD}.bin.IfConfig     ${CPFLAGS}
Stewart Brodie's avatar
Stewart Brodie committed
181
        ${CP} ${SDIR}.ipvars.IPVars         ${RESD}.bin.IPVars       ${CPFLAGS}
182
        ${CP} ${SDIR}.inetstat.InetStat     ${RESD}.bin.InetStat     ${CPFLAGS}
183
        ${CP} ${SDIR}.map-mbone.Map-MBone   ${RESD}.bin.Map-MBone    ${CPFLAGS}
Kevin Bracey's avatar
Kevin Bracey committed
184
        ${CP} ${SDIR}.mrinfo.MRInfo         ${RESD}.bin.MRInfo       ${CPFLAGS}
185
        ${CP} ${SDIR}.mtrace.MTrace         ${RESD}.bin.MTrace       ${CPFLAGS}
186 187 188 189 190
        ${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}
191
        ${CP} ${SDIR}.showstat.ShowStat     ${RESD}.bin.ShowStat     ${CPFLAGS}
192 193
        ${CP} ${SDIR}.traceroute.TraceRoute ${RESD}.bin.TraceRoute   ${CPFLAGS}
        ${CP} ${SDIR}.utils.utl.X           ${RESD}.bin.X            ${CPFLAGS}
194 195 196 197 198 199 200 201 202
        ${CP} ${RDIR}.files.AUNMap          ${RESD}.files.AUNMap     ${CPFLAGS}
        ${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}
        ${CP} ${RDIR}.!Boot                 ${RESD}.!Boot      ${CPFLAGS}
        ${CP} ${RDIR}.!Run                  ${RESD}.!Run       ${CPFLAGS}
        ${CP} ${RDIR}.!Sprites              ${RESD}.!Sprites   ${CPFLAGS}
        ${CP} ${RDIR}.!Sprites22            ${RESD}.!Sprites22 ${CPFLAGS}
203

204 205 206 207 208 209 210 211 212 213 214 215
${SDIR}.arp.ARP: ${SDIR}.arp.c.ARP
	dir ${SDIR}.arp
	@amu_machine
	@up
	@up

${SDIR}.ifconfig.IfConfig: ${SDIR}.ifconfig.c.IfConfig
	dir ${SDIR}.ifconfig
	@amu_machine
	@up
	@up

Stewart Brodie's avatar
Stewart Brodie committed
216 217 218 219 220 221
${SDIR}.ipvars.IPVars: ${SDIR}.ipvars.c.ipvars
	dir ${SDIR}.ipvars
	@amu_machine
	@up
	@up

222 223 224 225 226 227 228 229 230 231
${SDIR}.inetstat.InetStat: ${SDIR}.inetstat.c.main \
	${SDIR}.inetstat.c.if\
	${SDIR}.inetstat.c.inet\
	${SDIR}.inetstat.c.route\
	${SDIR}.inetstat.c.mroute
	dir ${SDIR}.inetstat
	@amu_machine
	@up
	@up

232 233 234 235 236 237 238 239 240
${SDIR}.map-mbone.Map-MBone: ${SDIR}.map-mbone.c.Map-MBone \
	${SDIR}.map-mbone.c.igmp \
	${SDIR}.map-mbone.c.inet \
	${SDIR}.map-mbone.c.kern
	dir ${SDIR}.map-mbone
	@amu_machine
	@up
	@up

Kevin Bracey's avatar
Kevin Bracey committed
241 242 243 244 245 246 247 248 249
${SDIR}.mrinfo.MRInfo: ${SDIR}.mrinfo.c.MRInfo \
	${SDIR}.mrinfo.c.igmp \
	${SDIR}.mrinfo.c.inet \
	${SDIR}.mrinfo.c.kern
	dir ${SDIR}.mrinfo
	@amu_machine
	@up
	@up

250 251 252 253 254 255
${SDIR}.mtrace.MTrace: ${SDIR}.mtrace.c.MTrace
	dir ${SDIR}.mtrace
	@amu_machine
	@up
	@up

256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
${SDIR}.ping.Ping: ${SDIR}.ping.c.Ping
	dir ${SDIR}.ping
	@amu_machine
	@up
	@up

${SDIR}.pong.Pong: ${SDIR}.pong.c.Pong
	dir ${SDIR}.pong
	@amu_machine
	@up
	@up

${SDIR}.route.Route: ${SDIR}.route.c.Route
	dir ${SDIR}.route
	@amu_machine
	@up
	@up

274 275 276 277 278 279
${SDIR}.showstat.ShowStat:
	dir ${SDIR}.showstat
	@amu_machine 
	@up
	@up

280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
${SDIR}.sysctl.SysCtl: ${SDIR}.sysctl.c.SysCtl
	dir ${SDIR}.sysctl
	@amu_machine
	@up
	@up

${SDIR}.traceroute.TraceRoute: ${SDIR}.traceroute.c.TraceRoute
	dir ${SDIR}.traceroute
	@amu_machine
	@up
	@up

${SDIR}.newfiler.NewFiler: ${SDIR}.newfiler.c.NewFiler
	dir ${SDIR}.newfiler
	@amu_machine
	@up
	@up

${SDIR}.utils.utl.CheckMem: ${SDIR}.utils.s.CheckMem
	dir ${SDIR}.utils
	@amu_machine utl.CheckMem
	@up
	@up

${SDIR}.utils.utl.ReadCMOSIP: ${SDIR}.utils.s.ReadCMOSIP
	dir ${SDIR}.utils
	@amu_machine utl.ReadCMOSIP
	@up
	@up

${SDIR}.utils.utl.RMFind: ${SDIR}.utils.s.RMFind
	dir ${SDIR}.utils
	@amu_machine utl.RMFind
	@up
	@up

${SDIR}.utils.utl.TriggerCBs: ${SDIR}.utils.s.TriggerCBs
	dir ${SDIR}.utils
	@amu_machine utl.TriggerCBs
	@up
	@up

${SDIR}.utils.utl.X: ${SDIR}.utils.s.X
	dir ${SDIR}.utils
	@amu_machine utl.X
	@up
	@up


Neil Turton's avatar
Neil Turton committed
329 330
#---------------------------------------------------------------------------
# Dynamic dependencies: