2 # Copyright (C) 2000-2008, 2011 SGI All Rights Reserved.
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 2 of the
7 # License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 ifeq ("$(origin V)", "command line")
27 ifeq ($(BUILD_VERBOSE),1)
33 MAKEOPTS = --no-print-directory Q=$(Q)
36 HAVE_BUILDDEFS = $(shell test -f $(TOPDIR)/include/builddefs && echo yes || echo no)
38 ifeq ($(HAVE_BUILDDEFS), yes)
39 include $(TOPDIR)/include/builddefs
42 TESTS = $(shell sed -n -e '/^[0-9][0-9][0-9]*/s/ .*//p' group)
43 CONFIGURE = configure include/builddefs include/config.h
44 LSRCFILES = configure configure.ac aclocal.m4 README VERSION
45 LDIRT = config.log .ltdep .dep config.status config.cache confdefs.h \
46 conftest* check.log check.time
49 LIB_SUBDIRS = include lib
50 TOOL_SUBDIRS = ltp src m4
51 ifeq ($(HAVE_DMAPI), true)
55 SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
57 default: include/builddefs $(DMAPI_MAKEFILE) $(TESTS)
58 ifeq ($(HAVE_BUILDDEFS), no)
59 $(Q)$(MAKE) $(MAKEOPTS) $@
61 $(Q)$(MAKE) $(MAKEOPTS) $(SUBDIRS)
64 # tool/lib dependencies
65 $(TOOL_SUBDIRS): $(LIB_SUBDIRS)
67 ifeq ($(HAVE_BUILDDEFS), yes)
70 clean: # if configure hasn't run, nothing to clean
73 configure: configure.ac
77 include/builddefs include/config.h: configure
79 --libexecdir=/usr/lib \
83 aclocal --acdir=`pwd`/m4 --output=$@
85 depend: include/builddefs $(addsuffix -depend,$(SUBDIRS))
87 install: default $(addsuffix -install,$(SUBDIRS))
88 $(INSTALL) -m 755 -d $(PKG_LIB_DIR)
89 $(INSTALL) -m 755 check $(PKG_LIB_DIR)
90 $(INSTALL) -m 755 [0-9]?? $(PKG_LIB_DIR)
91 $(INSTALL) -m 755 run.* $(PKG_LIB_DIR)
92 $(INSTALL) -m 644 group $(PKG_LIB_DIR)
93 $(INSTALL) -m 644 randomize.awk $(PKG_LIB_DIR)
94 $(INSTALL) -m 644 [0-9]??.* $(PKG_LIB_DIR)
95 $(INSTALL) -m 644 common* $(PKG_LIB_DIR)
98 install-dev install-lib:
101 $(MAKE) $(MAKEOPTS) -C $* install
103 realclean distclean: clean
104 $(Q)rm -f $(LDIRT) $(CONFIGURE)
105 $(Q)rm -rf autom4te.cache Logs