fixed more binutils issues (newer gcc/libc)
[zpugcc/jano.git] / toolchain / gcc / libgloss / m68hc11 / Makefile.in
blob32c6608f357f5d98f497716fc78bfafa2d5b89f7
1 # Copyright (c) 1995, 1996, 1997 Cygnus Support
2 # Copyright (c) 1999, 2000, 2001, 2002 Stephane Carrez
4 # The authors hereby grant permission to use, copy, modify, distribute,
5 # and license this software and its documentation for any purpose, provided
6 # that existing copyright notices are retained in all copies and that this
7 # notice is included verbatim in any distributions. No written agreement,
8 # license, or royalty fee is required for any of the authorized uses.
9 # Modifications to this software may be copyrighted by their authors
10 # and need not follow the licensing terms described here, provided that
11 # the new terms are clearly indicated on the first page of each file where
12 # they apply.
14 # This currently works with Motorola's 68HC11 based target boards.
15 # (should work with 68HC12 but not tested yet)
17 srcdir = @srcdir@
18 objdir = .
19 srcroot = $(srcdir)/../..
20 objroot = $(objdir)/../..
22 VPATH = $(srcdir) $(srcdir)/..
24 prefix = @prefix@
25 exec_prefix = @exec_prefix@
27 host_alias = @host_alias@
28 target_alias = @target_alias@
29 program_transform_name = @program_transform_name@
31 bindir = @bindir@
32 libdir = @libdir@
33 tooldir = $(exec_prefix)/$(target_alias)
35 # Multilib support variables.
36 # TOP is used instead of MULTI{BUILD,SRC}TOP.
37 MULTIDIRS =
38 MULTISUBDIR =
39 MULTIDO = true
40 MULTICLEAN = true
42 INSTALL = @INSTALL@
43 INSTALL_PROGRAM = @INSTALL_PROGRAM@
44 INSTALL_DATA = @INSTALL_DATA@
46 SHELL = /bin/sh
48 CC = @CC@
50 AS = @AS@
51 AR = @AR@
52 LD = @LD@
53 RANLIB = @RANLIB@
54 AR_FLAGS = qv
56 OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
57 then echo ${objroot}/../binutils/objdump ; \
58 else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
59 OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
60 then echo ${objroot}/../binutils/objcopy ; \
61 else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
63 SCRIPTS = sim-valid
65 OBJS = syscalls.o close.o fstat.o getpid.o isatty.o kill.o \
66 lseek.o open.o print.o stat.o \
67 unlink.o sci-inout.o
69 CFLAGS =
71 CRT0 = crt0.o
74 # here's all the generic target stuff
76 GEN_LDFLAGS= -L${srcdir}
77 BSP= libbcc.a
79 # Host specific makefile fragment comes in here.
80 @host_makefile_frag@
83 # build a test program for each target board. Just trying to get
84 # it to link is a good test, so we ignore all the errors for now.
86 all: ${CRT0} ${BSP}
89 # here's where we build the board support packages for each target
91 ${BSP}: $(OBJS)
92 ${AR} ${ARFLAGS} $@ $(OBJS)
93 ${RANLIB} $@
96 syscalls.o: $(srcdir)/syscalls.c
97 $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
99 close.o: $(srcdir)/../close.c
100 $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
102 fstat.o: $(srcdir)/../fstat.c
103 $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
105 getpid.o: $(srcdir)/../getpid.c
106 $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
108 isatty.o: $(srcdir)/../isatty.c
109 $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
111 kill.o: $(srcdir)/../kill.c
112 $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
114 lseek.o: $(srcdir)/../lseek.c
115 $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
117 open.o: $(srcdir)/../open.c
118 $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
120 print.o: $(srcdir)/../print.c
121 $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
123 putnum.o: $(srcdir)/../putnum.c
124 $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
126 stat.o: $(srcdir)/../stat.c
127 $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
129 unlink.o: $(srcdir)/../unlink.c
130 $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
133 .PHONY: install info dvi doc install-info clean-info
135 clean mostlyclean:
136 rm -f a.out core *.[oais] *-test *.srec *.dis *.x syscall.h
138 distclean maintainer-clean realclean: clean
139 rm -f Makefile config.status *~
141 .PHONY: install info install-info clean-info
142 install: install-scripts
143 $(INSTALL_PROGRAM) $(CRT0) $(tooldir)/lib${MULTISUBDIR}/$(CRT0)
144 @for bsp in ${BSP}; do\
145 $(INSTALL_PROGRAM) $${bsp} $(tooldir)/lib${MULTISUBDIR}; \
146 done
148 # Install the linker script in the correct place.
149 install-scripts:
150 if [ -f ${objroot}/../binutils/objdump ] ; then \
151 objdump="${objroot}/../binutils/objdump"; \
152 else \
153 t='$(program_transform_name)'; \
154 objdump=`echo objdump | sed -e $$t`; \
155 fi ; \
156 name=`$$objdump -f $(CRT0) | sed '/^$$/d'`; \
157 case $$name in \
158 *elf32-m68hc11*) \
159 $(INSTALL_DATA) ${srcdir}/sim-valid-m68hc11.ld $(tooldir)/lib${MULTISUBDIR}/sim-valid.ld \
160 ;; \
161 *elf32-m68hc12*) \
162 $(INSTALL_DATA) ${srcdir}/sim-valid-m68hc12.ld $(tooldir)/lib${MULTISUBDIR}/sim-valid.ld \
163 ;; \
164 esac
166 doc:
167 info:
168 install-info:
169 clean-info:
171 Makefile: Makefile.in config.status @host_makefile_frag_path@
172 $(SHELL) config.status
174 config.status: configure
175 $(SHELL) config.status --recheck