source: trunk/libs/newlib/src/libgloss/aarch64/Makefile.in @ 588

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

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

File size: 6.8 KB
Line 
1#  Copyright (c) 2012 ARM Ltd.  All rights reserved.
2#
3#  Redistribution and use in source and binary forms, with or without
4#  modification, are permitted provided that the following conditions
5#  are met:
6#  1. Redistributions of source code must retain the above copyright
7#     notice, this list of conditions and the following disclaimer.
8#  2. Redistributions in binary form must reproduce the above copyright
9#     notice, this list of conditions and the following disclaimer in the
10#     documentation and/or other materials provided with the distribution.
11#  3. The name of the company may not be used to endorse or promote
12#     products derived from this software without specific prior written
13#     permission.
14#
15#  THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
16#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18#  IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
20#  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21#  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
22#  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23#  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24#  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
26DESTDIR =
27VPATH = @srcdir@ @srcdir@/..
28srcdir = @srcdir@
29objdir = .
30srcroot = $(srcdir)/../..
31objroot = $(objdir)/../..
32
33prefix = @prefix@
34exec_prefix = @exec_prefix@
35
36host_alias = @host_alias@
37target_alias = @target_alias@
38
39bindir = @bindir@
40libdir = @libdir@
41tooldir = $(exec_prefix)/$(target_alias)
42
43objtype = @objtype@
44
45INSTALL = @INSTALL@
46INSTALL_PROGRAM = @INSTALL_PROGRAM@
47INSTALL_DATA = @INSTALL_DATA@
48
49# Multilib support variables.
50# TOP is used instead of MULTI{BUILD,SRC}TOP.
51MULTISRCTOP =
52MULTIBUILDTOP =
53MULTIDIRS =
54MULTISUBDIR =
55MULTILIBNAME =
56MULTIDO = true
57MULTICLEAN = true
58MULTI_FLAGS_FOR_TARGET = MULTI_DEFAULT_FLAGS
59MULTI_DEFAULT_FLAGS = -DSEMIHOST_V2
60
61SHELL = /bin/sh
62
63CC = @CC@
64
65AS = @AS@
66AR = @AR@
67LD = @LD@
68RANLIB = @RANLIB@
69
70SUBDIRS = @subdirs@
71
72OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
73        then echo ${objroot}/../binutils/objdump ; \
74        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
75OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
76        then echo ${objroot}/../binutils/objcopy ; \
77        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
78
79OBJS = ftruncate.o libcfunc.o syscalls.o truncate.o _exit.o _kill.o
80CRT0            = crt0.o
81CRT0_INSTALL    = install-crt0
82
83RDIMON_CRT0     = rdimon-crt0${${MULTILIBNAME}}.o
84RDIMON_BSP      = librdimon${${MULTILIBNAME}}.a
85RDIMON_OBJS     = $(patsubst %,rdimon-%,$(OBJS))
86RDIMON_SCRIPTS  = rdimon${${MULTILIBNAME}}.specs \
87                  aem-ve${${MULTILIBNAME}}.specs \
88                  aem-validation${${MULTILIBNAME}}.specs
89RDIMON_INSTALL  = install-rdimon
90
91CFLAGS          = -g
92
93# Host specific makefile fragment comes in here.
94@host_makefile_frag@
95
96#
97# build a test program for each target board. Just trying to get
98# it to link is a good test, so we ignore all the errors for now.
99#
100
101all: ${CRT0} ${RDIMON_CRT0} ${RDIMON_BSP} ${RDIMON_SCRIPTS}
102        @rootpre=`pwd`/; export rootpre; \
103        srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
104        for dir in .. ${SUBDIRS}; do \
105          if [ x$$dir != x.. ]; then \
106            if [ -d $$dir ]; then \
107              (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \
108            else true; fi; \
109          else true; fi; \
110        done
111        $(MAKE) $(AM_MAKEFLAGS) all-recursive
112
113#
114# here's where we build the test programs for each target
115#
116.PHONY: test
117test:
118
119#
120crt0.o: crt0.S
121        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -o $@ -c $<
122
123rdimon-crt0${${MULTILIBNAME}}.o: crt0.S
124        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
125
126#rdimon-trap.o: trap.S
127#       $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
128
129rdimon-_exit.o: _exit.c
130        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
131
132rdimon-ftruncate.o: ftruncate.c
133        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
134
135rdimon-_kill.o: _kill.c
136        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
137
138rdimon-libcfunc.o: libcfunc.c
139        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
140
141rdimon-syscalls.o: syscalls.c
142        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
143
144rdimon-truncate.o: truncate.c
145        $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
146
147$(RDIMON_BSP): $(RDIMON_OBJS)
148        ${AR} ${ARFLAGS} $@ $^
149        ${RANLIB} $@
150
151# Multilib support.
152.PHONY:  multi-do all-multi clean-multi install-multi
153
154all-recursive: all-multi
155clean-recursive: clean-multi
156install-recursive: install-multi
157
158# The $(MAKE) comments below are to enable parallel building.
159all-multi:
160        $(MAKE) $(AM_MAKEFLAGS) DO=all multi-do
161
162clean-multi:
163        $(MAKE) $(AM_MAKEFLAGS) DO=clean multi-do
164
165install-multi:
166        $(MAKE) $(AM_MAKEFLAGS) DO=install multi-do
167
168clean mostlyclean:
169        rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP) ${RDIMON_SCRIPTS}
170        @rootpre=`pwd`/; export rootpre; \
171        srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
172        for dir in .. ${SUBDIRS}; do \
173          if [ x$$dir != x.. ]; then \
174            if [ -d $$dir ]; then \
175              (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) clean); \
176            else true; fi; \
177          else true; fi; \
178        done
179        $(MAKE) $(AM_MAKEFLAGS) clean-recursive
180
181distclean maintainer-clean realclean: clean
182        rm -f Makefile config.status *~
183
184.PHONY: install info install-info clean-info
185install: ${CRT0_INSTALL} ${RDIMON_INSTALL}
186        @rootpre=`pwd`/; export rootpre; \
187        srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
188        for dir in .. ${SUBDIRS}; do \
189          if [ x$$dir != x.. ]; then \
190            if [ -d $$dir ]; then \
191              (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install); \
192            else true; fi; \
193          else true; fi; \
194        done
195        $(MAKE) $(AM_MAKEFLAGS) install-recursive
196
197install-crt0:
198        ${INSTALL_DATA} ${CRT0} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x
199
200install-rdimon:
201        set -e; for x in ${RDIMON_CRT0} ${RDIMON_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
202        set -e; for x in ${RDIMON_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
203
204# Make copies of the scripts to facilitate in-tree bootstrapping.
205${RDIMON_SCRIPTS}: %: ${objtype}%
206        cp $< $@
207
208doc:
209info:
210install-info:
211clean-info:
212
213Makefile: Makefile.in config.status @host_makefile_frag_path@
214        $(SHELL) config.status
215
216config.status: configure
217        $(SHELL) config.status --recheck
218
219include $(srcdir)/../multi-build.in
Note: See TracBrowser for help on using the repository browser.