fixing cross arch build paths and options
[debian/elilo] / fs / Makefile
1 #
2 #  Copyright (C) 2001-2003 Hewlett-Packard Co.
3 #       Contributed by Stephane Eranian <eranian@hpl.hp.com>
4 #
5 # This file is part of the ELILO, the EFI Linux boot loader.
6 #
7 #  ELILO is free software; you can redistribute it and/or modify
8 #  it under the terms of the GNU General Public License as published by
9 #  the Free Software Foundation; either version 2, or (at your option)
10 #  any later version.
11 #
12 #  ELILO 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
15 #  GNU General Public License for more details.
16 #
17 #  You should have received a copy of the GNU General Public License
18 #  along with ELILO; see the file COPYING.  If not, write to the Free
19 #  Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 #  02111-1307, USA.
21 #
22 # Please check out the elilo.txt for complete documentation on how
23 # to use this program.
24 #
25
26 SRCDIR = .
27
28 VPATH = $(SRCDIR)
29
30 include $(SRCDIR)/../Make.defaults
31 include $(SRCDIR)/../Make.rules
32
33 TOPDIR=$(SRCDIR)/..
34
35
36 FILES=
37 ifeq ($(CONFIG_localfs),y)
38 FILES += localfs.o
39 endif
40
41 #
42 # Ext2 is now disabled by default. See top level Makefile
43 # for details
44 #
45 ifeq ($(CONFIG_ext2fs),y)
46 FILES += ext2fs.o
47 endif
48
49 ifeq ($(CONFIG_netfs),y)
50 FILES += netfs.o
51 endif
52
53
54 TARGET=fs.o
55
56 all: $(TARGET)
57
58 #
59 # XXX: does not trigger recompile when changing filesystem selection
60 #      without doing make clean.
61 #
62 $(TARGET): check-filesystems $(TOPDIR)/Make.defaults $(FILES)
63         $(LD) $(LD3264) -r -o $@ $(FILES)
64
65 clean:
66         $(RM) -f $(TARGET) $(FILES)
67
68 check-filesystems:
69         @if [ -n "$(FILES)" ]; then \
70                 exit 0; \
71         else \
72                 echo "You need to define at least one filesystem in Make.defaults"; \
73                 exit 1; \
74         fi
75