Makefile 4.55 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
# 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 Kernel
#

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
COMPONENT       = Kernel
C_EXP_HDR       = <cexport$dir>.Global.h
TOKHELPSRC      = ${TOKENSOURCE}
HELPSRC         = HelpStrs
ROM_SOURCE      = GetAll.s
KERNEL_MODULE   = bin${SEP}${COMPONENT}
ASFLAGS         = -PD "FreezeDevRel SETL {${FREEZE_DEV_REL}}"
CUSTOMROM       = custom
CUSTOMEXP       = custom
EXPORTS         = ${EXP_HDR}.EnvNumbers \
                  ${EXP_HDR}.ModHand \
                  ${EXP_HDR}.PublicWS \
                  ${EXP_HDR}.RISCOS \
                  ${EXP_HDR}.Variables \
                  ${EXP_HDR}.VduExt \
                  ${EXP_HDR}.HALEntries \
                  ${EXP_HDR}.HALDevice \
                  ${EXP_HDR}.VideoDevice \
                  ${EXP_HDR}.GPIODevice \
                  ${EXP_HDR}.OSEntries \
                  ${EXP_HDR}.OSRSI6 \
                  ${EXP_HDR}.VIDCList \
                  ${C_EXP_HDR}.ModHand \
                  ${C_EXP_HDR}.RISCOS \
                  ${C_EXP_HDR}.HALEntries \
                  ${C_EXP_HDR}.HALDevice \
                  ${C_EXP_HDR}.OSEntries \
                  ${C_EXP_HDR}.Variables \
                  ${C_EXP_HDR}.OSRSI6 \
                  ${C_EXP_HDR}.VduExt \
                  ${C_EXP_HDR}.VIDCList

include StdTools
include AAsmModule
Neil Turton's avatar
Neil Turton committed
52

53 54 55 56 57
# Override this to "TRUE" in the components file if
# you want an odd-numbered (development) build to be
# a 'freezable' build - e.g. with no ROM debug output
FREEZE_DEV_REL ?= FALSE

Neil Turton's avatar
Neil Turton committed
58
#
59
# Custom ROM:
Neil Turton's avatar
Neil Turton committed
60
#
61 62
rom: ${KERNEL_MODULE}
	@${ECHO} ${COMPONENT}: rom module built
Neil Turton's avatar
Neil Turton committed
63

64 65 66 67 68 69 70 71 72 73
install_rom: ${KERNEL_MODULE}
	${CP} ${KERNEL_MODULE} ${INSTDIR}${SEP}${TARGET} ${CPFLAGS}
	${CP} ${KERNEL_MODULE}_gpa ${INSTDIR}${SEP}${TARGET}_gpa ${CPFLAGS}
	@${ECHO} ${COMPONENT}: rom module installed

${KERNEL_MODULE}: ${ROM_OBJECT} ${DIRS} 
	${MKDIR} bin
	${LD} -bin -o $@ ${ROM_OBJECT}
	${LD} -aif -bin -d -o ${KERNEL_MODULE}_aif ${ROM_OBJECT}
	${TOGPA} -s ${KERNEL_MODULE}_aif ${KERNEL_MODULE}_gpa
Neil Turton's avatar
Neil Turton committed
74 75

#
76
# Custom exports:
Neil Turton's avatar
Neil Turton committed
77 78
#
export: ${EXPORTS}
79
	@${ECHO} ${COMPONENT}: export complete
80

Neil Turton's avatar
Neil Turton committed
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
${EXP_HDR}.EnvNumbers: hdr.EnvNumbers
	${CP} hdr.EnvNumbers $@ ${CPFLAGS}

${EXP_HDR}.ModHand: hdr.ModHand
	${CP} hdr.ModHand $@ ${CPFLAGS}

${EXP_HDR}.PublicWS: hdr.PublicWS
	${CP} hdr.PublicWS $@ ${CPFLAGS}

${EXP_HDR}.RISCOS: hdr.RISCOS
	${CP} hdr.RISCOS $@ ${CPFLAGS}

