source: trunk/libs/newlib/src/libgloss/or1k/Makefile.in @ 603

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

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

File size: 3.5 KB
Line 
1# Copyright (c) 1998 Cygnus Support
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
13DESTDIR =
14VPATH = @srcdir@
15srcdir = @srcdir@
16objdir = .
17srcroot = $(srcdir)/../..
18objroot = $(objdir)/../..
19
20prefix = @prefix@
21exec_prefix = @exec_prefix@
22
23host_alias = @host_alias@
24target_alias = @target_alias@
25program_transform_name = @program_transform_name@
26
27bindir = @bindir@
28libdir = @libdir@
29includedir = @includedir@
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@
46AS = @AS@
47AR = @AR@
48LD = @LD@
49RANLIB = @RANLIB@
50
51OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
52        then echo ${objroot}/../binutils/objdump ; \
53        else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
54OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
55        then echo ${objroot}/../binutils/objcopy ; \
56        else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
57
58# object files needed
59COMMON_FILES = syscalls \
60        or1k_uart \
61        outbyte \
62        caches-asm \
63        exceptions \
64        exceptions-asm \
65        interrupts \
66        interrupts-asm \
67        mmu-asm \
68        timer \
69        sbrk \
70        impure \
71        util \
72        sync-asm
73
74LIBOR1K_FILES = $(COMMON_FILES)
75LIBOR1K_OBJS = $(addsuffix .o,$(LIBOR1K_FILES))
76
77BOARDS = atlys \
78        de0_nano \
79        ml501 \
80        optimsoc \
81        or1ksim \
82        or1ksim-uart \
83        ordb1a3pe1500 \
84        ordb2a \
85        orpsocrefdesign
86
87BOARD_LIBS = $(addprefix libboard-,$(addsuffix .a,$(BOARDS)))
88BOARD_OBJS = $(addprefix libboard-,$(addsuffix .o,$(BOARDS)))
89
90GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \
91        then echo -L${objroot}/../gcc ; fi`
92
93OUTPUTS = libor1k.a crt0.o ${BOARD_LIBS}
94
95# Host specific makefile fragment comes in here.
96@host_makefile_frag@
97
98
99all: ${OUTPUTS}
100
101#
102# here's where we build the library for each target
103#
104
105libor1k.a: $(LIBOR1K_OBJS)
106        ${AR} ${ARFLAGS} $@ $(LIBOR1K_OBJS)
107        ${RANLIB} $@
108
109libboard-%.o: boards/%.S
110        ${CC} ${CFLAGS} -o $@ -c $<
111
112libboard-%.o: boards/%.c
113        ${CC} ${CFLAGS} -o $@ -c $<
114
115libboard-%.a: libboard-%.o
116        ${AR} ${ARFLAGS} $@ $<
117        ${RANLIB} $@
118
119doc:
120
121clean mostlyclean:
122        rm -f $(OUTPUTS) $(BOARD_LIBS) *.i *~ *.o *-test *.srec *.dis *.map *.x
123
124distclean maintainer-clean realclean: clean
125        rm -f Makefile config.status $(OUTPUTS)
126
127.PHONY: install info install-info clean-info
128install:
129        @for outputs in ${OUTPUTS}; do\
130         mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
131         $(INSTALL_DATA) $${outputs} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
132        done
133        $(INSTALL_DATA) ${srcdir}/include/or1k-support.h $(DESTDIR)$(tooldir)/include/
134        $(INSTALL_DATA) ${srcdir}/include/or1k-sprs.h $(DESTDIR)$(tooldir)/include/
135        $(INSTALL_DATA) ${srcdir}/include/or1k-asm.h $(DESTDIR)$(tooldir)/include/
136        $(INSTALL_DATA) ${srcdir}/include/or1k-nop.h $(DESTDIR)$(tooldir)/include/
137
138info:
139install-info:
140clean-info:
141
142Makefile: Makefile.in config.status @host_makefile_frag_path@
143        $(SHELL) config.status
144
145config.status: configure
146        $(SHELL) config.status --recheck
Note: See TracBrowser for help on using the repository browser.