Line 1... |
Line 1... |
# Makefile.in. Autoconf input makefile.
|
# Makefile.in. Autoconf input makefile.
|
|
|
# Copyright (c) 1998 Cygnus Support
|
# Copyright (c) 1998 Cygnus Support
|
# Copyright (C) 2004, Jacob Bower
|
# Copyright (C) 2004, Jacob Bower
|
# Copyright (C) 2010, Embecosm Limited
|
# Copyright (C) 2010, Embecosm Limited
|
|
# Copyright (C) 2011, ORSoC AB
|
|
|
# Contributor Jeremy Bennett
|
# Contributor Jeremy Bennett
|
|
# Contributor Julius Baxter
|
|
|
# This file is part of Newlib.
|
# This file is part of Newlib.
|
|
|
# The original work by Jacob Bower is provided as-is without any kind of
|
# The original work by Jacob Bower is provided as-is without any kind of
|
# warranty. Use it at your own risk!
|
# warranty. Use it at your own risk!
|
Line 68... |
Line 70... |
else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
|
else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
|
|
|
# Add our own flags for C compilation
|
# Add our own flags for C compilation
|
CFLAGS = -g
|
CFLAGS = -g
|
|
|
|
# List new boards here - should be accompanied by own .[cS]
|
|
BOARDS = or1ksim or1ksim-uart orpsocrefdesign ordb1a3pe1500 ml501
|
|
|
|
BOARD_OBJS = $(addsuffix .o,$(BOARDS))
|
|
BOARD_LIBS = $(addsuffix .a,$(BOARDS))
|
|
|
|
# Generic name, used after install for each of these libraries
|
|
LIBBOARD = libboard.a
|
|
|
# Our own C runtime startup and BSPs
|
# Our own C runtime startup and BSPs
|
CRT0 = crt0.o
|
CRT0 = crt0.o
|
BSP = libor32.a
|
LIBOR32 = libor32.a
|
BSP_UART = libor32uart.a
|
|
|
|
OUTPUTS = $(CRT0) $(BSP) $(BSP_UART)
|
OUTPUTS = $(CRT0) $(LIBOR32)
|
|
|
# The object files for each BSP
|
# The standard object files for the library
|
OBJS = _exit.o \
|
LIBOR32_OBJS = _exception_handler.o \
|
|
_cache.o \
|
|
_exit.o \
|
|
_interrupt_handler.o \
|
close.o \
|
close.o \
|
environ.o \
|
environ.o \
|
execve.o \
|
execve.o \
|
fork.o \
|
fork.o \
|
fstat.o \
|
fstat.o \
|
Line 92... |
Line 105... |
open.o \
|
open.o \
|
read.o \
|
read.o \
|
sbrk.o \
|
sbrk.o \
|
stat.o \
|
stat.o \
|
times.o \
|
times.o \
|
uart-dummy.o \
|
|
unlink.o \
|
|
wait.o \
|
|
write.o
|
|
|
|
UART_OBJS = _exit.o \
|
|
close.o \
|
|
environ.o \
|
|
execve.o \
|
|
fork.o \
|
|
fstat-uart.o \
|
|
getpid.o \
|
|
isatty-uart.o \
|
|
kill.o \
|
|
link.o \
|
|
lseek-uart.o \
|
|
open.o \
|
|
read-uart.o \
|
|
sbrk.o \
|
|
stat.o \
|
|
times.o \
|
|
uart.o \
|
uart.o \
|
unlink.o \
|
unlink.o \
|
wait.o \
|
wait.o \
|
write-uart.o
|
write.o
|
|
|
# Host specific makefile fragment specifies the automatic rules
|
# Host specific makefile fragment specifies the automatic rules
|
@host_makefile_frag@
|
@host_makefile_frag@
|
|
|
# Build crt0.o and all the BSPs
|
# Build what we need out
|
all: ${CRT0} ${BSP} ${BSP_UART}
|
all: $(OUTPUTS) $(BOARD_LIBS)
|
|
|
# Rules to build the BSPs from their objects. No need for a rule to build
|
# Rules to build the BSPs from their objects. No need for a rule to build
|
# crt0.o, that happens autmatically from .S
|
# crt0.o, that happens autmatically from .S
|
$(BSP): $(OBJS)
|
$(LIBOR32): $(LIBOR32_OBJS)
|
${AR} ${ARFLAGS} $@ $(OBJS)
|
${AR} ${ARFLAGS} $@ $^
|
${RANLIB} $@
|
${RANLIB} $@
|
|
|
$(BSP_UART): $(UART_OBJS)
|
%.a: %.o
|
${AR} ${ARFLAGS} $@ $(UART_OBJS)
|
${AR} ${ARFLAGS} $@ $^
|
${RANLIB} $@
|
${RANLIB} $@
|
|
|
|
|
# Standard clean up rules.
|
# Standard clean up rules.
|
clean mostlyclean:
|
clean mostlyclean:
|
rm -f $(OUTPUTS) *.i *~ *.o *-test *.srec *.dis *.map *.x
|
rm -f $(OUTPUTS) *.i *~ *.o *-test *.srec *.dis *.map *.x
|
|
|
distclean maintainer-clean realclean: clean
|
distclean maintainer-clean realclean: clean
|
rm -f Makefile config.status *~
|
rm -f Makefile config.status *~
|
|
|
# Standard install rules
|
# Standard install rules for libor32 and crt0
|
|
# Boards installed into lib/board/$${board} and named board.a. GCC links against with
|
|
# board specified by -mboard=whichboard and adds
|
|
# -lboard -L/lib/board/whichboard
|
|
#
|
.PHONY: install info install-info clean-info
|
.PHONY: install info install-info clean-info
|
install:
|
install:
|
@for outputs in ${OUTPUTS}; do\
|
@for outputs in ${OUTPUTS}; do\
|
mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
|
mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
|
$(INSTALL_PROGRAM) $${outputs} \
|
$(INSTALL_PROGRAM) $${outputs} \
|
$(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
|
$(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
|
|
done; \
|
|
for board in ${BOARDS}; do\
|
|
mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/boards/$${board}; \
|
|
$(INSTALL_PROGRAM) $${board}.a \
|
|
$(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/boards/$${board}/$(LIBBOARD); \
|
done
|
done
|
|
|
# Deal with info if we had any.
|
# Deal with info if we had any.
|
info:
|
info:
|
install-info:
|
install-info:
|