source: trunk/libs/newlib/src/libgloss/sparc_leon/Makefile.in @ 467

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

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

File size: 4.9 KB
Line 
1# Makefile for libgloss/sparc_leon. This is the board support
2# code for the various sparc leon targets.
3
4DESTDIR =
5VPATH = @srcdir@
6srcdir = @srcdir@
7objdir = .
8srcroot = $(srcdir)/../..
9objroot = $(objdir)/../..
10
11prefix = @prefix@
12exec_prefix = @exec_prefix@
13
14host_alias = @host_alias@
15target_alias = @target_alias@
16
17bindir = @bindir@
18libdir = @libdir@
19tooldir = $(exec_prefix)/$(target_alias)
20mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs
21
22# Multilib support variables.
23# TOP is used instead of MULTI{BUILD,SRC}TOP.
24MULTIDIRS =
25MULTISUBDIR =
26MULTIDO = true
27MULTICLEAN = true
28
29INSTALL = @INSTALL@
30INSTALL_PROGRAM = @INSTALL_PROGRAM@
31INSTALL_DATA = @INSTALL_DATA@
32
33SHELL = /bin/sh
34
35CC = @CC@
36
37AS = @AS@
38AR = @AR@
39LD = @LD@
40RANLIB = @RANLIB@
41AR_FLAGS = qrv
42
43OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
44        then echo ${objroot}/../binutils/objdump ; \
45        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
46OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
47        then echo ${objroot}/../binutils/objcopy ; \
48        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
49
50LEON_BSP  = libleonbare.a
51LEON_OBJS = etrap.o rtrap.o etrap_fast.o rtrap_fast.o irqinstall.o regwin.o \
52            regwinflush.o fpu.o bdinit.o contextswitch.o \
53            busscan.o irqtrap_fast.o catch_interrupt.o catch_interrupt_svt.o \
54            catch_interrupt_mvt.o catch_interrupt_pending.o gettimeofday.o \
55            times.o rtc.o lcpuinit.o console_init.o console.o console_dbg.o \
56            contextswitch.o contextswitch_asm.o _exit.o amba.o amba_dbg.o \
57            amba_scan.o amba_driver.o timer.o mutex.o locore.o locore_clean.o \
58            locore_var.o locore_var_svt.o jiffies.o \
59            mmu_asm.o locore_svtdisp.o locore_mvt_reset.o locore_svt_reset.o stop.o initcalls.o \
60            regwin_patch.o cacheA.o nocache.o 
61
62LEONBARE_THREADS = liblbthread.a
63LEONBARE_THREADS_OBJS = kernel.o kernel_debug.o kernel_debug_var.o kernel_context.o \
64                        kernel_mutex.o kernel_thread.o kernel_sched.o kernel_queue.o \
65                        kernel_mm.o
66
67LOCOREATEXIT = locore_atexit.o
68LEON_SMALLC = libsmall.a
69
70PNP=pnpinit.o
71PNP_S=pnpinit_simple.o
72LEON_ALL = $(LEON_BSP) $(LEON_SMALLC) $(LEONBARE_THREADS) $(PNP) $(PNP_S) crti.o crtn.o
73
74LOCORESVT = locore_svt.o
75LOCOREMVT = locore_mvt.o
76CRT0 = crt0.o
77OBJS = close.o fstat.o getpid.o isatty.o kill.o \
78        lseek.o open.o print.o putnum.o read.o sbrk.o stat.o \
79        unlink.o write.o io.o kernel.o kernel_debug.o kernel_debug_var.o kernel_context.o
80#link.o
81
82#### Host specific Makefile fragment comes in here.
83@host_makefile_frag@
84
85all: stmp-targ-include $(CRT0) $(LOCOREMVT) $(LOCORESVT) $(LEON_ALL)
86
87$(CRT0): $(srcdir)/crt0.S
88        $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -o $@ -c $(srcdir)/crt0.S
89
90$(LEON_BSP): $(OBJS) $(LEON_OBJS)
91        @rm -f $@
92        ${AR} ${AR_FLAGS} $@ $(OBJS) $(LEON_OBJS)
93        ${RANLIB} $@
94
95$(LEON_SMALLC): $(LOCOREATEXIT)
96        @rm -f $@
97        ${AR} ${AR_FLAGS} $@ $(LOCOREATEXIT)
98        ${RANLIB} $@
99
100$(LEONBARE_THREADS): $(LEONBARE_THREADS_OBJS)
101        @rm -f $@
102        ${AR} ${AR_FLAGS} $@ $(LEONBARE_THREADS_OBJS)
103        ${RANLIB} $@
104
105install:
106        $(INSTALL_DATA) $(CRT0)     $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(CRT0)
107        $(INSTALL_DATA) $(LOCORESVT)  $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LOCORESVT)
108        $(INSTALL_DATA) $(LOCOREMVT)  $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LOCOREMVT)
109        $(INSTALL_DATA) $(PNP)  $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(PNP)
110        $(INSTALL_DATA) $(PNP_S)  $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(PNP_S)
111        $(INSTALL_DATA) $(LEON_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LEON_BSP)
112        $(INSTALL_DATA) $(LEON_SMALLC) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LEON_SMALLC)
113        $(INSTALL_DATA) $(LEONBARE_THREADS) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LEONBARE_THREADS)
114        if [ -z "$(MULTISUBDIR)" ]; then \
115         $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/asm-leon; \
116         for i in $(srcdir)/asm-leon/*.h; do \
117          if [ -f $$i ]; then \
118           $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/asm-leon/`basename $$i` || exit $$?; \
119          else true; fi ; \
120         done; \
121        else true; fi
122
123stmp-targ-include: $(srcdir)/asm-leon/*
124        if [ -d ${objroot}/newlib/targ-include/asm-leon ]; then \
125                rm -rf ${objroot}/newlib/targ-include/asm-leon; \
126        else true; fi ; \
127        if [ -d ${objroot}/newlib/targ-include ]; then \
128                cp -r $(srcdir)/asm-leon ${objroot}/newlib/targ-include/asm-leon; \
129        else true; fi ; \
130        touch $@
131
132all-recursive: stmp-targ-include
133
134# Make a simple test case to test the linker script, startup code, and
135# I/O code
136#
137test:
138        @echo Done...
139
140# target specific makefile fragment comes in here.
141# @target_makefile_frag@
142
143clean mostlyclean:
144        rm -f *.o *.a *.map *.x
145
146distclean maintainer-clean realclean: clean
147        rm -f Makefile config.cache config.log config.status
148
149.PHONY: info dvi doc install-info clean-info
150info doc dvi:
151install-info:
152clean-info:
153
154# target specific makefile fragment comes in here.
155@target_makefile_frag@
156
157Makefile: Makefile.in config.status @host_makefile_frag_path@ @target_makefile_frag_path@
158        $(SHELL) config.status
159
160config.status: configure
161        $(SHELL) config.status --recheck
Note: See TracBrowser for help on using the repository browser.