Update.
[glibc.git] / bare / Makefile
blob0407c230de227f9e26a8226057708c2788076f4b
1 # Copyright (C) 1994, 1997 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
3 # Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
4 # On-Line Applications Research Corporation.
6 # The GNU C Library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Library General Public License as
8 # published by the Free Software Foundation; either version 2 of the
9 # License, or (at your option) any later version.
11 # The GNU C Library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Library General Public License for more details.
16 # You should have received a copy of the GNU Library General Public
17 # License along with the GNU C Library; see the file COPYING.LIB. If not,
18 # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
21 subdir := bare
23 bare-routines := brdinit console strtsupp
24 routines = $(bare-routines)
25 elided-routines = $(bare-routines)
26 extra-objs = $(bare-routines:%=%.o)
28 install-lib = lib$(config-vendor).a
30 include ../Rules
33 # For bare targets, the $(config-vendor) is the name of the board.
34 # We will place the board dependent code ONLY in a library which
35 # is board dependent. This way many target boards can share a
36 # single libc.a. To resolve all symbols and successfully link
37 # a program, the application must link against libc.a and libMY_TARGET.a.
38 # For example, the target specific library for the Motorola MVME135
39 # board will be named libmvme135.a. To link a program for the
40 # MVME135, one must link against -lc and -lmvme135.
43 lib: $(objpfx)lib$(config-vendor).a
45 $(objpfx)lib$(config-vendor).a: $(bare-routines:%=$(objpfx)%.o)
46 # This library is small enough that it's simplest to recreate the archive
47 # from scratch each time.
48 rm -f $@
49 ifdef objdir
50 cd $(objpfx); $(AR) cq$(verbose) $(@:$(objpfx)%=%) $(^:$(objpfx)%=%)
51 else
52 $(AR) cq$(verbose) $@ $^
53 endif
54 $(RANLIB) $@