Makefile 9.69 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
Neil Turton's avatar
Neil Turton committed
35
INSTDIR    = ${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 54 55 56 57 58 59 60 61

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

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

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

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
install: install_${OPTIONS} install_common dirs
        ${ATTR} -directories +wr -ww ${INSTDIR}
        ${ATTR} -files +or +ow +wr -ww ${INSTDIR}
        @echo ${COMPONENT}: All installed (Disc)

install_common: ${COMMONFILES}
        ${CP} ${SDIR}.arp.ARP               ${INSTDIR}.bin.ARP          ${CPFLAGS}
        ${CP} ${SDIR}.ifconfig.IfConfig     ${INSTDIR}.bin.IfConfig     ${CPFLAGS}
        ${CP} ${SDIR}.inetstat.InetStat     ${INSTDIR}.bin.InetStat     ${CPFLAGS}
        ${CP} ${SDIR}.ping.Ping             ${INSTDIR}.bin.Ping         ${CPFLAGS}
        ${CP} ${SDIR}.route.Route           ${INSTDIR}.bin.Route        ${CPFLAGS}
        ${CP} ${SDIR}.showstat.ShowStat     ${INSTDIR}.bin.ShowStat     ${CPFLAGS}
        ${CP} ${SDIR}.sysctl.SysCtl         ${INSTDIR}.bin.SysCtl       ${CPFLAGS}
        ${CP} ${SDIR}.traceroute.TraceRoute ${INSTDIR}.bin.TraceRoute   ${CPFLAGS}
        ${CP} ${SDIR}.utils.utl.X           ${INSTDIR}.bin.X            ${CPFLAGS}

install_STB:
        ${MKDIR} ${INSTDIR}.etc
        ${CP} LocalUserIFRes:!Run      ${INSTDIR}.!Run          ${CPFLAGS}
        ${CP} LocalUserIFRes:!Help     ${INSTDIR}.!Help         ${CPFLAGS}
        ${CP} LocalUserIFRes:hosts     ${INSTDIR}.etc.hosts     ${CPFLAGS}
        ${CP} LocalUserIFRes:protocols ${INSTDIR}.etc.protocols ${CPFLAGS}
        ${CP} LocalUserIFRes:services  ${INSTDIR}.etc.services  ${CPFLAGS}

install_: ${DISCFILES} dirs
Neil Turton's avatar
Neil Turton committed
139 140 141 142 143 144 145 146 147
        ${CP} ${RDIR}.!Boot      ${INSTDIR}.!Boot      ${CPFLAGS}
        ${CP} ${LDIR}.!Help      ${INSTDIR}.!Help      ${CPFLAGS}
        ${CP} ${RDIR}.!Run       ${INSTDIR}.!Run       ${CPFLAGS}
        ${CP} ${RDIR}.!Sprites   ${INSTDIR}.!Sprites   ${CPFLAGS}
        ${CP} ${RDIR}.!Sprites22 ${INSTDIR}.!Sprites22 ${CPFLAGS}
        ${CP} ${RDIR}.bin        ${INSTDIR}.bin        ${CPFLAGS}
        ${CP} ${RDIR}.files      ${INSTDIR}.files      ${CPFLAGS}
        ${CP} ${RDIR}.utils      ${INSTDIR}.utils      ${CPFLAGS}
        |
148
        ${CP} ${SDIR}.map-mbone.Map-MBone   ${INSTDIR}.bin.Map-MBone    ${CPFLAGS}
Kevin Bracey's avatar
Kevin Bracey committed
149
        ${CP} ${SDIR}.mrinfo.MRInfo         ${INSTDIR}.bin.MRInfo       ${CPFLAGS}
150
        ${CP} ${SDIR}.mtrace.MTrace         ${INSTDIR}.bin.MTrace       ${CPFLAGS}
151 152 153 154 155 156
        ${CP} ${SDIR}.pong.Pong             ${INSTDIR}.bin.Pong         ${CPFLAGS}
        ${CP} ${SDIR}.utils.utl.RMFind      ${INSTDIR}.bin.RMFind       ${CPFLAGS}
        ${CP} ${SDIR}.utils.utl.CheckMem    ${INSTDIR}.utils.CheckMem   ${CPFLAGS}
        ${CP} ${SDIR}.newfiler.NewFiler     ${INSTDIR}.utils.NewFiler   ${CPFLAGS}
        ${CP} ${SDIR}.utils.utl.ReadCMOSIP  ${INSTDIR}.utils.ReadCMOSIP ${CPFLAGS}
        ${CP} ${SDIR}.utils.utl.TriggerCBs  ${INSTDIR}.utils.TriggerCBs ${CPFLAGS}
157 158 159 160

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

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

168 169 170 171 172 173 174 175
resources: resources-${TYPE}

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

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

201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222
${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

${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

223 224 225 226 227 228 229 230 231
${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
232 233 234 235 236 237 238 239 240
${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

241 242 243 244 245 246
${SDIR}.mtrace.MTrace: ${SDIR}.mtrace.c.MTrace
	dir ${SDIR}.mtrace
	@amu_machine
	@up
	@up

247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
${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

265 266 267 268 269 270
${SDIR}.showstat.ShowStat:
	dir ${SDIR}.showstat
	@amu_machine 
	@up
	@up

271 272 273 274 275 276 277 278 279 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
${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
320 321
#---------------------------------------------------------------------------
# Dynamic dependencies: