aboutsummaryrefslogtreecommitdiff
path: root/libgloss/sparc_leon/Makefile.in
blob: c21a3e39f58e1287a212ae656e386d3b49a3bca5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# Makefile for libgloss/sparc_leon. This is the board support
# code for the various sparc leon targets.

DESTDIR =
VPATH = @srcdir@
srcdir = @srcdir@
objdir = .
srcroot = $(srcdir)/../..
objroot = $(objdir)/../..

prefix = @prefix@
exec_prefix = @exec_prefix@

host_alias = @host_alias@
target_alias = @target_alias@

bindir = @bindir@
libdir = @libdir@
tooldir = $(exec_prefix)/$(target_alias)
mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs

# Multilib support variables.
# TOP is used instead of MULTI{BUILD,SRC}TOP.
MULTIDIRS =
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

SHELL = /bin/sh

CC = @CC@

AS = @AS@
AR = @AR@
LD = @LD@
RANLIB = @RANLIB@
AR_FLAGS = qrv

OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
	then echo ${objroot}/../binutils/objdump ; \
	else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
	then echo ${objroot}/../binutils/objcopy ; \
	else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`

LEON_BSP  = libleonbare.a
LEON_OBJS = etrap.o rtrap.o etrap_fast.o rtrap_fast.o irqinstall.o regwin.o \
	    regwinflush.o fpu.o bdinit.o contextswitch.o \
            busscan.o irqtrap_fast.o catch_interrupt.o catch_interrupt_svt.o \
	    catch_interrupt_mvt.o catch_interrupt_pending.o gettimeofday.o \
	    times.o rtc.o lcpuinit.o console_init.o console.o console_dbg.o \
	    contextswitch.o contextswitch_asm.o _exit.o amba.o amba_dbg.o \
	    amba_scan.o amba_driver.o timer.o mutex.o locore.o locore_clean.o \
	    locore_var.o locore_var_svt.o jiffies.o \
            mmu_asm.o locore_svtdisp.o locore_mvt_reset.o locore_svt_reset.o stop.o initcalls.o \
	    regwin_patch.o cacheA.o nocache.o  

LEONBARE_THREADS = liblbthread.a
LEONBARE_THREADS_OBJS = kernel.o kernel_debug.o kernel_debug_var.o kernel_context.o \
			kernel_mutex.o kernel_thread.o kernel_sched.o kernel_queue.o \
			kernel_mm.o

LOCOREATEXIT = locore_atexit.o
LEON_SMALLC = libsmall.a

PNP=pnpinit.o
PNP_S=pnpinit_simple.o
LEON_ALL = $(LEON_BSP) $(LEON_SMALLC) $(LEONBARE_THREADS) $(PNP) $(PNP_S) crti.o crtn.o 

LOCORESVT = locore_svt.o 
LOCOREMVT = locore_mvt.o
CRT0 = crt0.o
OBJS = close.o fstat.o getpid.o isatty.o kill.o \
	lseek.o open.o print.o putnum.o read.o sbrk.o stat.o \
	unlink.o write.o io.o kernel.o kernel_debug.o kernel_debug_var.o kernel_context.o
#link.o 

#### Host specific Makefile fragment comes in here.
@host_makefile_frag@

all: stmp-targ-include $(CRT0) $(LOCOREMVT) $(LOCORESVT) $(LEON_ALL)

$(CRT0): $(srcdir)/crt0.S 
	$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -o $@ -c $(srcdir)/crt0.S

$(LEON_BSP): $(OBJS) $(LEON_OBJS)
	@rm -f $@
	${AR} ${AR_FLAGS} $@ $(OBJS) $(LEON_OBJS) 
	${RANLIB} $@

$(LEON_SMALLC): $(LOCOREATEXIT)
	@rm -f $@
	${AR} ${AR_FLAGS} $@ $(LOCOREATEXIT)
	${RANLIB} $@

$(LEONBARE_THREADS): $(LEONBARE_THREADS_OBJS)
	@rm -f $@
	${AR} ${AR_FLAGS} $@ $(LEONBARE_THREADS_OBJS)
	${RANLIB} $@

install: 
	$(INSTALL_DATA) $(CRT0)     $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(CRT0)
	$(INSTALL_DATA) $(LOCORESVT)  $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LOCORESVT)
	$(INSTALL_DATA) $(LOCOREMVT)  $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LOCOREMVT)
	$(INSTALL_DATA) $(PNP)  $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(PNP)
	$(INSTALL_DATA) $(PNP_S)  $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(PNP_S)
	$(INSTALL_DATA) $(LEON_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LEON_BSP)
	$(INSTALL_DATA) $(LEON_SMALLC) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LEON_SMALLC)
	$(INSTALL_DATA) $(LEONBARE_THREADS) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LEONBARE_THREADS)
	if [ -z "$(MULTISUBDIR)" ]; then \
	 $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/asm-leon; \
	 for i in $(srcdir)/asm-leon/*.h; do \
	  if [ -f $$i ]; then \
	   $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/asm-leon/`basename $$i` || exit $$?; \
	  else true; fi ; \
	 done; \
	else true; fi

stmp-targ-include: $(srcdir)/asm-leon/*
	if [ -d ${objroot}/newlib/targ-include/asm-leon ]; then \
		rm -rf ${objroot}/newlib/targ-include/asm-leon; \
	else true; fi ; \
	if [ -d ${objroot}/newlib/targ-include ]; then \
		cp -r $(srcdir)/asm-leon ${objroot}/newlib/targ-include/asm-leon; \
	else true; fi ; \
	touch $@

all-recursive: stmp-targ-include

# Make a simple test case to test the linker script, startup code, and
# I/O code
#
test: 
	@echo Done...

# target specific makefile fragment comes in here.
# @target_makefile_frag@

clean mostlyclean:
	rm -f *.o *.a *.map *.x

distclean maintainer-clean realclean: clean
	rm -f Makefile config.cache config.log config.status

.PHONY: info dvi doc install-info clean-info
info doc dvi:
install-info:
clean-info:

# target specific makefile fragment comes in here.
@target_makefile_frag@

Makefile: Makefile.in config.status @host_makefile_frag_path@ @target_makefile_frag_path@
	$(SHELL) config.status

config.status: configure
	$(SHELL) config.status --recheck