source: trunk/libs/newlib/src/libgloss/msp430/Makefile.in @ 454

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

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

File size: 4.4 KB
RevLine 
[444]1# Copyright (c) 2008-2014 Red Hat, Inc. All rights reserved.
2#
3# This copyrighted material is made available to anyone wishing to use, modify,
4# copy, or redistribute it subject to the terms and conditions of the BSD
5# License.   This program is distributed in the hope that it will be useful,
6# but WITHOUT ANY WARRANTY expressed or implied, including the implied warranties
7# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  A copy of this license
8# is available at http://www.opensource.org/licenses. Any Red Hat trademarks that
9# are incorporated in the source code or documentation are not subject to the BSD
10# License and may only be used or replicated with the express permission of
11# Red Hat, Inc.
12
13# Makefile for libgloss/msp430.
14
15DESTDIR =
16VPATH = @srcdir@
17srcdir = @srcdir@
18objdir = .
19srcroot = $(srcdir)/../..
20objroot = $(objdir)/../..
21
22prefix = @prefix@
23exec_prefix = @exec_prefix@
24
25host_alias = @host_alias@
26target_alias = @target_alias@
27
28bindir = @bindir@
29libdir = @libdir@
30tooldir = $(exec_prefix)/$(target_alias)
31
32# Multilib support variables.
33# TOP is used instead of MULTI{BUILD,SRC}TOP.
34MULTIDIRS =
35MULTISUBDIR =
36MULTIDO = true
37MULTICLEAN = true
38
39INSTALL = @INSTALL@
40INSTALL_PROGRAM = @INSTALL_PROGRAM@
41INSTALL_DATA = @INSTALL_DATA@
42
43SHELL = /bin/sh
44
45CC = @CC@
46
47AS = @AS@
48AR = @AR@
49LD = @LD@
50RANLIB = @RANLIB@
51AR_FLAGS = rc
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
60SCRIPTS  = $(srcdir)/msp430-sim.ld
61SCRIPTS += $(srcdir)/msp430xl-sim.ld
62SCRIPTS += $(srcdir)/intr_vectors.ld
63
64CRT = gcrt0.o crt0.o crt0-minrt.o crtn.o crtn-minrt.o
65SIM_BSP = libsim.a
66LIB_NOSYS = libnosys.a
67LIB_CRT = libcrt.a
68
69SIM_OBJS = syscalls.o \
70        cio.o \
71        write.o \
72        sbrk.o
73
74NOSYS_OBJS = ciosyscalls.o \
75        cio.o \
76        write.o \
77        unlink.o \
78        sbrk.o
79
80# Each crt_*.o is built from crt0.S using -DL*.  crt0.o is built from
81# crt0.s with -DL0 via the default rule below.
82CRT_OBJS = \
83        crt_bss.o \
84        crt_high_bss.o \
85        crt_movedata.o \
86        crt_move_highdata.o \
87        crt_main.o \
88        crt_main_minrt.o \
89        crt_callexit.o \
90        crt_init.o
91
92#### Host specific Makefile fragment comes in here.
93@host_makefile_frag@
94
95
96all: $(CRT) $(SIM_BSP) $(LIB_NOSYS) $(LIB_CRT) copy_scripts_to_objdir
97
98crt_%.o : crt0.S
99        $(CC) -DL$* -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $< -o $@
100
101crt0-minrt.o : crt0.S
102        $(CC) -DL0 -DMINRT -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $< -o $@
103
104crtn-minrt.o : crtn.S
105        $(CC) -DL0 -DMINRT -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $< -o $@
106
107# Override .S.o rule to pass assembler debugging flags
108.S.o:
109        $(CC) -DL0 -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $<
110
111$(SIM_BSP): $(SIM_OBJS)
112        $(AR) $(ARFLAGS) $@ $?
113        $(RANLIB) $@
114
115$(LIB_NOSYS): $(NOSYS_OBJS)
116        $(AR) $(ARFLAGS) $@ $?
117        $(RANLIB) $@
118
119$(LIB_CRT): $(CRT_OBJS)
120        $(AR) $(ARFLAGS) $@ $?
121        $(RANLIB) $@
122
123copy_scripts_to_objdir: $(SCRIPTS)
124        cp $(SCRIPTS) $(objdir)
125
126# Dependencies
127
128SDEPS = $(srcdir)/cio.h
129
130abort.o : $(SDEPS)
131argv.o : $(SDEPS)
132argvlen.o : $(SDEPS)
133chdir.o : $(SDEPS)
134chmod.o : $(SDEPS)
135close.o : $(SDEPS)
136exit.o : $(SDEPS)
137fstat.o : $(SDEPS)
138getpid.o : $(SDEPS)
139gettimeofday.o : $(SDEPS)
140gcrt0.o: gcrt0.S crt0.S
141kill.o : $(SDEPS)
142link.o : $(SDEPS)
143lseek.o : $(SDEPS)
144mcount.o : $(SDEPS)
145open.o : $(SDEPS)
146read.o : $(SDEPS)
147sigprocmask.o : $(SDEPS)
148sleep.o : $(SDEPS)
149stat.o : $(SDEPS)
150time.o : $(SDEPS)
151times.o : $(SDEPS)
152unlink.o : $(SDEPS)
153utime.o : $(SDEPS)
154write.o : $(SDEPS)
155
156install: $(CRT) $(SIM_BSP) $(LIB_NOSYS) $(LIB_CRT) $(SCRIPTS)
157        mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}
158        for c in $(CRT) $(SIM_BSP) $(LIB_NOSYS) $(LIB_CRT); do \
159          $(INSTALL_DATA) $$c $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$c ;\
160        done
161        for c in $(SCRIPTS); do \
162          b=`basename $$c`; \
163          $(INSTALL_DATA) $$c $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$b ;\
164        done
165
166clean mostlyclean:
167        rm -f *.o *.a
168
169distclean maintainer-clean realclean: clean
170        rm -f Makefile config.cache config.log config.status
171
172.PHONY: info dvi doc install-info clean-info
173info doc dvi:
174install-info:
175clean-info:
176
177Makefile: Makefile.in config.status @host_makefile_frag_path@
178        $(SHELL) config.status
179
180config.status: configure
181        $(SHELL) config.status --recheck
Note: See TracBrowser for help on using the repository browser.