fixed more binutils issues (newer gcc/libc)
[zpugcc/jano.git] / toolchain / gcc / libgloss / zpu / Makefile.in
blobf183b0f501662812b411b6b48a25404f46e47767
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
9 # they apply.
12 srcdir = @srcdir@
13 objdir = .
14 srcroot = $(srcdir)/../..
15 objroot = $(objdir)/../..
17 VPATH = $(srcdir) $(srcdir)/..
19 prefix = @prefix@
20 exec_prefix = @exec_prefix@
22 host_alias = @host_alias@
23 target_alias = @target_alias@
24 program_transform_name = @program_transform_name@
26 bindir = @bindir@
27 libdir = @libdir@
28 tooldir = $(exec_prefix)/$(target_alias)
30 # Multilib support variables.
31 # TOP is used instead of MULTI{BUILD,SRC}TOP.
32 MULTIDIRS =
33 MULTISUBDIR =
34 MULTIDO = true
35 MULTICLEAN = true
37 INSTALL = @INSTALL@
38 INSTALL_PROGRAM = @INSTALL_PROGRAM@
39 INSTALL_DATA = @INSTALL_DATA@
41 SHELL = /bin/sh
43 CC = @CC@
45 AS = @AS@
46 AR = @AR@
47 LD = @LD@
48 RANLIB = @RANLIB@
49 AR_FLAGS = qv
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`
58 SCRIPTS =
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
66 CRT0 = crt0.o
68 IO = crt_io.o
76 # here's all the generic target stuff
78 GEN_LDFLAGS= -L${srcdir}
79 BSP= libbcc.a
81 # Host specific makefile fragment comes in here.
82 @host_makefile_frag@
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
93 ${BSP}: $(OBJS)
94 ${AR} ${ARFLAGS} $@ $(OBJS)
95 ${RANLIB} $@
101 .PHONY: install info dvi doc install-info clean-info
103 clean mostlyclean:
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}; \
115 done
117 # Install the linker script in the correct place.
118 install-scripts:
119 if [ -f ${objroot}/../binutils/objdump ] ; then \
120 objdump="${objroot}/../binutils/objdump"; \
121 else \
122 t='$(program_transform_name)'; \
123 objdump=`echo objdump | sed -e $$t`; \
124 fi ; \
125 name=`$$objdump -f $(CRT0) | sed '/^$$/d'`;
126 name=`$$objdump -f $(IO) | sed '/^$$/d'`;
128 doc:
129 info:
130 install-info:
131 clean-info:
133 Makefile: Makefile.in config.status @host_makefile_frag_path@
134 $(SHELL) config.status
136 config.status: configure
137 $(SHELL) config.status --recheck
139 .c.o:
140 $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $(CFLAGS) -fomit-frame-pointer -ffunction-sections -fdata-sections $<