Makefile 4.16 KB
Newer Older
Neil Turton's avatar
Neil Turton committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# 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.
#
# Makefile for Alarm
#
# ***********************************
# ***    C h a n g e   L i s t    ***
# ***********************************
# Date       Name   Description
# ----       ----   -----------
# 05-Nov-94  AMcC   Updated for Black build
23
# 24-Jul-03  RPS    Use objasm
Neil Turton's avatar
Neil Turton committed
24 25 26 27 28 29 30 31 32
#

#
# Program specific options:
#
COMPONENT  = Alarm
APP        = !${COMPONENT}
ROM_MODULE = rm.${COMPONENT}
RDIR       = Resources
Stewart Brodie's avatar
Stewart Brodie committed
33 34 35
LDIR       = LocalRes:

MSGS       = Resources.GenMessage
Neil Turton's avatar
Neil Turton committed
36 37 38 39 40 41 42 43 44 45 46

#
# Export Paths for Messages module
#
RESDIR = <resource$dir>.Resources2.${COMPONENT}
RESAPP = <resource$dir>.Apps.${APP}

#
# Generic options:
#
MKDIR   = cdir
47
ARMASM  = objasm
Neil Turton's avatar
Neil Turton committed
48 49 50 51 52
CP      = copy
RM      = remove
SQUISH    = squish
WIPE    = -wipe

53
AFLAGS  = ${THROWBACK} -depend !Depend -stamp -quit
Neil Turton's avatar
Neil Turton committed
54 55 56 57 58 59
CPFLAGS = ~cfr~v
SQFLAGS = -nolist
WFLAGS  = ~c~v

FILES =\
 ${RDIR}.!Boot \
Stewart Brodie's avatar
Stewart Brodie committed
60
 ${LDIR}!Help \
Neil Turton's avatar
Neil Turton committed
61 62 63 64
 ${RDIR}.!Run \
 ${RDIR}.!RunImage \
 ${RDIR}.Alarms \
 ${RDIR}.Code \
Stewart Brodie's avatar
Stewart Brodie committed
65 66
 ${MSGS} \
 ${LDIR}Templates 
Neil Turton's avatar
Neil Turton committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85

# Resources to be included in the ROM module (not in Messages module}
RESFILES =\
 ${RDIR}.code \
 ${RDIR}.!RunImage

#
# Main rules:
#
all: ${FILES}
	@echo ${COMPONENT}: Application built (Disc}

rom: ${ROM_MODULE}
	@echo ${COMPONENT}: Module built (ROM}

install: ${FILES}
	${MKDIR} ${INSTDIR}.${APP}
	|
	${CP} ${RDIR}.!Boot      ${INSTDIR}.${APP}.!Boot     ${CPFLAGS}
Stewart Brodie's avatar
Stewart Brodie committed
86
	${CP} ${LDIR}!Help       ${INSTDIR}.${APP}.!Help     ${CPFLAGS}
Neil Turton's avatar
Neil Turton committed
87 88 89 90
	${CP} ${RDIR}.!Run       ${INSTDIR}.${APP}.!Run      ${CPFLAGS}
	${CP} ${RDIR}.!RunImage  ${INSTDIR}.${APP}.!RunImage ${CPFLAGS}
	${CP} ${RDIR}.Alarms     ${INSTDIR}.${APP}.Alarms    ${CPFLAGS}
	${CP} ${RDIR}.Code       ${INSTDIR}.${APP}.Code      ${CPFLAGS}
Stewart Brodie's avatar
Stewart Brodie committed
91 92
	${CP} ${MSGS}            ${INSTDIR}.${APP}.Messages  ${CPFLAGS}
	${CP} ${LDIR}Template3D  ${INSTDIR}.${APP}.Templates ${CPFLAGS}
Neil Turton's avatar
Neil Turton committed
93 94 95 96 97 98 99 100 101 102
	|
	Access ${INSTDIR}.${APP}.* lr/r
	Access ${INSTDIR}.${APP}.Alarms wr/r
	|
	@echo ${COMPONENT}: Application installed {Disc}

install_rom: ${ROM_MODULE}
	${CP} ${ROM_MODULE} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
	@echo ${COMPONENT}: Module installed {ROM}

