]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - Makefile
add .gitignore file
[thirdparty/xfsprogs-dev.git] / Makefile
CommitLineData
fc49813f 1#
82805b60 2# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
dfc130f3 3#
fc49813f
NS
4
5TOPDIR = .
6HAVE_BUILDDEFS = $(shell test -f $(TOPDIR)/include/builddefs && echo yes || echo no)
7
8ifeq ($(HAVE_BUILDDEFS), yes)
9include $(TOPDIR)/include/builddefs
10endif
11
07c561fe
AG
12CONFIGURE = aclocal.m4 configure config.guess config.sub \
13 ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 \
14 m4/ltversion.m4 m4/lt~obsolete.m4 \
15 include/builddefs include/platform_defs.h
16LSRCFILES = configure.in Makepkgs install-sh README VERSION $(CONFIGURE)
f937adac 17
6c6508ec 18LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
99ec8857 19 Logs/* built .census install.* install-dev.* *.gz
f937adac 20
bf3256b2 21LIB_SUBDIRS = libxfs libxlog libxcmd libhandle libdisk
c988ea91 22TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \
2a519b73 23 mdrestore repair rtcp m4 man doc po debian build
fc49813f 24
bf3256b2 25SUBDIRS = include $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
2a519b73 26
07c561fe 27default: configure include/builddefs include/platform_defs.h
fc49813f
NS
28ifeq ($(HAVE_BUILDDEFS), no)
29 $(MAKE) -C . $@
30else
2a519b73 31 $(MAKE) $(SUBDIRS)
fc49813f
NS
32endif
33
2a519b73 34# tool/lib dependencies
bf3256b2 35$(LIB_SUBDIRS) $(TOOL_SUBDIRS): include
2a519b73
BN
36copy mdrestore: libxfs
37db logprint: libxfs libxlog
bf3256b2 38fsr: libhandle
2a519b73
BN
39growfs: libxfs libxcmd
40io: libxcmd libhandle
41mkfs: libxfs libdisk
42quota: libxcmd
43repair: libxfs libxlog
44
fc49813f
NS
45ifeq ($(HAVE_BUILDDEFS), yes)
46include $(BUILDRULES)
47else
48clean: # if configure hasn't run, nothing to clean
49endif
50
07c561fe
AG
51# Recent versions of libtool require the -i option for copying auxiliary
52# files (config.sub, config.guess, install-sh, ltmain.sh), while older
53# versions will copy those files anyway, and don't understand -i.
54LIBTOOLIZE_INSTALL = `libtoolize -n -i >/dev/null 2>/dev/null && echo -i`
55
fd81c504 56configure include/builddefs:
07c561fe
AG
57 libtoolize -c $(LIBTOOLIZE_INSTALL) -f
58 cp include/install-sh .
59 aclocal -I m4
fc49813f 60 autoconf
6c6508ec
NS
61 ./configure \
62 --prefix=/ \
63 --exec-prefix=/ \
64 --sbindir=/sbin \
65 --bindir=/usr/sbin \
66 --libdir=/lib \
67 --libexecdir=/usr/lib \
82805b60 68 --enable-lib64=yes \
6c6508ec
NS
69 --includedir=/usr/include \
70 --mandir=/usr/share/man \
71 --datadir=/usr/share \
72 $$LOCAL_CONFIGURE_OPTIONS
f937adac 73 touch .census
fc49813f 74
2a519b73
BN
75include/platform_defs.h: include/builddefs
76## Recover from the removal of $@
77 @if test -f $@; then :; else \
78 rm -f include/builddefs; \
79 $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \
80 fi
81
2a519b73 82install: default $(addsuffix -install,$(SUBDIRS))
fc49813f
NS
83 $(INSTALL) -m 755 -d $(PKG_DOC_DIR)
84 $(INSTALL) -m 644 README $(PKG_DOC_DIR)
85
2a519b73
BN
86install-dev: default $(addsuffix -install-dev,$(SUBDIRS))
87
88install-qa: install $(addsuffix -install-qa,$(SUBDIRS))
89
90%-install:
91 $(MAKE) -C $* install
92
93%-install-dev:
94 $(MAKE) -C $* install-dev
fc49813f 95
2a519b73
BN
96%-install-qa:
97 $(MAKE) -C $* install-qa
5e656dbb 98
fc49813f
NS
99realclean distclean: clean
100 rm -f $(LDIRT) $(CONFIGURE)
07c561fe 101 rm -f include/builddefs include/config.h install-sh libtool
16c44ed2 102 rm -rf autom4te.cache Logs