source: trunk/libs/newlib/src/libgloss/bfin/Makefile.in @ 458

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

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

File size: 5.8 KB
RevLine 
[444]1#
2#
3
4DESTDIR =
5VPATH = @srcdir@ @srcdir@/..
6srcdir = @srcdir@
7objdir = .
8srcroot = $(srcdir)/../..
9objroot = $(objdir)/../..
10top_srcdir = @top_srcdir@
11
12prefix = @prefix@
13exec_prefix = @exec_prefix@
14
15host_alias = @host_alias@
16target_alias = @target_alias@
17
18bindir = @bindir@
19libdir = @libdir@
20tooldir = $(exec_prefix)/$(target_alias)
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.
28MULTIDIRS =
29MULTISUBDIR =
30
31SHELL = /bin/sh
32
33mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
34
35CC = @CC@
36
37AS = @AS@
38AR = @AR@
39LD = @LD@
40RANLIB = @RANLIB@
41
42OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
43        then echo ${objroot}/../binutils/objdump ; \
44        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
45OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
46        then echo ${objroot}/../binutils/objcopy ; \
47        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
48
49OBJS            =
50CFLAGS          =
51SCRIPTS         =
52
53# Here is all of the simulator stuff
54SIM_SCRIPTS     =
55SIM_LDFLAGS     =
56SIM_BSP         = libsim.a
57SIM_CRT0        = crt0.o
58SIM_OBJS        = syscalls.o clear_cache_range.o
59SIM_TEST        = sim-test
60SIM_INSTALL     = install-sim
61
62# Here is all of the development board stuff
63BOARD_SCRIPTS   = bfin-common-sc.ld  bfin-common-mc.ld bfin-common-mc0.ld \
64        bf504.ld bf506.ld \
65        bf512.ld bf514.ld bf516.ld bf518.ld \
66        bf522.ld bf523.ld bf524.ld bf525.ld bf526.ld bf527.ld \
67        bf531.ld bf532.ld bf533.ld \
68        bf534.ld bf536.ld bf537.ld \
69        bf538.ld bf539.ld \
70        bf542.ld bf544.ld bf547.ld bf548.ld bf549.ld \
71        bf561.ld bf561a.ld bf561b.ld bf561m.ld \
72        bf606.ld bf606c0.ld bf606c1.ld bf606m.ld \
73        bf607.ld bf607c0.ld bf607c1.ld bf607m.ld \
74        bf608.ld bf608c0.ld bf608c1.ld bf608m.ld \
75        bf609.ld bf609c0.ld bf609c1.ld bf609m.ld \
76        bf592.ld
77BOARD_LDFLAGS   =
78BOARD_BSP       = libbfinbsp.a
79BOARD_CRT0S     = basiccrt.o basiccrts.o
80BOARD_CRT0S     += basiccrt561.o basiccrt561s.o basiccrt561b.o
81# BOARD_CRT0S   += basiccrt60x.o basiccrt60xs.o basiccrt60xc1.o
82BOARD_OBJS      = clear_cache_range.o _exit.o
83BOARD_TEST      =
84BOARD_INSTALL   = install-board
85
86# Host specific makefile fragment comes in here.
87@host_makefile_frag@
88
89INCLUDES += -I$(srcdir)/include
90#
91# build a test program for each target board. Just trying to get
92# it to link is a good test, so we ignore all the errors for now.
93#
94all: ${SIM_CRT0} ${SIM_BSP} ${BOARD_CRT0S} ${BOARD_BSP}
95
96#
97# here's where we build the board support packages for each target
98#
99${BOARD_BSP}: ${OBJS} ${BOARD_OBJS}
100        ${AR} ${ARFLAGS} $@ $^
101        ${RANLIB} $@
102
103${SIM_BSP}: ${OBJS} ${SIM_OBJS}
104        ${AR} ${ARFLAGS} ${SIM_BSP} ${SIM_OBJS} ${OBJS}
105        ${RANLIB} ${SIM_BSP}
106
107#
108#
109#
110crt0.o: crt0.S
111
112basiccrt.o: basiccrt.S
113ifeq (,$(findstring mcpu=,$(CFLAGS)))
114        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf532-any -o $@ -c $<
115else
116        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -o $@ -c $<
117endif
118
119basiccrts.o: basiccrt.S
120ifeq (,$(findstring mcpu=,$(CFLAGS)))
121        $(CC) -D__BFIN_SDRAM $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf532-any -o $@ -c $<
122else
123        $(CC) -D__BFIN_SDRAM $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -o $@ -c $<
124endif
125
126basiccrt561.o: basiccrt.S
127ifneq (,$(findstring mcpu=bf532-none,$(CFLAGS)))
128        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf561-none -o $@ -c $<
129else
130        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf561-any -o $@ -c $<
131endif
132
133basiccrt561s.o: basiccrt.S
134ifneq (,$(findstring mcpu=bf532-none,$(CFLAGS)))
135        $(CC) -D__BFIN_SDRAM $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf561-none -o $@ -c $<
136else
137        $(CC) -D__BFIN_SDRAM $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf561-any -o $@ -c $<
138endif
139
140basiccrt561b.o: basiccrt.S
141ifneq (,$(findstring mcpu=bf532-none,$(CFLAGS)))
142        $(CC) -D__ADSPBF561_COREB__ $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf561-none -o $@ -c $<
143else
144        $(CC) -D__ADSPBF561_COREB__ $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf561-any -o $@ -c $<
145endif
146
147basiccrt60x.o: basiccrt.S
148ifneq (,$(findstring mcpu=bf532-none,$(CFLAGS)))
149        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf608-none -o $@ -c $<
150else
151        $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf608-any -o $@ -c $<
152endif
153
154basiccrt60xs.o: basiccrt.S
155ifneq (,$(findstring mcpu=bf532-none,$(CFLAGS)))
156        $(CC) -D__BFIN_SDRAM $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf608-none -o $@ -c $<
157else
158        $(CC) -D__BFIN_SDRAM $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf608-any -o $@ -c $<
159endif
160
161basiccrt60xc1.o: basiccrt.S
162ifneq (,$(findstring mcpu=bf532-none,$(CFLAGS)))
163        $(CC) -D__ADSPBF60x_CORE1__ $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf608-none -o $@ -c $<
164else
165        $(CC) -D__ADSPBF60x_CORE1__ $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -mcpu=bf608-any -o $@ -c $<
166endif
167
168clean mostlyclean:
169        rm -f a.out core *.i *.o ${SIM_BSP} ${BOARD_BSP}
170
171distclean maintainer-clean realclean: clean
172        rm -f Makefile config.status *~
173
174.PHONY: install info install-info clean-info
175install: ${SIM_INSTALL} ${BOARD_INSTALL}
176
177install-sim:
178        for x in ${SIM_CRT0} ${SIM_BSP} ${SIM_SCRIPTS}; do \
179         ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x || exit $$?; \
180        done
181
182install-board:
183        for x in ${BOARD_CRT0S} ${BOARD_BSP}; do \
184         ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x || exit $$?; \
185        done
186        -if [ -z "${MULTISUBDIR}" ]; then \
187          for x in ${BOARD_SCRIPTS}; do \
188           ${INSTALL_DATA} ${srcdir}/$$x $(DESTDIR)${tooldir}/lib/$$x; \
189          done; \
190          ${mkinstalldirs} ${DESTDIR}${tooldir}/include; \
191          for i in ${srcdir}/include/*.h; do \
192           ${INSTALL_DATA} $$i ${DESTDIR}${tooldir}/include/`basename $$i`; \
193          done; \
194          ${mkinstalldirs} ${DESTDIR}${tooldir}/include/sys; \
195          for i in ${srcdir}/include/sys/*.h; do \
196           ${INSTALL_DATA} $$i ${DESTDIR}${tooldir}/include/sys/`basename $$i`; \
197          done; \
198        else true; fi
199
200doc:
201info:
202install-info:
203clean-info:
204
205Makefile: Makefile.in config.status @host_makefile_frag_path@
206        $(SHELL) config.status
207
208config.status: configure
209        $(SHELL) config.status --recheck
Note: See TracBrowser for help on using the repository browser.