source: trunk/libs/newlib/src/libgloss/m32c/Makefile.in @ 608

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

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

File size: 4.7 KB
Line 
1# Copyright (c) 2005,2008 Red Hat Inc
2#
3# The authors hereby grant permission to use, copy, modify, distribute,
4# and license this software and its documentation for any purpose, provided
5# that existing copyright notices are retained in all copies and that this
6# notice is included verbatim in any distributions. No written agreement,
7# license, or royalty fee is required for any of the authorized uses.
8# Modifications to this software may be copyrighted by their authors
9# and need not follow the licensing terms described here, provided that
10# the new terms are clearly indicated on the first page of each file where
11# they apply.
12
13# Makefile for libgloss/m32c.
14
15VPATH = @srcdir@
16srcdir = @srcdir@
17objdir = .
18srcroot = $(srcdir)/../..
19objroot = $(objdir)/../..
20
21prefix = @prefix@
22exec_prefix = @exec_prefix@
23
24host_alias = @host_alias@
25target_alias = @target_alias@
26
27bindir = @bindir@
28libdir = @libdir@
29tooldir = $(exec_prefix)/$(target_alias)
30
31# Multilib support variables.
32# TOP is used instead of MULTI{BUILD,SRC}TOP.
33MULTIDIRS =
34MULTISUBDIR =
35MULTIDO = true
36MULTICLEAN = true
37
38INSTALL = @INSTALL@
39INSTALL_PROGRAM = @INSTALL_PROGRAM@
40INSTALL_DATA = @INSTALL_DATA@
41
42SHELL = /bin/sh
43
44CC = @CC@
45
46AS = @AS@
47AR = @AR@
48LD = @LD@
49RANLIB = @RANLIB@
50AR_FLAGS = rc
51
52OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
53        then echo ${objroot}/../binutils/objdump ; \
54        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
55OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
56        then echo ${objroot}/../binutils/objcopy ; \
57        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
58
59HEADERS = varvects.h
60SCRIPTS = r8c.ld m16c.ld m32cm.ld m32c.ld m16cmon.ld m32cmon.ld sim8.ld sim16.ld sim24.ld
61CRT = crt0.o crtn.o
62SIM_BSP = libsim.a
63M32C_BSP = libm32cgloss.a
64LIBNOSYS = ../libnosys/libnosys.a
65SIM_OBJS = \
66        sbrk.o \
67        heaptop.o \
68        exit.o \
69        open.o \
70        close.o \
71        read.o \
72        write.o \
73        lseek.o \
74        unlink.o \
75        getpid.o \
76        kill.o \
77        fstat.o \
78        argvlen.o \
79        argv.o \
80        chdir.o \
81        stat.o \
82        chmod.o \
83        utime.o \
84        time.o \
85        gettimeofday.o \
86        times.o \
87        link.o \
88        isatty.o \
89        abort.o
90M32C_OBJS = \
91        varvects.o
92
93#### Host specific Makefile fragment comes in here.
94@host_makefile_frag@
95
96
97# Override .S.o rule to pass assembler debugging flags
98.S.o:
99        $(CC) -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $<
100
101all: $(CRT) $(SIM_BSP) $(M32C_BSP) $(SCRIPTS)
102
103$(SIM_BSP): $(SIM_OBJS)
104        $(AR) $(ARFLAGS) $@ $?
105        $(RANLIB) $@
106
107$(M32C_BSP): $(M32C_OBJS)
108        $(AR) $(ARFLAGS) $@ $?
109        $(RANLIB) $@
110
111# genscript parameters: srcdir name ramstart ramsize romstart romsize vecprefix
112
113GDEP = $(srcdir)/m32c.tmpl $(srcdir)/genscript Makefile
114GS = $(SHELL) $(srcdir)/genscript $(srcdir)
115
116# NOTE: The simulators and monitors reserve the following locations
117# for themselves, so we skip them:
118#   R8C/M16C:   0x400-0x4ff     0x0ff600-0x0ffcff
119#   M32C:       0x400-0x4ff     0xfff600-0xfffcff
120
121r8c.ld : $(GDEP)
122        $(GS) r8c   0x500  0x300   0xc000   0x3f24   0xff
123
124m16c.ld : $(GDEP)
125        $(GS) m16c  0x500 0x4f00  0xc0000  0x3f600  0xfff
126
127m32cm.ld : $(GDEP)
128        $(GS) m32cm 0x500 0x2700 0xfe0000 0x01f600 0xffff
129
130m32c.ld : $(GDEP)
131        $(GS) m32c  0x500 0x7b00 0xf80000 0x07f600 0xffff
132
133
134m16cmon.ld : $(GDEP)
135        $(GS) m16cmon  0x400  0x100  0xff600    0x800  0xfff
136
137m32cmon.ld : $(GDEP)
138        $(GS) m32cmon  0x400  0x100 0xfff600    0x800 0xffff
139
140
141sim8.ld : $(GDEP)
142        $(GS) sim8  0x500 0xf624        0        0   0xff
143
144sim16.ld : $(GDEP)
145        $(GS) sim16 0x500 0xf700  0x20000  0x80000  0xfff
146
147sim24.ld : $(GDEP)
148        $(GS) sim24 0x200000 0x800000   0        0 0xffff
149
150# Dependencies
151
152SDEPS = $(srcdir)/m32csys.h $(srcdir)/../syscall.h
153
154abort.o : $(SDEPS)
155argv.o : $(SDEPS)
156argvlen.o : $(SDEPS)
157chdir.o : $(SDEPS)
158chmod.o : $(SDEPS)
159close.o : $(SDEPS)
160exit.o : $(SDEPS)
161fstat.o : $(SDEPS)
162getpid.o : $(SDEPS)
163gettimeofday.o : $(SDEPS)
164heaptop.o : $(SDEPS)
165kill.o : $(SDEPS)
166link.o : $(SDEPS)
167lseek.o : $(SDEPS)
168open.o : $(SDEPS)
169read.o : $(SDEPS)
170stat.o : $(SDEPS)
171time.o : $(SDEPS)
172times.o : $(SDEPS)
173unlink.o : $(SDEPS)
174utime.o : $(SDEPS)
175write.o : $(SDEPS)
176
177install: $(CRT) $(SIM_BSP) $(M32C_BSP) $(SCRIPTS)
178        for c in $(CRT) $(SIM_BSP) $(M32C_BSP); do \
179          $(INSTALL_DATA) $$c $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$c ;\
180        done
181        for c in $(SCRIPTS); do \
182          $(INSTALL_DATA) $$c $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$c ;\
183        done
184        for c in $(HEADERS); do \
185          $(INSTALL_DATA) ${srcdir}/$$c \
186                $(DESTDIR)$(tooldir)/include/$$c ;\
187        done
188
189clean mostlyclean:
190        rm -f *.o *.a
191
192distclean maintainer-clean realclean: clean
193        rm -f Makefile config.cache config.log config.status
194
195.PHONY: info dvi doc install-info clean-info
196info doc dvi:
197install-info:
198clean-info:
199
200Makefile: Makefile.in config.status @host_makefile_frag_path@
201        $(SHELL) config.status
202
203config.status: configure
204        $(SHELL) config.status --recheck
Note: See TracBrowser for help on using the repository browser.