Makefile 4.11 KB
Newer Older
Richard Leggett's avatar
Richard Leggett committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# Copyright 1998 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 Help2
#
# ***********************************
# ***    C h a n g e   L i s t    ***
# ***********************************
# Date       Name   Description
# ----       ----   -----------
# 31-Mar-98  RML    Created
23 24
# 27-Apr-98  RML    ROM build rules added
# 01-May-98  RML    Creates rm directory
25
# 21-Sep-02  RPS    For ROM,we'll make use of the sprites in the Wimp
Richard Leggett's avatar
Richard Leggett committed
26 27 28 29

#
# Program specific options:
#
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
COMPONENT   = Help
APP         = !Help
MODULE      = rm.${COMPONENT}
ROM_MODULE  = aof.${COMPONENT}
RDIR        = Resources
LDIR        = ${RDIR}.${LOCALE}
MODULE_NAME = !Help
MODULE_HELP = "!Help"
VERSION     = 1.00
FILELIST    = ${RDIR}.Filelist

#
# Export Paths for Messages module
#
RESDIR = <resource$dir>.Resources.${COMPONENT}
RESAPP = <resource$dir>.Apps.${APP}
Richard Leggett's avatar
Richard Leggett committed
46 47 48 49 50

#
# Generic options:
#
MKDIR   = cdir
51
MODGEN  = modgen
Richard Leggett's avatar
Richard Leggett committed
52 53 54 55 56 57 58 59
CC      = cc
LD      = link
CP      = copy
RM      = remove
SQUISH  = squish
WIPE    = -wipe

AFLAGS  = ${THROWBACK} -depend !Depend -nocache -stamp -quit -module
60
CFLAGS  = ${THROWBACK} -depend !Depend -ffa ${INCLUDES} 
Richard Leggett's avatar
Richard Leggett committed
61 62 63 64 65 66 67 68 69 70 71
CPFLAGS = ~cfr~v
SQFLAGS = -nolist
WFLAGS  = ~c~v

#
# Libraries
#
CLIB       = CLib:o.stubs
EVENTLIB   = tbox:o.eventlib
TOOLBOXLIB = tbox:o.toolboxlib
WIMPLIB    = tbox:o.wimplib
72
WRAPPER    = RISC_OSLib:s.ModuleWrap
Richard Leggett's avatar
Richard Leggett committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91

#
# Include files
#
INCLUDES = -Itbox:,C:

FILES =\
 ${RDIR}.!Boot \
 ${LDIR}.!Help \
 ${RDIR}.!Run \
 ${RDIR}.!RunImage \
 ${LDIR}.Messages \
 ${LDIR}.Res

OBJS =\
  o.main \
  o.help \
  o.common

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

Richard Leggett's avatar
Richard Leggett committed
96 97 98 99 100 101 102 103 104 105 106 107 108
#
# Rule patterns
#
.SUFFIXES: .o

.c.o:; @echo
	@echo Compiling $<
	@${CC} ${CFLAGS} ${DFLAGS}        -c -o $@ $<
	
#
# Main rules:
#

109 110 111 112 113 114
rom: ${MODULE}
	@echo ${COMPONENT}: rom module built

install_rom: ${MODULE}
	${CP} ${MODULE} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
	@echo ${COMPONENT}: rom module installed
Richard Leggett's avatar
Richard Leggett committed
115 116 117 118 119 120 121 122 123 124 125

install: ${FILES}
	 @echo
	 @echo ${COMPONENT}: Creating application ${APP}
	 ${MKDIR} ${INSTDIR}.${APP}
	 ${CP} ${RDIR}.!Boot      ${INSTDIR}.${APP}.!Boot      ${CPFLAGS}
	 ${CP} ${LDIR}.!Help      ${INSTDIR}.${APP}.!Help      ${CPFLAGS}
	 ${CP} ${RDIR}.!Run       ${INSTDIR}.${APP}.!Run       ${CPFLAGS}
	 ${CP} ${RDIR}.!RunImage  ${INSTDIR}.${APP}.!RunImage  ${CPFLAGS} 
	 ${CP} ${LDIR}.Messages   ${INSTDIR}.${APP}.Messages   ${CPFLAGS}
	 ${CP} ${LDIR}.Res        ${INSTDIR}.${APP}.Res        ${CPFLAGS}
126
	 ${CP} ${RDIR}.!Sprites22 ${INSTDIR}.${APP}.!Sprites22 ${CPFLAGS}
Richard Leggett's avatar
Richard Leggett committed
127 128 129 130
	 Access ${INSTDIR}.${APP}.* wr/r
	 @echo
	 @echo ${COMPONENT}: Application installed {Disc}

131
resources:
132 133 134 135 136 137 138 139 140 141 142 143
	${MKDIR} ${RESAPP}
	${MKDIR} ${RESDIR}
	|
	${CP} ${LDIR}.!Help         ${RESAPP}.!Help     ${CPFLAGS}
	${CP} ${RDIR}.ROM.!Run      ${RESAPP}.!Run      ${CPFLAGS}
	${CP} ${RDIR}.ROM.!Boot     ${RESAPP}.!Boot     ${CPFLAGS}
	|
	${CP} ${LDIR}.Res           ${RESDIR}.Res       ${CPFLAGS}
	${CP} ${LDIR}.Messages      ${RESDIR}.Messages  ${CPFLAGS}
	|
	@echo ${COMPONENT}: resource files copied to Messages module

Richard Leggett's avatar
Richard Leggett committed
144
clean:
145
	${WIPE} rm.*     ${WFLAGS}
Richard Leggett's avatar
Richard Leggett committed
146
	${WIPE} o.*      ${WFLAGS}
147 148
	${WIPE} ${APP}.* ${WFLAGS}
	${RM} ${MODULE}
Richard Leggett's avatar
Richard Leggett committed
149 150 151 152 153 154 155 156 157
	${RM} ${RDIR}.!RunImage
	${RM} ${APP}
	@echo ${COMPONENT}: cleaned

#
# Static dependencies:
#

Resources.!RunImage: ${OBJS} ${EVENTLIB} ${TOOLBOXLIB} ${WIMPLIB} ${CLIB}
158 159 160 161 162 163 164 165 166
	${LD} -o $@ ${OBJS} ${CLIB} ${EVENTLIB} ${TOOLBOXLIB} ${WIMPLIB} 

${MODULE}: ${FILES} ${VERSION}
	   ${MKDIR} rm
	   Do ${MODGEN} $@ ${MODULE_NAME} ${MODULE_HELP} <Help2$BuildVersion> -via ${FILELIST}

${VERSION}:
	perl build:getversion Help2$BuildVersion
	
Richard Leggett's avatar
Richard Leggett committed
167 168 169

#---------------------------------------------------------------------------
# Dynamic dependencies: