1 # The authors hereby grant permission to use, copy, modify, distribute,
2 # and license this software and its documentation for any purpose, provided
3 # that existing copyright notices are retained in all copies and that this
4 # notice is included verbatim in any distributions. No written agreement,
5 # license, or royalty fee is required for any of the authorized uses.
6 # Modifications to this software may be copyrighted by their authors
7 # and need not follow the licensing terms described here, provided that
8 # the new terms are clearly indicated on the first page of each file where
14 srcroot
= $(srcdir)/..
/..
15 objroot
= $(objdir
)/..
/..
17 VPATH
= $(srcdir) $(srcdir)/..
20 exec_prefix = @
exec_prefix@
22 host_alias
= @host_alias@
23 target_alias
= @target_alias@
24 program_transform_name
= @program_transform_name@
28 tooldir
= $(exec_prefix)/$(target_alias
)
30 # Multilib support variables.
31 # TOP is used instead of MULTI{BUILD,SRC}TOP.
38 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
39 INSTALL_DATA
= @INSTALL_DATA@
51 OBJDUMP
= `if [ -f ${objroot}/../binutils/objdump ] ; \
52 then echo ${objroot}/../binutils/objdump ; \
53 else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
54 OBJCOPY
= `if [ -f ${objroot}/../binutils/objcopy ] ; \
55 then echo ${objroot}/../binutils/objcopy ; \
56 else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
60 OBJS
= getpid.o kill.o
print.o sbrk.o syscalls.o time.o fork.o sleep.o
62 CFLAGS_FOR_TARGET
= -fomit-frame-pointer
-Os
64 CFLAGS
= -fomit-frame-pointer
-Os
76 # here's all the generic target stuff
78 GEN_LDFLAGS
= -L
${srcdir}
81 # Host specific makefile fragment comes in here.
85 # build a test program for each target board. Just trying to get
86 # it to link is a good test, so we ignore all the errors for now.
88 all: ${CRT0} ${IO} ${BSP}
91 # here's where we build the board support packages for each target
94 ${AR} ${ARFLAGS} $@
$(OBJS
)
101 .PHONY
: install info dvi doc install-info clean-info
104 rm -f a.out core
*.
[oais
] *-test *.srec
*.dis
*.x syscall.h
106 distclean maintainer-clean
realclean: clean
107 rm -f Makefile config.status
*~
109 .PHONY
: install info install-info clean-info
110 install: install-scripts
111 $(INSTALL_PROGRAM
) $(CRT0
) $(tooldir
)/lib
${MULTISUBDIR}/$(CRT0
)
112 $(INSTALL_PROGRAM
) $(IO
) $(tooldir
)/lib
${MULTISUBDIR}/$(IO
)
113 @for bsp in
${BSP}; do\
114 $(INSTALL_PROGRAM
) $${bsp} $(tooldir
)/lib
${MULTISUBDIR}; \
117 # Install the linker script in the correct place.
119 if
[ -f
${objroot}/..
/binutils
/objdump
] ; then \
120 objdump
="${objroot}/../binutils/objdump"; \
122 t
='$(program_transform_name)'; \
123 objdump
=`echo objdump | sed -e $$t`; \
125 name
=`$$objdump -f $(CRT0) | sed '/^$$/d'`;
126 name
=`$$objdump -f $(IO) | sed '/^$$/d'`;
133 Makefile
: Makefile.in config.status @host_makefile_frag_path@
134 $(SHELL
) config.status
136 config.status
: configure
137 $(SHELL
) config.status
--recheck
140 $(CC
) $(CFLAGS_FOR_TARGET
) $(INCLUDES
) -c
$(CFLAGS
) -fomit-frame-pointer
-ffunction-sections
-fdata-sections
$<