Makefile 4.56 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
# 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 BootMerge / FontMerge / SysMerge
#
# ***********************************
# ***    C h a n g e   L i s t    ***
# ***********************************
# Date           Name   Description
# ----           ----   -----------
# 29-May-98      BJGA   Derived from FontSetup makefile
# 10-Jun-98      BJGA   Added preprocess-only option
#

#
# Program specific options:
#
APP        = !${COMPONENT}
RDIR       = Resources.${COMPONENT}
LDIR       = ${RDIR}.${LOCALE}
Steve Revill's avatar
Steve Revill committed
32
INSTAPP    = ${INSTDIR}.${APP}
33 34 35 36

#
# Generic options:
#
Steve Revill's avatar
Steve Revill committed
37
MKDIR   = do mkdir -p
38 39 40 41 42 43
CC      = cc
ATTR    = -attr
CP      = copy
LD      = link
RM      = remove
SQUEEZE = squeeze
44
WIPE    = x wipe
45
XWIPE   = x wipe
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70

CFLAGS  = -c -depend !Depend -ffa -gflv ${INCLUDES} -throwback
PFLAGS  = -c -depend !Depend -E -C ${INCLUDES} -throwback
CPFLAGS = ~cfr~v
WFLAGS  = ~c~v

#
# Libraries
#
CLIB = C:o.stubs
ELIB = Tbox:o.eventlib
TLIB = Tbox:o.toolboxlib
WLIB = Tbox:o.wimplib
CONLIB = <Lib$Dir>.ConfigLib.o.ConfigLib

#
# Include files
#
INCLUDES = -ITbox:,C:,<Lib$Dir>.ConfigLib.

FILES=\
 ${LDIR}.!Help\
 ${RDIR}.!Boot\
 ${LDIR}.!Run\
 ${RDIR}.!RunImage\
71 72
 ${RDIR}.!Sprites\
 ${RDIR}.!Sprites11\
73
 ${RDIR}.!Sprites22\
74
 ${RDIR}.CoSprite\
Robert Sprowson's avatar
Robert Sprowson committed
75
 ${RDIR}.CoSprite11\
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
 ${RDIR}.CoSprite22\
 ${LDIR}.Messages\
 ${LDIR}.Res\

SOBJS = oS.Main oS.Merge oS.ToolboxE oS.WimpE oS.WimpM
FOBJS = oF.Main oF.Merge oF.ToolboxE oF.WimpE oF.WimpM
BOBJS = oB.Main oB.Merge oB.ToolboxE oB.WimpE oB.WimpM
POBJS = pS.Main pS.Merge pS.ToolboxE pS.WimpE pS.WimpM \
        pF.Main pF.Merge pF.ToolboxE pF.WimpE pF.WimpM \
        pB.Main pB.Merge pB.ToolboxE pB.WimpE pB.WimpM \


#
# Rule patterns
#
.SUFFIXES: .c .oB .oF .oS .pB .pF .pS
.c.oB:;  ${CC} ${CFLAGS} -DAPP=1 -o $@ $<
.c.oF:;  ${CC} ${CFLAGS} -DAPP=2 -o $@ $<
.c.oS:;  ${CC} ${CFLAGS} -DAPP=3 -o $@ $<
.c.pB:;  ${CC} ${PFLAGS} -DAPP=1 $< > $@
.c.pF:;  ${CC} ${PFLAGS} -DAPP=2 $< > $@
.c.pS:;  ${CC} ${PFLAGS} -DAPP=3 $< > $@

#
# Main rules:
#
# Application
#
all:        Resources.SysMerge.!RunImage \
            Resources.FontMerge.!RunImage \
            Resources.BootMerge.!RunImage
	@echo All built (Disc)

preprocess: ${POBJS}
	@echo
	@echo Preprocessing complete

install:    Resources.SysMerge.!RunImage \
            Resources.FontMerge.!RunImage \
            Resources.BootMerge.!RunImage
Steve Revill's avatar
Steve Revill committed
116
	${MKDIR} ${INSTAPP}
117
	|
Steve Revill's avatar
Steve Revill committed
118 119 120 121
	${CP} ${RDIR}.!Boot      ${INSTAPP}.!Boot      ${CPFLAGS}
	${CP} ${LDIR}.!Help      ${INSTAPP}.!Help      ${CPFLAGS}
	${CP} ${LDIR}.!Run       ${INSTAPP}.!Run       ${CPFLAGS}
	${CP} ${RDIR}.!RunImage  ${INSTAPP}.!RunImage  ${CPFLAGS}
122 123
	${CP} ${RDIR}.!Sprites   ${INSTAPP}.!Sprites   ${CPFLAGS}
	${CP} ${RDIR}.!Sprites11 ${INSTAPP}.!Sprites11 ${CPFLAGS}
Steve Revill's avatar
Steve Revill committed
124
	${CP} ${RDIR}.!Sprites22 ${INSTAPP}.!Sprites22 ${CPFLAGS}
125
	${CP} ${RDIR}.CoSprite   ${INSTAPP}.CoSprite   ${CPFLAGS}
Robert Sprowson's avatar
Robert Sprowson committed
126
	${CP} ${RDIR}.CoSprite11 ${INSTAPP}.CoSprite11 ${CPFLAGS}
Steve Revill's avatar
Steve Revill committed
127 128 129
	${CP} ${RDIR}.CoSprite22 ${INSTAPP}.CoSprite22 ${CPFLAGS}
	${CP} ${LDIR}.Messages   ${INSTAPP}.Messages   ${CPFLAGS}
	${CP} ${LDIR}.Res        ${INSTAPP}.Res        ${CPFLAGS}
130
	|
Steve Revill's avatar
Steve Revill committed
131 132
	${ATTR} -directories +wr -ww ${INSTAPP}
	${ATTR} -files +or +ow +wr -ww ${INSTAPP}
133 134 135 136
	|
	@echo ${COMPONENT}: All installed (Disc)

clean:
137 138 139 140 141 142
	${XWIPE} oB.* ${WFLAGS}
	${XWIPE} oF.* ${WFLAGS}
	${XWIPE} oS.* ${WFLAGS}
	${XWIPE} pB ${WFLAGS}
	${XWIPE} pF ${WFLAGS}
	${XWIPE} pS ${WFLAGS}
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
	${RM} Resources.BootMerge.!RunImage
	${RM} Resources.FontMerge.!RunImage
	${RM} Resources.SysMerge.!RunImage
	@echo All cleaned

#
# Static dependencies:
#
Resources.BootMerge.!RunImage: ${BOBJS} ${CONLIB} ${ELIB} ${TLIB} ${WLIB} ${CLIB}
	${LD} ${LDFLAGS} -o $@ ${BOBJS} ${CONLIB} ${ELIB} ${TLIB} ${WLIB} ${CLIB}
	${SQUEEZE} $@

Resources.FontMerge.!RunImage: ${FOBJS} ${CONLIB} ${ELIB} ${TLIB} ${WLIB} ${CLIB}
	${LD} ${LDFLAGS} -o $@ ${FOBJS} ${CONLIB} ${ELIB} ${TLIB} ${WLIB} ${CLIB}
	${SQUEEZE} $@

Resources.SysMerge.!RunImage:  ${SOBJS} ${CONLIB} ${ELIB} ${TLIB} ${WLIB} ${CLIB}
	${LD} ${LDFLAGS} -o $@ ${SOBJS} ${CONLIB} ${ELIB} ${TLIB} ${WLIB} ${CLIB}
	${SQUEEZE} $@

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