| [444] | 1 | # | 
|---|
|  | 2 | # | 
|---|
|  | 3 | DESTDIR = | 
|---|
|  | 4 | VPATH = @srcdir@ @srcdir@/.. | 
|---|
|  | 5 | srcdir = @srcdir@ | 
|---|
|  | 6 | objdir = . | 
|---|
|  | 7 | srcroot = $(srcdir)/../.. | 
|---|
|  | 8 | objroot = $(objdir)/../.. | 
|---|
|  | 9 |  | 
|---|
|  | 10 | prefix = @prefix@ | 
|---|
|  | 11 | exec_prefix = @exec_prefix@ | 
|---|
|  | 12 |  | 
|---|
|  | 13 | host_alias = @host_alias@ | 
|---|
|  | 14 | target_alias = @target_alias@ | 
|---|
|  | 15 |  | 
|---|
|  | 16 | bindir = @bindir@ | 
|---|
|  | 17 | libdir = @libdir@ | 
|---|
|  | 18 | tooldir = $(exec_prefix)/$(target_alias) | 
|---|
|  | 19 |  | 
|---|
|  | 20 | objtype = @objtype@ | 
|---|
|  | 21 |  | 
|---|
|  | 22 | INSTALL = @INSTALL@ | 
|---|
|  | 23 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | 
|---|
|  | 24 | INSTALL_DATA = @INSTALL_DATA@ | 
|---|
|  | 25 |  | 
|---|
|  | 26 | # Multilib support variables. | 
|---|
|  | 27 | # TOP is used instead of MULTI{BUILD,SRC}TOP. | 
|---|
|  | 28 | MULTISRCTOP = | 
|---|
|  | 29 | MULTIBUILDTOP = | 
|---|
|  | 30 | MULTIDIRS = | 
|---|
|  | 31 | MULTISUBDIR = | 
|---|
|  | 32 | MULTILIBNAME = | 
|---|
|  | 33 | MULTIDO = true | 
|---|
|  | 34 | MULTICLEAN = true | 
|---|
|  | 35 | MULTI_FLAGS_FOR_TARGET = MULTI_DEFAULT_FLAGS | 
|---|
|  | 36 | MULTI_DEFAULT_FLAGS = -DSEMIHOST_V2 | 
|---|
|  | 37 |  | 
|---|
|  | 38 | MULTIDIRS += semihv2m | 
|---|
|  | 39 | MULTIDIR_semihv2m_FLAGS = $(MULTI_DEFAULT_FLAGS) -DSEMIHOST_V2_MIXED_MODE | 
|---|
|  | 40 | MULTIDIR_semihv2m_NAME = -v2m | 
|---|
|  | 41 |  | 
|---|
|  | 42 | SHELL = /bin/sh | 
|---|
|  | 43 |  | 
|---|
|  | 44 | CC = @CC@ | 
|---|
|  | 45 |  | 
|---|
|  | 46 | AS = @AS@ | 
|---|
|  | 47 | AR = @AR@ | 
|---|
|  | 48 | LD = @LD@ | 
|---|
|  | 49 | RANLIB = @RANLIB@ | 
|---|
|  | 50 |  | 
|---|
|  | 51 | SUBDIRS = @subdirs@ | 
|---|
|  | 52 |  | 
|---|
|  | 53 | OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \ | 
|---|
|  | 54 | then echo ${objroot}/../binutils/objdump ; \ | 
|---|
|  | 55 | else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi` | 
|---|
|  | 56 | OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \ | 
|---|
|  | 57 | then echo ${objroot}/../binutils/objcopy ; \ | 
|---|
|  | 58 | else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi` | 
|---|
|  | 59 |  | 
|---|
|  | 60 | @BUILD_CRT0_TRUE@CRT0           = crt0.o | 
|---|
|  | 61 | @BUILD_CRT0_TRUE@CRT0_INSTALL   = install-crt0 | 
|---|
|  | 62 | @BUILD_CRT0_FALSE@CRT0          = | 
|---|
|  | 63 | @BUILD_CRT0_FALSE@CRT0_INSTALL  = | 
|---|
|  | 64 |  | 
|---|
|  | 65 | NANO_SCRIPTS=nano.specs | 
|---|
|  | 66 | NANO_INSTALL=install-nano | 
|---|
|  | 67 |  | 
|---|
|  | 68 | LINUX_CRT0    = linux-crt0.o | 
|---|
|  | 69 | LINUX_BSP     = libgloss-linux.a | 
|---|
|  | 70 | LINUX_OBJS    = linux-syscalls0.o linux-syscalls1.o | 
|---|
|  | 71 | LINUX_SCRIPTS = linux.specs | 
|---|
|  | 72 | LINUX_INSTALL = install-linux | 
|---|
|  | 73 |  | 
|---|
|  | 74 | REDBOOT_CRT0    = redboot-crt0.o | 
|---|
|  | 75 | REDBOOT_OBJS    = redboot-syscalls.o | 
|---|
|  | 76 | REDBOOT_SCRIPTS = redboot.ld redboot.specs | 
|---|
|  | 77 | REDBOOT_INSTALL = install-redboot | 
|---|
|  | 78 |  | 
|---|
|  | 79 | RDPMON_CRT0     = rdpmon-crt0.o | 
|---|
|  | 80 | RDPMON_BSP      = librdpmon.a | 
|---|
|  | 81 | RDPMON_OBJS     = ftruncate.o libcfunc.o syscalls.o trap.o truncate.o _exit.o _kill.o | 
|---|
|  | 82 | RDPMON_SCRIPTS  = rdpmon.specs | 
|---|
|  | 83 | RDPMON_INSTALL  = install-rdpmon | 
|---|
|  | 84 |  | 
|---|
|  | 85 | RDIMON_CRT0     = rdimon-crt0${${MULTILIBNAME}}.o | 
|---|
|  | 86 | RDIMON_BSP      = librdimon${${MULTILIBNAME}}.a | 
|---|
|  | 87 | RDIMON_OBJS     = $(patsubst %,rdimon-%,$(RDPMON_OBJS)) | 
|---|
|  | 88 | RDIMON_SCRIPTS  = rdimon${${MULTILIBNAME}}.specs \ | 
|---|
|  | 89 | aprofile-validation${${MULTILIBNAME}}.specs \ | 
|---|
|  | 90 | aprofile-ve${${MULTILIBNAME}}.specs | 
|---|
|  | 91 | RDIMON_INSTALL  = install-rdimon | 
|---|
|  | 92 |  | 
|---|
|  | 93 | CFLAGS          = -g | 
|---|
|  | 94 |  | 
|---|
|  | 95 | # Here is all of the eval board stuff | 
|---|
|  | 96 | PID_SCRIPTS     = pid.specs | 
|---|
|  | 97 | PID_INSTALL     = install-pid | 
|---|
|  | 98 |  | 
|---|
|  | 99 | IQ80310_SCRIPTS = iq80310.specs | 
|---|
|  | 100 | IQ80310_INSTALL = install-iq80310 | 
|---|
|  | 101 |  | 
|---|
|  | 102 |  | 
|---|
|  | 103 | # Host specific makefile fragment comes in here. | 
|---|
|  | 104 | @host_makefile_frag@ | 
|---|
|  | 105 |  | 
|---|
|  | 106 | INCLUDES += `if [ -d ${objroot}/newlib ]; then echo -I$(srcroot)/newlib/libc/machine/arm; fi` | 
|---|
|  | 107 |  | 
|---|
|  | 108 | # | 
|---|
|  | 109 | # build a test program for each target board. Just trying to get | 
|---|
|  | 110 | # it to link is a good test, so we ignore all the errors for now. | 
|---|
|  | 111 | # | 
|---|
|  | 112 | all: ${CRT0} ${LINUX_CRT0} ${LINUX_BSP} ${REDBOOT_CRT0} ${REDBOOT_OBJS} ${RDPMON_CRT0} ${RDPMON_BSP} ${RDIMON_CRT0} ${RDIMON_BSP} | 
|---|
|  | 113 | @rootpre=`pwd`/; export rootpre; \ | 
|---|
|  | 114 | srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ | 
|---|
|  | 115 | for dir in .. ${SUBDIRS}; do \ | 
|---|
|  | 116 | if [ x$$dir != x.. ]; then \ | 
|---|
|  | 117 | if [ -d $$dir ]; then \ | 
|---|
|  | 118 | (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \ | 
|---|
|  | 119 | else true; fi; \ | 
|---|
|  | 120 | else true; fi; \ | 
|---|
|  | 121 | done | 
|---|
|  | 122 | $(MAKE) $(AM_MAKEFLAGS) all-recursive | 
|---|
|  | 123 |  | 
|---|
|  | 124 | # | 
|---|
|  | 125 | # here's where we build the test programs for each target | 
|---|
|  | 126 | # | 
|---|
|  | 127 | .PHONY: test | 
|---|
|  | 128 | test: | 
|---|
|  | 129 |  | 
|---|
|  | 130 | # | 
|---|
|  | 131 | crt0.o: crt0.S | 
|---|
|  | 132 | redboot-crt0.o: redboot-crt0.S | 
|---|
|  | 133 | redboot-syscalls.o: redboot-syscalls.c $(srcdir)/../syscall.h | 
|---|
|  | 134 | $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -o $@ -c $< | 
|---|
|  | 135 |  | 
|---|
|  | 136 | rdpmon-crt0.o: crt0.S | 
|---|
|  | 137 | $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDP_MONITOR -o $@ -c $< | 
|---|
|  | 138 |  | 
|---|
|  | 139 | rdimon-crt0${${MULTILIBNAME}}.o: crt0.S | 
|---|
|  | 140 | $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< | 
|---|
|  | 141 |  | 
|---|
|  | 142 | rdimon-ftruncate.o: ftruncate.c | 
|---|
|  | 143 | $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< | 
|---|
|  | 144 |  | 
|---|
|  | 145 | rdimon-trap.o: trap.S | 
|---|
|  | 146 | $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< | 
|---|
|  | 147 |  | 
|---|
|  | 148 | rdimon-truncate.o: truncate.c | 
|---|
|  | 149 | $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< | 
|---|
|  | 150 |  | 
|---|
|  | 151 | rdimon-_exit.o: _exit.c | 
|---|
|  | 152 | $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< | 
|---|
|  | 153 |  | 
|---|
|  | 154 | rdimon-_kill.o: _kill.c | 
|---|
|  | 155 | $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< | 
|---|
|  | 156 |  | 
|---|
|  | 157 | rdimon-syscalls.o: syscalls.c | 
|---|
|  | 158 | $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< | 
|---|
|  | 159 |  | 
|---|
|  | 160 | rdimon-libcfunc.o: libcfunc.c | 
|---|
|  | 161 | $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $< | 
|---|
|  | 162 |  | 
|---|
|  | 163 | $(LINUX_BSP): $(LINUX_OBJS) | 
|---|
|  | 164 | ${AR} ${ARFLAGS} $@ $^ | 
|---|
|  | 165 | ${RANLIB} $@ | 
|---|
|  | 166 |  | 
|---|
|  | 167 | $(RDPMON_BSP): $(RDPMON_OBJS) | 
|---|
|  | 168 | ${AR} ${ARFLAGS} $@ $^ | 
|---|
|  | 169 | ${RANLIB} $@ | 
|---|
|  | 170 |  | 
|---|
|  | 171 | $(RDIMON_BSP): $(RDIMON_OBJS) | 
|---|
|  | 172 | ${AR} ${ARFLAGS} $@ $^ | 
|---|
|  | 173 | ${RANLIB} $@ | 
|---|
|  | 174 |  | 
|---|
|  | 175 | # Multilib support. | 
|---|
|  | 176 | .PHONY:  multi-do all-multi clean-multi install-multi | 
|---|
|  | 177 |  | 
|---|
|  | 178 | all-recursive: all-multi | 
|---|
|  | 179 | clean-recursive: clean-multi | 
|---|
|  | 180 | install-recursive: install-multi | 
|---|
|  | 181 |  | 
|---|
|  | 182 | # The $(MAKE) comments below are to enable parallel building. | 
|---|
|  | 183 | all-multi: | 
|---|
|  | 184 | $(MAKE) $(AM_MAKEFLAGS) DO=all multi-do | 
|---|
|  | 185 |  | 
|---|
|  | 186 | clean-multi: | 
|---|
|  | 187 | $(MAKE) $(AM_MAKEFLAGS) DO=clean multi-do | 
|---|
|  | 188 |  | 
|---|
|  | 189 | install-multi: | 
|---|
|  | 190 | $(MAKE) $(AM_MAKEFLAGS) DO=install multi-do | 
|---|
|  | 191 |  | 
|---|
|  | 192 | clean mostlyclean: | 
|---|
|  | 193 | rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP) $(IQ80310_BSP) | 
|---|
|  | 194 | @rootpre=`pwd`/; export rootpre; \ | 
|---|
|  | 195 | srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ | 
|---|
|  | 196 | for dir in .. ${SUBDIRS}; do \ | 
|---|
|  | 197 | if [ x$$dir != x.. ]; then \ | 
|---|
|  | 198 | if [ -d $$dir ]; then \ | 
|---|
|  | 199 | (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) clean); \ | 
|---|
|  | 200 | else true; fi; \ | 
|---|
|  | 201 | else true; fi; \ | 
|---|
|  | 202 | done | 
|---|
|  | 203 | $(MAKE) $(AM_MAKEFLAGS) clean-recursive | 
|---|
|  | 204 |  | 
|---|
|  | 205 | distclean maintainer-clean realclean: clean | 
|---|
|  | 206 | rm -f Makefile config.status *~ | 
|---|
|  | 207 |  | 
|---|
|  | 208 | .PHONY: install info install-info clean-info | 
|---|
|  | 209 | install: ${CRT0_INSTALL} ${LINUX_INSTALL} ${REDBOOT_INSTALL} ${RDPMON_INSTALL} ${RDIMON_INSTALL} ${IQ80310_INSTALL}  ${PID_INSTALL} ${NANO_INSTALL} | 
|---|
|  | 210 | @rootpre=`pwd`/; export rootpre; \ | 
|---|
|  | 211 | srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \ | 
|---|
|  | 212 | for dir in .. ${SUBDIRS}; do \ | 
|---|
|  | 213 | if [ x$$dir != x.. ]; then \ | 
|---|
|  | 214 | if [ -d $$dir ]; then \ | 
|---|
|  | 215 | (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install); \ | 
|---|
|  | 216 | else true; fi; \ | 
|---|
|  | 217 | else true; fi; \ | 
|---|
|  | 218 | done | 
|---|
|  | 219 | $(MAKE) $(AM_MAKEFLAGS) install-recursive | 
|---|
|  | 220 |  | 
|---|
|  | 221 | install-nano: | 
|---|
|  | 222 | set -e; for x in ${NANO_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 
|---|
|  | 223 |  | 
|---|
|  | 224 | install-crt0: | 
|---|
|  | 225 | ${INSTALL_DATA} ${CRT0} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x | 
|---|
|  | 226 |  | 
|---|
|  | 227 | install-linux: | 
|---|
|  | 228 | set -e; for x in ${LINUX_CRT0} ${LINUX_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 
|---|
|  | 229 | set -e; for x in ${LINUX_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 
|---|
|  | 230 |  | 
|---|
|  | 231 | install-redboot: | 
|---|
|  | 232 | set -e; for x in ${REDBOOT_CRT0} ${REDBOOT_OBJS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 
|---|
|  | 233 | set -e; for x in ${REDBOOT_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 
|---|
|  | 234 |  | 
|---|
|  | 235 | install-rdpmon: | 
|---|
|  | 236 | set -e; for x in ${RDPMON_CRT0} ${RDPMON_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 
|---|
|  | 237 | set -e; for x in ${RDPMON_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 
|---|
|  | 238 |  | 
|---|
|  | 239 | install-rdimon: | 
|---|
|  | 240 | set -e; for x in ${RDIMON_CRT0} ${RDIMON_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 
|---|
|  | 241 | set -e; for x in ${RDIMON_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 
|---|
|  | 242 |  | 
|---|
|  | 243 |  | 
|---|
|  | 244 | install-pid: | 
|---|
|  | 245 | set -e; for x in ${PID_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 
|---|
|  | 246 |  | 
|---|
|  | 247 | install-iq80310: | 
|---|
|  | 248 | set -e; for x in ${IQ80310_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done | 
|---|
|  | 249 |  | 
|---|
|  | 250 |  | 
|---|
|  | 251 | doc: | 
|---|
|  | 252 | info: | 
|---|
|  | 253 | install-info: | 
|---|
|  | 254 | clean-info: | 
|---|
|  | 255 |  | 
|---|
|  | 256 | Makefile: Makefile.in config.status @host_makefile_frag_path@ | 
|---|
|  | 257 | $(SHELL) config.status | 
|---|
|  | 258 |  | 
|---|
|  | 259 | config.status: configure | 
|---|
|  | 260 | $(SHELL) config.status --recheck | 
|---|
|  | 261 |  | 
|---|
|  | 262 | include $(srcdir)/../multi-build.in | 
|---|