source: trunk/libs/newlib/src/libgloss/arm/Makefile.in @ 630

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

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

File size: 7.9 KB
RevLine 
[444]1#
2#
3DESTDIR =
4VPATH = @srcdir@ @srcdir@/..
5srcdir = @srcdir@
6objdir = .
7srcroot = $(srcdir)/../..
8objroot = $(objdir)/../..
9
10prefix = @prefix@
11exec_prefix = @exec_prefix@
12
13host_alias = @host_alias@
14target_alias = @target_alias@
15
16bindir = @bindir@
17libdir = @libdir@
18tooldir = $(exec_prefix)/$(target_alias)
19
20objtype = @objtype@
21
22INSTALL = @INSTALL@
23INSTALL_PROGRAM = @INSTALL_PROGRAM@
24INSTALL_DATA = @INSTALL_DATA@
25
26# Multilib support variables.
27# TOP is used instead of MULTI{BUILD,SRC}TOP.
28MULTISRCTOP =
29MULTIBUILDTOP =
30MULTIDIRS =
31MULTISUBDIR =
32MULTILIBNAME =
33MULTIDO = true
34MULTICLEAN = true
35MULTI_FLAGS_FOR_TARGET = MULTI_DEFAULT_FLAGS
36MULTI_DEFAULT_FLAGS = -DSEMIHOST_V2
37
38MULTIDIRS += semihv2m
39MULTIDIR_semihv2m_FLAGS = $(MULTI_DEFAULT_FLAGS) -DSEMIHOST_V2_MIXED_MODE
40MULTIDIR_semihv2m_NAME = -v2m
41
42SHELL = /bin/sh
43
44CC = @CC@
45
46AS = @AS@
47AR = @AR@
48LD = @LD@
49RANLIB = @RANLIB@
50
51SUBDIRS = @subdirs@
52
53OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
54        then echo ${objroot}/../binutils/objdump ; \
55        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
56OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
57        then echo ${objroot}/../binutils/objcopy ; \
58        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
59
60@BUILD_CRT0_TRUE@CRT0           = crt0.o
61@BUILD_CRT0_TRUE@CRT0_INSTALL   = install-crt0
62@BUILD_CRT0_FALSE@CRT0          =
63@BUILD_CRT0_FALSE@CRT0_INSTALL  =
64
65NANO_SCRIPTS=nano.specs
66NANO_INSTALL=install-nano
67
68LINUX_CRT0    = linux-crt0.o
69LINUX_BSP     = libgloss-linux.a
70LINUX_OBJS    = linux-syscalls0.o linux-syscalls1.o
71LINUX_SCRIPTS = linux.specs
72LINUX_INSTALL = install-linux
73
74REDBOOT_CRT0    = redboot-crt0.o
75REDBOOT_OBJS    = redboot-syscalls.o
76REDBOOT_SCRIPTS = redboot.ld redboot.specs
77REDBOOT_INSTALL = install-redboot
78
79RDPMON_CRT0     = rdpmon-crt0.o
80RDPMON_BSP      = librdpmon.a
81RDPMON_OBJS     = ftruncate.o libcfunc.o syscalls.o trap.o truncate.o _exit.o _kill.o
82RDPMON_SCRIPTS  = rdpmon.specs
83RDPMON_INSTALL  = install-rdpmon
84
85RDIMON_CRT0     = rdimon-crt0${${MULTILIBNAME}}.o
86RDIMON_BSP      = librdimon${${MULTILIBNAME}}.a
87RDIMON_OBJS     = $(patsubst %,rdimon-%,$(RDPMON_OBJS))
88RDIMON_SCRIPTS  = rdimon${${MULTILIBNAME}}.specs \
89                  aprofile-validation${${MULTILIBNAME}}.specs \
90                  aprofile-ve${${MULTILIBNAME}}.specs
91RDIMON_INSTALL  = install-rdimon
92
93CFLAGS          = -g
94
95# Here is all of the eval board stuff
96PID_SCRIPTS     = pid.specs
97PID_INSTALL     = install-pid
98
99IQ80310_SCRIPTS = iq80310.specs
100IQ80310_INSTALL = install-iq80310
101
102
103# Host specific makefile fragment comes in here.
104@host_makefile_frag@
105
106INCLUDES += `if [ -d ${objroot}/newlib ]; then echo -I$(srcroot)/newlib/libc/machine/arm; fi`
107
108#
109# build a test program for each target board. Just trying to get
110# it to link is a good test, so we ignore all the errors for now.
111#
112all: ${CRT0} ${LINUX_CRT0} ${LINUX_BSP} ${REDBOOT_CRT0} ${REDBOOT_OBJS} ${RDPMON_CRT0} ${RDPMON_BSP} ${RDIMON_CRT0} ${RDIMON_BSP}
113        @rootpre=`pwd`/; export rootpre; \
114        srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
115        for dir in .. ${SUBDIRS}; do \
116          if [ x$$dir != x.. ]; then \
117            if [ -d $$dir ]; then \
118              (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \
119            else true; fi; \
120          else true; fi; \
121        done
122        $(MAKE) $(AM_MAKEFLAGS) all-recursive
123
124#
125# here's where we build the test programs for each target
126#
127.PHONY: test
128test:
129
130#
131crt0.o: crt0.S
132redboot-crt0.o: redboot-crt0.S
133redboot-syscalls.o: redboot-syscalls.c $(srcdir)/../syscall.h
134        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -o $@ -c $<
135
136rdpmon-crt0.o: crt0.S
137        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDP_MONITOR -o $@ -c $<
138
139rdimon-crt0${${MULTILIBNAME}}.o: crt0.S
140        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
141
142rdimon-ftruncate.o: ftruncate.c
143        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
144
145rdimon-trap.o: trap.S
146        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
147
148rdimon-truncate.o: truncate.c
149        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
150
151rdimon-_exit.o: _exit.c
152        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
153
154rdimon-_kill.o: _kill.c
155        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
156
157rdimon-syscalls.o: syscalls.c
158        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
159
160rdimon-libcfunc.o: libcfunc.c
161        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
162
163$(LINUX_BSP): $(LINUX_OBJS)
164        ${AR} ${ARFLAGS} $@ $^
165        ${RANLIB} $@
166
167$(RDPMON_BSP): $(RDPMON_OBJS)
168        ${AR} ${ARFLAGS} $@ $^
169        ${RANLIB} $@
170
171$(RDIMON_BSP): $(RDIMON_OBJS)
172        ${AR} ${ARFLAGS} $@ $^
173        ${RANLIB} $@
174
175# Multilib support.
176.PHONY:  multi-do all-multi clean-multi install-multi
177
178all-recursive: all-multi
179clean-recursive: clean-multi
180install-recursive: install-multi
181
182# The $(MAKE) comments below are to enable parallel building.
183all-multi:
184        $(MAKE) $(AM_MAKEFLAGS) DO=all multi-do
185
186clean-multi:
187        $(MAKE) $(AM_MAKEFLAGS) DO=clean multi-do
188
189install-multi:
190        $(MAKE) $(AM_MAKEFLAGS) DO=install multi-do
191
192clean mostlyclean:
193        rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP) $(IQ80310_BSP)
194        @rootpre=`pwd`/; export rootpre; \
195        srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
196        for dir in .. ${SUBDIRS}; do \
197          if [ x$$dir != x.. ]; then \
198            if [ -d $$dir ]; then \
199              (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) clean); \
200            else true; fi; \
201          else true; fi; \
202        done
203        $(MAKE) $(AM_MAKEFLAGS) clean-recursive
204
205distclean maintainer-clean realclean: clean
206        rm -f Makefile config.status *~
207
208.PHONY: install info install-info clean-info
209install: ${CRT0_INSTALL} ${LINUX_INSTALL} ${REDBOOT_INSTALL} ${RDPMON_INSTALL} ${RDIMON_INSTALL} ${IQ80310_INSTALL}  ${PID_INSTALL} ${NANO_INSTALL}
210        @rootpre=`pwd`/; export rootpre; \
211        srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
212        for dir in .. ${SUBDIRS}; do \
213          if [ x$$dir != x.. ]; then \
214            if [ -d $$dir ]; then \
215              (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install); \
216            else true; fi; \
217          else true; fi; \
218        done
219        $(MAKE) $(AM_MAKEFLAGS) install-recursive
220
221install-nano:
222        set -e; for x in ${NANO_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
223
224install-crt0:
225        ${INSTALL_DATA} ${CRT0} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x
226
227install-linux:
228        set -e; for x in ${LINUX_CRT0} ${LINUX_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
229        set -e; for x in ${LINUX_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
230
231install-redboot:
232        set -e; for x in ${REDBOOT_CRT0} ${REDBOOT_OBJS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
233        set -e; for x in ${REDBOOT_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
234
235install-rdpmon:
236        set -e; for x in ${RDPMON_CRT0} ${RDPMON_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
237        set -e; for x in ${RDPMON_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
238
239install-rdimon:
240        set -e; for x in ${RDIMON_CRT0} ${RDIMON_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
241        set -e; for x in ${RDIMON_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
242
243
244install-pid:
245        set -e; for x in ${PID_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
246
247install-iq80310:
248        set -e; for x in ${IQ80310_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
249
250
251doc:
252info:
253install-info:
254clean-info:
255
256Makefile: Makefile.in config.status @host_makefile_frag_path@
257        $(SHELL) config.status
258
259config.status: configure
260        $(SHELL) config.status --recheck
261
262include $(srcdir)/../multi-build.in
Note: See TracBrowser for help on using the repository browser.