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