1 # Copyright (c) 1998 Cygnus Support
3 # The authors hereby grant permission to use, copy, modify, distribute,
4 # and license this software and its documentation for any purpose, provided
5 # that existing copyright notices are retained in all copies and that this
6 # notice is included verbatim in any distributions. No written agreement,
7 # license, or royalty fee is required for any of the authorized uses.
8 # Modifications to this software may be copyrighted by their authors
9 # and need not follow the licensing terms described here, provided that
10 # the new terms are clearly indicated on the first page of each file where
16 srcroot
= $(srcdir)/..
/..
17 objroot
= $(objdir
)/..
/..
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@
46 AS
= `if [ -f ${objroot}/../gas/as.new ] ; \
47 then echo ${objroot}/../gas/as.new ; \
53 LD
= `if [ -f ${objroot}/../ld/ld.new ] ; \
54 then echo ${objroot}/../ld/ld.new ; \
59 OBJDUMP
= `if [ -f ${objroot}/../binutils/objdump ] ; \
60 then echo ${objroot}/../binutils/objdump ; \
61 else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
62 OBJCOPY
= `if [ -f ${objroot}/../binutils/objcopy ] ; \
63 then echo ${objroot}/../binutils/objcopy ; \
64 else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
67 OBJS
= close.o environ.o errno.o execve.o fork.o fstat.o getpid.o gettod.o \
68 isatty.o kill.o link.o lseek.o open.o read.o sbrk.o stat.o \
69 times.o unlink.o wait.o write.o
71 # Object files specific to particular targets.
74 GCC_LDFLAGS
= `if [ -d ${objroot}/../gcc ] ; \
75 then echo -L${objroot}/../gcc ; fi`
79 NEWLIB_CFLAGS
= `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi`
80 NEWLIB_LDFLAGS
= `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi`
82 INCLUDES
= -I.
-I
$(srcdir)/..
83 # Note that when building the library, ${MULTILIB} is not the way multilib
84 # options are passed; they're passed in $(CFLAGS).
85 CFLAGS_FOR_TARGET
= ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
86 LDFLAGS_FOR_TARGET
= ${MULTILIB} ${NEWLIB_LDFLAGS}
90 $(CC
) $(CFLAGS_FOR_TARGET
) -O2
$(INCLUDES
) -c
$(CFLAGS
) $<
93 $(CC
) $(CFLAGS_FOR_TARGET
) -O2
$(INCLUDES
) -c
$(CFLAGS
) $<
95 $(AS
) $(ASFLAGS_FOR_TARGET
) $(INCLUDES
) $(ASFLAGS
) -o
$*.o
$<
98 # GCC knows to run the preprocessor on .S files before it assembles them.
101 $(CC
) $(CFLAGS_FOR_TARGET
) $(INCLUDES
) $(CFLAGS
) -c
$<
104 # this is a bogus target that'll produce an assembler from the
105 # C source with the right compiler options. this is so we can
106 # track down code generation or debug symbol bugs.
109 $(CC
) $(CFLAGS_FOR_TARGET
) -S
$(INCLUDES
) $(CFLAGS
) $<
114 # here's where we build the library for each target
117 libnosys.a
: $(EVALOBJS
)
118 ${AR} ${ARFLAGS} $@
$(EVALOBJS
)
124 rm -f
$(OUTPUTS
) *.i
*~
*.o
*-test *.srec
*.dis
*.map
*.x
126 distclean maintainer-clean
realclean: clean
127 rm -f Makefile config.status
$(OUTPUTS
)
129 .PHONY
: install info install-info clean-info
131 @for outputs in
${OUTPUTS}; do\
132 mkdir
-p
$(tooldir
)/lib
${MULTISUBDIR}; \
133 $(INSTALL_PROGRAM
) $${outputs} $(tooldir
)/lib
${MULTISUBDIR}; \
140 Makefile
: Makefile.in config.status @host_makefile_frag_path@
141 $(SHELL
) config.status
143 config.status
: configure
144 $(SHELL
) config.status
--recheck