Stewart Brodie's avatar
Stewart Brodie committed
103
resources: ${RDIR}.!RunLink ${MSGS} ${RDIR}.Code
Neil Turton's avatar
Neil Turton committed
104 105 106 107
	${MKDIR} ${RESAPP}
	${MKDIR} ${RESDIR}
	|
	${CP} ${RDIR}.!Boot      ${RESAPP}.!Boot     ${CPFLAGS}
Stewart Brodie's avatar
Stewart Brodie committed
108
	${CP} ${LDIR}!Help       ${RESAPP}.!Help     ${CPFLAGS}
Neil Turton's avatar
Neil Turton committed
109 110
	${CP} ${RDIR}.ROM.!Run   ${RESAPP}.!Run      ${CPFLAGS}
	|
Stewart Brodie's avatar
Stewart Brodie committed
111
	${CP} ${RDIR}.!RunLink   ${RESDIR}.!RunLink  ${CPFLAGS}
Neil Turton's avatar
Neil Turton committed
112
	${CP} ${RDIR}.Code       ${RESDIR}.Code      ${CPFLAGS}
Stewart Brodie's avatar
Stewart Brodie committed
113 114
	${CP} ${MSGS}            ${RESDIR}.Messages  ${CPFLAGS}
	${CP} ${LDIR}Template3D  ${RESDIR}.Templates ${CPFLAGS}
Neil Turton's avatar
Neil Turton committed
115 116 117 118 119 120
	|
	@echo ${COMPONENT}: resource files copied to Messages module

clean:
	${RM} ${ROM_MODULE}
	${RM} ${RDIR}.!RunImage
Kevin Bracey's avatar
Kevin Bracey committed
121
	${RM} ${RDIR}.!RunLink
Neil Turton's avatar
Neil Turton committed
122
	${RM} ${RDIR}.Code
Stewart Brodie's avatar
Stewart Brodie committed
123
	${RM} ${MSGS}
124
	${WIPE} o          ${WFLAGS}
Neil Turton's avatar
Neil Turton committed
125 126 127 128 129 130 131
	${WIPE} crunched.* ${WFLAGS}
	@echo ${COMPONENT}: cleaned

#
# Development rules:
# 
ResVsn:
132 133 134
	${MKDIR} o
	${ARMASM} ${AFLAGS} -o o.AlarmRes s.ResVsn
	Link -rmf -o rm.AlarmRes o.AlarmRes 
Neil Turton's avatar
Neil Turton committed
135 136 137 138 139

#
# Static dependencies:
#

Stewart Brodie's avatar
Stewart Brodie committed
140
${ROM_MODULE}: s.Main ${MSGS} ${RESFILES}
141 142 143
	${MKDIR} o
	${ARMASM} ${AFLAGS} -o o.Main s.Main
	Link -rmf -o $@ o.Main 
Neil Turton's avatar
Neil Turton committed
144

Stewart Brodie's avatar
Stewart Brodie committed
145
${MSGS}: LocalRes:Messages VersionASM
146
	GNU.gawk -f awk.Version LocalRes:Messages > $@
Neil Turton's avatar
Neil Turton committed
147 148 149 150 151 152 153

${RDIR}.!RunImage: crunched.!RunImage
	${SQUISH} ${SQFLAGS} -from crunched.!RunImage -to $@

crunched.!RunImage: bas.!RunImage
	crunch.!RunImage; BASIC

Stewart Brodie's avatar
Stewart Brodie committed
154
${RDIR}.!RunLink: bas.!RunLink
Neil Turton's avatar
Neil Turton committed
155 156 157 158 159 160
	${SQUISH} ${SQFLAGS} -from bas.!RunLink -to $@

# Note! name of output file (Resources.Code) is in AlarmSrc
${RDIR}.Code: bas.AlarmSrc
	/bas.AlarmSrc

161 162 163 164
BBETYPE = alarm
bbe-alarm: bbe-generic
	BBE_Export_Dir Resources

Neil Turton's avatar
Neil Turton committed
165 166
#---------------------------------------------------------------------------
# Dynamic dependencies: