Makefile 10.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:
#
40
MKDIR   = mkdir -p
Neil Turton's avatar
Neil Turton committed
41 42 43 44 45 46 47 48
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
 ${SDIR}.ping.Ping\
 ${SDIR}.route.Route\
 ${SDIR}.showstat.ShowStat\
 ${SDIR}.sysctl.SysCtl\
Steve Revill's avatar
Steve Revill committed
59 60 61
 ${SDIR}.traceroute.TraceRoute

# ${SDIR}.utils.utl.X
62 63

STBFILES=${SDIR}.pong.Pong
64 65

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

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

Steve Revill's avatar
Steve Revill committed
114 115
#        ${SDIR}.utils.utl.X           \

Neil Turton's avatar
Neil Turton committed
116 117 118 119 120 121
#
# Main rules:
#
all: ${FILES}
        @echo ${COMPONENT}: All built (Disc)

122
install: install_${OPTIONS} install_common dirs
123 124
        ${ATTR} -directories +wr -ww ${INSTAPP}
        ${ATTR} -files +or +ow +wr -ww ${INSTAPP}
125 126 127
        @echo ${COMPONENT}: All installed (Disc)

install_common: ${COMMONFILES}
128 129 130 131 132 133 134 135 136
        ${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
137 138

#        ${CP} ${SDIR}.utils.utl.X           ${INSTAPP}.bin.X            ${CPFLAGS}
139

140 141 142 143 144 145 146 147 148 149 150
install_STB: ${STBFILES}
        ${MKDIR} ${INSTAPP}.files
        ${CP} LocalUserIFRes:!Boot     ${INSTAPP}.!Boot           ${CPFLAGS}
        ${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}
151 152

install_: ${DISCFILES} dirs
153 154 155 156 157 158 159 160
        ${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
161
        |
162 163 164 165 166 167 168 169 170
        ${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}
171 172

dirs:
173 174
        ${MKDIR} ${INSTAPP}
        ${MKDIR} ${INSTAPP}.bin
Neil Turton's avatar
Neil Turton committed
175 176

clean:
177 178 179
	dir ${SDIR}
	!MkMods clean
	up
Neil Turton's avatar
Neil Turton committed
180 181
        @echo ${COMPONENT}: cleaned

182 183 184 185 186 187 188 189
resources: resources-${TYPE}

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

resources-NetUtils: ${NETUTILS}
	${MKDIR} ${RESD}
	${MKDIR} ${RESD}.bin
190
	${MKDIR} ${RESD}.files
191 192
        ${CP} ${SDIR}.arp.ARP               ${RESD}.bin.ARP          ${CPFLAGS}
        ${CP} ${SDIR}.ifconfig.IfConfig     ${RESD}.bin.IfConfig     ${CPFLAGS}
Stewart Brodie's avatar
Stewart Brodie committed
193
        ${CP} ${SDIR}.ipvars.IPVars         ${RESD}.bin.IPVars       ${CPFLAGS}
194
        ${CP} ${SDIR}.inetstat.InetStat     ${RESD}.bin.InetStat     ${CPFLAGS}
195
        ${CP} ${SDIR}.map-mbone.Map-MBone   ${RESD}.bin.Map-MBone    ${CPFLAGS}
Kevin Bracey's avatar
Kevin Bracey committed
196
        ${CP} ${SDIR}.mrinfo.MRInfo         ${RESD}.bin.MRInfo       ${CPFLAGS}
197
        ${CP} ${SDIR}.mtrace.MTrace         ${RESD}.bin.MTrace       ${CPFLAGS}
198 199 200 201 202
        ${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}
203
        ${CP} ${SDIR}.showstat.ShowStat     ${RESD}.bin.ShowStat     ${CPFLAGS}
204 205
        ${CP} ${SDIR}.traceroute.TraceRoute ${RESD}.bin.TraceRoute   ${CPFLAGS}
        ${CP} ${SDIR}.utils.utl.X           ${RESD}.bin.X            ${CPFLAGS}
206 207 208 209 210 211 212 213 214
        ${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}
215

216 217 218 219 220 221 222 223 224 225 226 227
${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
228 229 230 231 232 233
${SDIR}.ipvars.IPVars: ${SDIR}.ipvars.c.ipvars
	dir ${SDIR}.ipvars
	@amu_machine
	@up
	@up

234 235 236 237 238 239 240 241 242 243
${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

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

262 263 264 265 266 267
${SDIR}.mtrace.MTrace: ${SDIR}.mtrace.c.MTrace
	dir ${SDIR}.mtrace
	@amu_machine
	@up
	@up

268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
${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

286 287 288 289 290 291
${SDIR}.showstat.ShowStat:
	dir ${SDIR}.showstat
	@amu_machine 
	@up
	@up

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 329 330 331 332 333 334 335 336 337 338 339 340
${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
341 342
#---------------------------------------------------------------------------
# Dynamic dependencies: