1# 2# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. 3# Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. 4# 5# This file is part of LVM2. 6# 7# This copyrighted material is made available to anyone wishing to use, 8# modify, copy, or redistribute it subject to the terms and conditions 9# of the GNU General Public License v.2. 10# 11# You should have received a copy of the GNU General Public License 12# along with this program; if not, write to the Free Software Foundation, 13# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14 15srcdir = . 16top_srcdir = . 17top_builddir = . 18 19 20SUBDIRS = doc include man scripts 21 22ifeq ("no", "yes") 23 SUBDIRS += udev 24endif 25 26ifeq ("no", "yes") 27 SUBDIRS += po 28endif 29 30SUBDIRS += lib tools daemons libdm 31 32ifeq ("no", "yes") 33 SUBDIRS += liblvm 34endif 35 36ifeq ($(MAKECMDGOALS),distclean) 37 SUBDIRS += daemons/clvmd \ 38 daemons/cmirrord \ 39 daemons/dmeventd/plugins \ 40 daemons/dmeventd \ 41 lib/format1 \ 42 lib/format_pool \ 43 lib/locking \ 44 lib/mirror \ 45 lib/snapshot \ 46 liblvm \ 47 udev \ 48 test/api \ 49 test \ 50 po 51 DISTCLEAN_TARGETS += lib/misc/configure.h lib/misc/lvm-version.h 52 DISTCLEAN_DIRS += lcov_reports* 53endif 54 55include make.tmpl 56 57libdm: include 58lib: libdm 59liblvm: lib 60daemons: lib tools 61tools: lib device-mapper 62po: tools daemons 63 64libdm.device-mapper: include.device-mapper 65daemons.device-mapper: libdm.device-mapper 66tools.device-mapper: libdm.device-mapper 67device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper 68 69ifeq ("no", "yes") 70lib.pofile: include.pofile 71tools.pofile: lib.pofile 72daemons.pofile: lib.pofile 73po.pofile: tools.pofile daemons.pofile 74pofile: po.pofile 75endif 76 77ifneq ("", "") 78tools.cflow: lib.cflow 79cflow: tools.cflow 80endif 81 82ifneq ("", "") 83cscope.out: tools 84 -b -R 85all: cscope.out 86endif 87 88check: all 89 $(MAKE) -C test all 90 91ifneq ("", "") 92.PHONY: lcov-reset lcov lcov-dated 93 94ifeq ($(MAKECMDGOALS),lcov-dated) 95LCOV_REPORTS_DIR=$(top_srcdir)/lcov_reports-$(shell date +%Y%m%d%k%M%S) 96else 97LCOV_REPORTS_DIR=$(top_srcdir)/lcov_reports 98endif 99 100lcov-reset: 101 $(LCOV) -d $(top_srcdir)/dmeventd --zerocounters 102 $(LCOV) -d $(top_srcdir)/libdm --zerocounters 103 $(LCOV) -d $(top_srcdir)/lib --zerocounters 104 $(LCOV) -d $(top_srcdir)/tools --zerocounters 105 106lcov: all 107 $(RM) -rf $(LCOV_REPORTS_DIR) 108 $(MKDIR_P) $(LCOV_REPORTS_DIR) 109 $(LCOV) -b $(top_srcdir)/libdm -d $(top_srcdir)/libdm -c -o $(LCOV_REPORTS_DIR)/libdm.info 110 $(LCOV) -b $(top_srcdir)/lib -d $(top_srcdir)/lib -c -o $(LCOV_REPORTS_DIR)/lib.info 111 $(LCOV) -b $(top_srcdir)/tools -d $(top_srcdir)/tools -c -o $(LCOV_REPORTS_DIR)/tools.info 112 DMEVENTD_INFO="$(LCOV_REPORTS_DIR)/dmeventd.info" ;\ 113 DMEVENTD_INFO_A="-a $$DMEVENTDINFO" ;\ 114 $(LCOV) -b $(top_srcdir)/dmeventd -d $(top_srcdir)/dmeventd -c -o $$DMEVENTD_INFO || DMEVENTD_INFO_A="" ;\ 115 $(LCOV) $$DMEVENTD_INFO_A -a $(LCOV_REPORTS_DIR)/lib.info \ 116 -a $(LCOV_REPORTS_DIR)/libdm.info \ 117 -a $(LCOV_REPORTS_DIR)/tools.info \ 118 -o $(LCOV_REPORTS_DIR)/lvm.info 119ifneq ("", "") 120 $(GENHTML) -o $(LCOV_REPORTS_DIR) -p $(top_srcdir) $(LCOV_REPORTS_DIR)/lvm.info 121endif 122 123lcov-dated: lcov 124 125endif 126