${EXP_HDR}.VduExt: hdr.VduExt
	${CP} hdr.VduExt $@ ${CPFLAGS}

${EXP_HDR}.Variables: hdr.Variables
	${CP} hdr.Variables $@ ${CPFLAGS}
98
	
99 100 101
${EXP_HDR}.HALEntries: hdr.HALEntries
	${CP} hdr.HALEntries $@ ${CPFLAGS}
	
Kevin Bracey's avatar
Kevin Bracey committed
102 103 104
${EXP_HDR}.HALDevice: hdr.HALDevice
	${CP} hdr.HALDevice $@ ${CPFLAGS}
	
105 106 107
${EXP_HDR}.OSEntries: hdr.OSEntries
	${CP} hdr.OSEntries $@ ${CPFLAGS}
	
Jeffrey Lee's avatar
Jeffrey Lee committed
108 109 110
${EXP_HDR}.VideoDevice: hdr.VideoDevice
	${CP} hdr.VideoDevice $@ ${CPFLAGS}
	
111 112 113
${EXP_HDR}.GPIODevice: hdr.GPIODevice
	${CP} hdr.GPIODevice $@ ${CPFLAGS}
	
114 115 116
${EXP_HDR}.OSRSI6: hdr.OSRSI6
	${CP} hdr.OSRSI6 $@ ${CPFLAGS}
	
Jeffrey Lee's avatar
Jeffrey Lee committed
117 118
${EXP_HDR}.VIDCList: hdr.VIDCList
	${CP} hdr.VIDCList $@ ${CPFLAGS}
119

120 121
${C_EXP_HDR}.ModHand: hdr.ModHand
	${MKDIR} ${C_EXP_HDR}
122
	${HDR2H} hdr.ModHand $@
123

124 125
${C_EXP_HDR}.RISCOS: hdr.RISCOS
	${MKDIR} ${C_EXP_HDR}
126
	${HDR2H} hdr.RISCOS $@
Neil Turton's avatar
Neil Turton committed
127

Kevin Bracey's avatar
Kevin Bracey committed
128 129
${C_EXP_HDR}.HALEntries: hdr.HALEntries
	${MKDIR} ${C_EXP_HDR}
130
	${HDR2H} hdr.HALEntries $@
131

132 133
${C_EXP_HDR}.Variables: hdr.Variables
	${MKDIR} ${C_EXP_HDR}
134
	${HDR2H} hdr.Variables $@
135

136 137
${C_EXP_HDR}.OSRSI6: hdr.OSRSI6
	${MKDIR} ${C_EXP_HDR}
138
	${HDR2H} hdr.OSRSI6 $@
139

140 141
${C_EXP_HDR}.VduExt: hdr.VduExt
	${MKDIR} ${C_EXP_HDR}
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
	${HDR2H} hdr.VduExt $@

${C_EXP_HDR}.HALDevice: Global.h.HALDevice h.HALDevice
	${FAPPEND} $@ h.HALDevice Global.h.HALDevice

${C_EXP_HDR}.OSEntries: Global.h.OSEntries h.OSEntries
	${FAPPEND} $@ h.OSEntries Global.h.OSEntries

${C_EXP_HDR}.VIDCList: Global.h.VIDCList h.VIDCList
	${FAPPEND} $@ h.VIDCList Global.h.VIDCList

Global.h.HALDevice: hdr.HALDevice
	${MKDIR} Global.h
	${HDR2H} hdr.HALDevice $@

Global.h.OSEntries: hdr.OSEntries
	${MKDIR} Global.h
	${HDR2H} hdr.OSEntries $@

Global.h.VIDCList: hdr.VIDCList
	${MKDIR} Global.h
	${HDR2H} hdr.VIDCList $@

clean::
	${XWIPE} Global ${WFLAGS}
	${XWIPE} bin    ${WFLAGS}
Ben Avison's avatar
Ben Avison committed
168

Neil Turton's avatar
Neil Turton committed
169
# Dynamic dependencies: