4 VPATH
= @
srcdir@ @
srcdir@
/..
7 srcroot
= $(srcdir)/..
/..
8 objroot
= $(objdir
)/..
/..
11 exec_prefix = @
exec_prefix@
13 host_alias
= @host_alias@
14 target_alias
= @target_alias@
18 tooldir
= $(exec_prefix)/$(target_alias
)
21 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
22 INSTALL_DATA
= @INSTALL_DATA@
24 # Multilib support variables.
25 # TOP is used instead of MULTI{BUILD,SRC}TOP.
39 OBJCOPY
= $(subst ranlib
,objcopy
,$(RANLIB
))
45 CRT
= crt0.o crti.o crtn.o
47 # Here is all of the simulator stuff
48 SIM_SCRIPTS
= sim_high.
ld sim_rom.
ld
51 SIM_OBJS
= syscalls.o sim_malloc_start.o
53 # Here is stuff for building apps for GDB on the EVA board
54 EVA_APP_BSP
= libeva_app.a
55 EVA_APP_OBJS
= close.o fstat.o getpid.o kill.o lseek.o open.o \
56 stat.o unlink.o eva_app.o
57 EVA_APP_SCRIPTS
= eva_app.
ld
60 EVA_STUB_HEX
= eva_stub.hex
61 EVA_STUB
= eva_stub.elf
62 EVA_STUB_OBJS
= xstormy16_stub.o crt0_stub.o
64 # Host specific makefile fragment comes in here.
68 # build a test program for each target board. Just trying to get
69 # it to link is a good test, so we ignore all the errors for now.
71 # all: ${MON_CRT0} ${MON_BSP}
72 all: ${CRT} ${SIM_BSP} ${EVA_APP_BSP} ${EVA_STUB_HEX}
75 # here's where we build the board support packages for each target
77 ${SIM_BSP}: ${OBJS} ${SIM_OBJS}
78 ${AR} ${ARFLAGS} ${SIM_BSP} ${SIM_OBJS} ${OBJS}
81 ${EVA_APP_BSP}: ${OBJS} ${EVA_APP_OBJS}
82 ${AR} ${ARFLAGS} ${EVA_APP_BSP} ${EVA_APP_OBJS} ${OBJS}
83 ${RANLIB} ${EVA_APP_BSP}
85 ${EVA_STUB_HEX}: ${EVA_STUB}
86 ${OBJCOPY} -O ihex
$< $@
88 ${EVA_STUB}: ${EVA_STUB_OBJS} ${srcdir}/eva_stub.
ld
89 ${CC} -g
-Os
-nostartfiles
-T
${srcdir}/eva_stub.
ld ${EVA_STUB_OBJS} -o
$@
93 # here's where we build the test programs for each target
103 ${CC} ${CFLAGS_FOR_TARGET} -c
$<
106 rm -f a.out core
*.i
*.o
*-test *.srec
*.dis
*.x
*.hex
$(SIM_BSP
) $(EVA_APP_BSP
) $(EVA_STUB
}
108 distclean maintainer-clean
realclean: clean
109 rm -f Makefile config.status
*~
111 .PHONY
: install info install-info clean-info
113 set
-e
; for x in
${SIM_BSP} ${CRT} ${EVA_APP_BSP} ${EVA_STUB_HEX} ${EVA_STUB} ; do\
114 ${INSTALL_DATA} $$x ${tooldir}/lib
${MULTISUBDIR}/$$x; \
116 @for script in
${SCRIPTS} ${SIM_SCRIPTS} ${EVA_APP_SCRIPTS}; do\
117 ${INSTALL_DATA} ${srcdir}/$${script} ${tooldir}/lib
${MULTISUBDIR}/$${script}; \
126 Makefile
: Makefile.in config.status @host_makefile_frag_path@
127 $(SHELL
) config.status
129 config.status
: configure
130 $(SHELL
) config.status
--recheck