source: trunk/libs/newlib/src/libgloss/m68hc11/Makefile.in @ 546

Last change on this file since 546 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 4.7 KB
Line 
1# Copyright (c) 1995, 1996, 1997 Cygnus Support
2# Copyright (c) 1999, 2000, 2001, 2002 Stephane Carrez
3#
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.
13#
14# This currently works with Motorola's 68HC11 based target boards.
15# (should work with 68HC12 but not tested yet)
16
17DESTDIR =
18srcdir = @srcdir@
19objdir = .
20srcroot = $(srcdir)/../..
21objroot = $(objdir)/../..
22
23VPATH = $(srcdir) $(srcdir)/..
24
25prefix = @prefix@
26exec_prefix = @exec_prefix@
27
28host_alias = @host_alias@
29target_alias = @target_alias@
30program_transform_name = @program_transform_name@
31
32bindir = @bindir@
33libdir = @libdir@
34tooldir = $(exec_prefix)/$(target_alias)
35
36# Multilib support variables.
37# TOP is used instead of MULTI{BUILD,SRC}TOP.
38MULTIDIRS =
39MULTISUBDIR =
40MULTIDO = true
41MULTICLEAN = true
42
43INSTALL = @INSTALL@
44INSTALL_PROGRAM = @INSTALL_PROGRAM@
45INSTALL_DATA = @INSTALL_DATA@
46
47SHELL = /bin/sh
48
49CC = @CC@
50
51AS = @AS@
52AR = @AR@
53LD = @LD@
54RANLIB = @RANLIB@
55AR_FLAGS = qv
56
57OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
58        then echo ${objroot}/../binutils/objdump ; \
59        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
60OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
61        then echo ${objroot}/../binutils/objcopy ; \
62        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
63
64SCRIPTS = sim-valid
65
66OBJS =  syscalls.o close.o fstat.o getpid.o isatty.o kill.o \
67        lseek.o open.o print.o stat.o \
68        unlink.o sci-inout.o
69
70CFLAGS =
71
72CRT0 = crt0.o
73
74#
75# here's all the generic target stuff
76#
77GEN_LDFLAGS=    -L${srcdir}
78BSP=    libbcc.a
79
80# Host specific makefile fragment comes in here.
81@host_makefile_frag@
82
83#
84# build a test program for each target board. Just trying to get
85# it to link is a good test, so we ignore all the errors for now.
86#
87all: ${CRT0} ${BSP}
88
89#
90# here's where we build the board support packages for each target
91#
92${BSP}: $(OBJS)
93        ${AR} ${ARFLAGS} $@ $(OBJS)
94        ${RANLIB} $@
95
96
97syscalls.o: $(srcdir)/syscalls.c
98        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
99
100close.o: $(srcdir)/../close.c
101        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
102
103fstat.o: $(srcdir)/../fstat.c
104        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
105
106getpid.o: $(srcdir)/../getpid.c
107        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
108
109isatty.o: $(srcdir)/../isatty.c
110        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
111
112kill.o: $(srcdir)/../kill.c
113        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
114
115lseek.o: $(srcdir)/../lseek.c
116        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
117
118open.o: $(srcdir)/../open.c
119        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
120
121print.o: $(srcdir)/../print.c
122        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
123
124putnum.o: $(srcdir)/../putnum.c
125        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
126
127stat.o: $(srcdir)/../stat.c
128        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
129
130unlink.o: $(srcdir)/../unlink.c
131        $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
132
133
134.PHONY: install info dvi doc install-info clean-info
135
136clean mostlyclean:
137        rm -f a.out core *.[oais] *-test *.srec *.dis *.x syscall.h
138
139distclean maintainer-clean realclean: clean
140        rm -f Makefile config.status *~
141
142.PHONY: install info install-info clean-info
143install:        install-scripts
144        $(INSTALL_PROGRAM) $(CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(CRT0)
145        @for bsp in ${BSP}; do\
146         $(INSTALL_PROGRAM) $${bsp} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
147        done
148
149# Install the linker script in the correct place.
150install-scripts:
151        if [ -f ${objroot}/../binutils/objdump ] ; then \
152           objdump="${objroot}/../binutils/objdump"; \
153        else \
154           t='$(program_transform_name)'; \
155           objdump=`echo objdump | sed -e $$t`; \
156        fi ; \
157        name=`$$objdump -f $(CRT0) | sed '/^$$/d'`; \
158        case $$name in \
159        *elf32-m68hc11*) \
160           $(INSTALL_DATA) ${srcdir}/sim-valid-m68hc11.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/sim-valid.ld \
161           ;; \
162        *elf32-m68hc12*) \
163           $(INSTALL_DATA) ${srcdir}/sim-valid-m68hc12.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/sim-valid.ld \
164           ;; \
165        esac
166
167doc:
168info:
169install-info:
170clean-info:
171
172Makefile: Makefile.in config.status @host_makefile_frag_path@
173        $(SHELL) config.status
174
175config.status: configure
176        $(SHELL) config.status --recheck
Note: See TracBrowser for help on using the repository browser.