1# 2# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. 3# Copyright (C) 2004-2009 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 20ifeq ("none", "shared") 21 SUBDIRS = format1 22endif 23 24ifeq ("internal", "shared") 25 SUBDIRS += format_pool 26endif 27 28ifeq ("internal", "shared") 29 SUBDIRS += snapshot 30endif 31 32ifeq ("internal", "shared") 33 SUBDIRS += mirror 34endif 35 36SOURCES =\ 37 activate/activate.c \ 38 cache/lvmcache.c \ 39 commands/toolcontext.c \ 40 config/config.c \ 41 datastruct/btree.c \ 42 datastruct/str_list.c \ 43 device/dev-cache.c \ 44 device/dev-io.c \ 45 device/dev-md.c \ 46 device/dev-swap.c \ 47 device/device.c \ 48 display/display.c \ 49 error/errseg.c \ 50 unknown/unknown.c \ 51 filters/filter-composite.c \ 52 filters/filter-persistent.c \ 53 filters/filter-regex.c \ 54 filters/filter-sysfs.c \ 55 filters/filter-md.c \ 56 filters/filter.c \ 57 format_text/archive.c \ 58 format_text/archiver.c \ 59 format_text/export.c \ 60 format_text/flags.c \ 61 format_text/format-text.c \ 62 format_text/import.c \ 63 format_text/import_vsn1.c \ 64 format_text/tags.c \ 65 format_text/text_label.c \ 66 freeseg/freeseg.c \ 67 label/label.c \ 68 locking/file_locking.c \ 69 locking/locking.c \ 70 locking/no_locking.c \ 71 log/log.c \ 72 metadata/lv_manip.c \ 73 metadata/merge.c \ 74 metadata/metadata.c \ 75 metadata/mirror.c \ 76 metadata/pv_manip.c \ 77 metadata/pv_map.c \ 78 metadata/segtype.c \ 79 metadata/snapshot_manip.c \ 80 misc/crc.c \ 81 misc/lvm-exec.c \ 82 misc/lvm-file.c \ 83 misc/lvm-globals.c \ 84 misc/lvm-string.c \ 85 misc/lvm-wrappers.c \ 86 misc/util.c \ 87 mm/memlock.c \ 88 report/report.c \ 89 striped/striped.c \ 90 uuid/uuid.c \ 91 zero/zero.c 92 93ifeq ("", "yes") 94 SOURCES +=\ 95 misc/timestamp.c 96endif 97 98ifeq ("none", "internal") 99 SOURCES +=\ 100 format1/disk-rep.c \ 101 format1/format1.c \ 102 format1/import-export.c \ 103 format1/import-extents.c \ 104 format1/layout.c \ 105 format1/lvm1-label.c \ 106 format1/vg_number.c 107endif 108 109ifeq ("internal", "internal") 110 SOURCES +=\ 111 format_pool/disk_rep.c \ 112 format_pool/format_pool.c \ 113 format_pool/import_export.c \ 114 format_pool/pool_label.c 115endif 116 117ifeq ("none", "internal") 118 SOURCES += locking/cluster_locking.c 119endif 120 121ifeq ("none", "shared") 122 SUBDIRS += locking 123endif 124 125ifeq ("internal", "internal") 126 SOURCES += snapshot/snapshot.c 127endif 128 129ifeq ("internal", "internal") 130 SOURCES += mirror/mirrored.c 131endif 132 133ifeq ("yes", "yes") 134 SOURCES +=\ 135 activate/dev_manager.c \ 136 activate/fs.c 137endif 138 139ifeq ("no", "yes") 140 SOURCES +=\ 141 locking/external_locking.c \ 142 misc/sharedlib.c 143endif 144 145ifeq ("", "yes") 146 CLDFLAGS += -L../daemons/dmeventd 147 LIBS += -ldevmapper-event 148endif 149 150LIB_NAME = liblvm-internal 151LIB_STATIC = $(LIB_NAME).a 152 153CLEAN_TARGETS += $(LIB_NAME).cflow 154 155include ../make.tmpl 156 157$(SUBDIRS): $(LIB_STATIC) 158 159$(LIB_NAME).cflow: $(SOURCES) 160 set -e; (echo -n "SOURCES += "; \ 161 echo $(SOURCES) | \ 162 sed "s/^/ /;s/ / $(top_srcdir)\/lib\//g;s/$$//"; \ 163 ) > $@ 164 165cflow: $(LIB_NAME).cflow 166