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 15 srcdir = . 16 top_srcdir = .. 17 top_builddir = .. 18 19 20 ifeq ("none", "shared") 21 SUBDIRS = format1 22 endif 23 24 ifeq ("internal", "shared") 25 SUBDIRS += format_pool 26 endif 27 28 ifeq ("internal", "shared") 29 SUBDIRS += snapshot 30 endif 31 32 ifeq ("internal", "shared") 33 SUBDIRS += mirror 34 endif 35 36 SOURCES =\ 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 93 ifeq ("", "yes") 94 SOURCES +=\ 95 misc/timestamp.c 96 endif 97 98 ifeq ("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 107 endif 108 109 ifeq ("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 115 endif 116 117 ifeq ("none", "internal") 118 SOURCES += locking/cluster_locking.c 119 endif 120 121 ifeq ("none", "shared") 122 SUBDIRS += locking 123 endif 124 125 ifeq ("internal", "internal") 126 SOURCES += snapshot/snapshot.c 127 endif 128 129 ifeq ("internal", "internal") 130 SOURCES += mirror/mirrored.c 131 endif 132 133 ifeq ("yes", "yes") 134 SOURCES +=\ 135 activate/dev_manager.c \ 136 activate/fs.c 137 endif 138 139 ifeq ("no", "yes") 140 SOURCES +=\ 141 locking/external_locking.c \ 142 misc/sharedlib.c 143 endif 144 145 ifeq ("", "yes") 146 CLDFLAGS += -L../daemons/dmeventd 147 LIBS += -ldevmapper-event 148 endif 149 150 LIB_NAME = liblvm-internal 151 LIB_STATIC = $(LIB_NAME).a 152 153 CLEAN_TARGETS += $(LIB_NAME).cflow 154 155 include ../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 165 cflow: $(LIB_NAME).cflow 166