| 1 |
|
| 2 |
# blkid.h is generated, so it's stored in builddir! |
| 3 |
blkidincdir = $(includedir)/blkid |
| 4 |
nodist_blkidinc_HEADERS = libblkid/src/blkid.h |
| 5 |
|
| 6 |
usrlib_exec_LTLIBRARIES += libblkid.la |
| 7 |
libblkid_la_SOURCES = \ |
| 8 |
include/list.h \ |
| 9 |
\ |
| 10 |
libblkid/src/blkidP.h \ |
| 11 |
libblkid/src/init.c \ |
| 12 |
libblkid/src/cache.c \ |
| 13 |
libblkid/src/config.c \ |
| 14 |
libblkid/src/dev.c \ |
| 15 |
libblkid/src/devname.c \ |
| 16 |
libblkid/src/devno.c \ |
| 17 |
libblkid/src/encode.c \ |
| 18 |
libblkid/src/evaluate.c \ |
| 19 |
libblkid/src/getsize.c \ |
| 20 |
libblkid/src/probe.c \ |
| 21 |
libblkid/src/read.c \ |
| 22 |
libblkid/src/resolve.c \ |
| 23 |
libblkid/src/save.c \ |
| 24 |
libblkid/src/superblocks/superblocks.h \ |
| 25 |
libblkid/src/tag.c \ |
| 26 |
libblkid/src/verify.c \ |
| 27 |
libblkid/src/version.c \ |
| 28 |
\ |
| 29 |
libblkid/src/partitions/aix.c \ |
| 30 |
libblkid/src/partitions/aix.h \ |
| 31 |
libblkid/src/partitions/atari.c \ |
| 32 |
libblkid/src/partitions/bsd.c \ |
| 33 |
libblkid/src/partitions/dos.c \ |
| 34 |
libblkid/src/partitions/gpt.c \ |
| 35 |
libblkid/src/partitions/mac.c \ |
| 36 |
libblkid/src/partitions/minix.c \ |
| 37 |
libblkid/src/partitions/partitions.c \ |
| 38 |
libblkid/src/partitions/partitions.h \ |
| 39 |
libblkid/src/partitions/sgi.c \ |
| 40 |
libblkid/src/partitions/solaris_x86.c \ |
| 41 |
libblkid/src/partitions/sun.c \ |
| 42 |
libblkid/src/partitions/ultrix.c \ |
| 43 |
libblkid/src/partitions/unixware.c \ |
| 44 |
\ |
| 45 |
libblkid/src/superblocks/adaptec_raid.c \ |
| 46 |
libblkid/src/superblocks/apfs.c \ |
| 47 |
libblkid/src/superblocks/bcache.c \ |
| 48 |
libblkid/src/superblocks/befs.c \ |
| 49 |
libblkid/src/superblocks/bfs.c \ |
| 50 |
libblkid/src/superblocks/bitlocker.c \ |
| 51 |
libblkid/src/superblocks/bluestore.c \ |
| 52 |
libblkid/src/superblocks/btrfs.c \ |
| 53 |
libblkid/src/superblocks/cs_fvault2.c \ |
| 54 |
libblkid/src/superblocks/cramfs.c \ |
| 55 |
libblkid/src/superblocks/ddf_raid.c \ |
| 56 |
libblkid/src/superblocks/drbd.c \ |
| 57 |
libblkid/src/superblocks/drbdproxy_datalog.c \ |
| 58 |
libblkid/src/superblocks/drbdmanage.c \ |
| 59 |
libblkid/src/superblocks/exfat.c \ |
| 60 |
libblkid/src/superblocks/exfs.c \ |
| 61 |
libblkid/src/superblocks/ext.c \ |
| 62 |
libblkid/src/superblocks/f2fs.c \ |
| 63 |
libblkid/src/superblocks/gfs.c \ |
| 64 |
libblkid/src/superblocks/hfs.c \ |
| 65 |
libblkid/src/superblocks/highpoint_raid.c \ |
| 66 |
libblkid/src/superblocks/hpfs.c \ |
| 67 |
libblkid/src/superblocks/iso9660.c \ |
| 68 |
libblkid/src/superblocks/isw_raid.c \ |
| 69 |
libblkid/src/superblocks/jfs.c \ |
| 70 |
libblkid/src/superblocks/jmicron_raid.c \ |
| 71 |
libblkid/src/superblocks/linux_raid.c \ |
| 72 |
libblkid/src/superblocks/lsi_raid.c \ |
| 73 |
libblkid/src/superblocks/luks.c \ |
| 74 |
libblkid/src/superblocks/lvm.c \ |
| 75 |
libblkid/src/superblocks/minix.c \ |
| 76 |
libblkid/src/superblocks/mpool.c \ |
| 77 |
libblkid/src/superblocks/netware.c \ |
| 78 |
libblkid/src/superblocks/nilfs.c \ |
| 79 |
libblkid/src/superblocks/ntfs.c \ |
| 80 |
libblkid/src/superblocks/refs.c \ |
| 81 |
libblkid/src/superblocks/nvidia_raid.c \ |
| 82 |
libblkid/src/superblocks/ocfs.c \ |
| 83 |
libblkid/src/superblocks/promise_raid.c \ |
| 84 |
libblkid/src/superblocks/reiserfs.c \ |
| 85 |
libblkid/src/superblocks/romfs.c \ |
| 86 |
libblkid/src/superblocks/scoutfs.c \ |
| 87 |
libblkid/src/superblocks/silicon_raid.c \ |
| 88 |
libblkid/src/superblocks/squashfs.c \ |
| 89 |
libblkid/src/superblocks/stratis.c \ |
| 90 |
libblkid/src/superblocks/superblocks.c \ |
| 91 |
libblkid/src/superblocks/superblocks.h \ |
| 92 |
libblkid/src/superblocks/swap.c \ |
| 93 |
libblkid/src/superblocks/sysv.c \ |
| 94 |
libblkid/src/superblocks/ubi.c \ |
| 95 |
libblkid/src/superblocks/ubifs.c \ |
| 96 |
libblkid/src/superblocks/udf.c \ |
| 97 |
libblkid/src/superblocks/ufs.c \ |
| 98 |
libblkid/src/superblocks/vdo.c \ |
| 99 |
libblkid/src/superblocks/vfat.c \ |
| 100 |
libblkid/src/superblocks/via_raid.c \ |
| 101 |
libblkid/src/superblocks/vmfs.c \ |
| 102 |
libblkid/src/superblocks/vxfs.c \ |
| 103 |
libblkid/src/superblocks/xfs.c \ |
| 104 |
libblkid/src/superblocks/zfs.c \ |
| 105 |
libblkid/src/superblocks/zonefs.c \ |
| 106 |
libblkid/src/superblocks/erofs.c \ |
| 107 |
\ |
| 108 |
libblkid/src/topology/topology.c \ |
| 109 |
libblkid/src/topology/topology.h |
| 110 |
|
| 111 |
if LINUX |
| 112 |
libblkid_la_SOURCES += \ |
| 113 |
libblkid/src/topology/dm.c \ |
| 114 |
libblkid/src/topology/evms.c \ |
| 115 |
libblkid/src/topology/ioctl.c \ |
| 116 |
libblkid/src/topology/lvm.c \ |
| 117 |
libblkid/src/topology/md.c \ |
| 118 |
libblkid/src/topology/sysfs.c |
| 119 |
endif |
| 120 |
|
| 121 |
libblkid_la_LIBADD = libcommon.la |
| 122 |
if HAVE_ECONF |
| 123 |
libblkid_la_LIBADD += -leconf |
| 124 |
endif |
| 125 |
|
| 126 |
EXTRA_libblkid_la_DEPENDENCIES = \ |
| 127 |
libblkid/src/libblkid.sym |
| 128 |
|
| 129 |
libblkid_la_CFLAGS = \ |
| 130 |
$(AM_CFLAGS) \ |
| 131 |
$(SOLIB_CFLAGS) \ |
| 132 |
-I$(ul_libblkid_incdir) \ |
| 133 |
-I$(top_srcdir)/libblkid/src |
| 134 |
|
| 135 |
libblkid_la_LDFLAGS = $(SOLIB_LDFLAGS) |
| 136 |
if HAVE_VSCRIPT |
| 137 |
libblkid_la_LDFLAGS += $(VSCRIPT_LDFLAGS),$(top_srcdir)/libblkid/src/libblkid.sym |
| 138 |
endif |
| 139 |
libblkid_la_LDFLAGS += -version-info $(LIBBLKID_VERSION_INFO) |
| 140 |
|
| 141 |
EXTRA_DIST += \ |
| 142 |
libblkid/src/libblkid.sym |
| 143 |
|
| 144 |
if BUILD_LIBBLKID_TESTS |
| 145 |
check_PROGRAMS += \ |
| 146 |
test_blkid_cache \ |
| 147 |
test_blkid_config \ |
| 148 |
test_blkid_dev \ |
| 149 |
test_blkid_devname \ |
| 150 |
test_blkid_devno \ |
| 151 |
test_blkid_evaluate \ |
| 152 |
test_blkid_read \ |
| 153 |
test_blkid_resolve \ |
| 154 |
test_blkid_save \ |
| 155 |
test_blkid_tag \ |
| 156 |
test_blkid_verify |
| 157 |
|
| 158 |
blkid_tests_cflags = -DTEST_PROGRAM $(libblkid_la_CFLAGS) |
| 159 |
blkid_tests_ldflags = |
| 160 |
blkid_tests_ldadd = $(LDADD) libblkid.la |
| 161 |
blkid_tests_ldflags += -static |
| 162 |
|
| 163 |
test_blkid_cache_SOURCES = libblkid/src/cache.c |
| 164 |
test_blkid_cache_CFLAGS = $(blkid_tests_cflags) |
| 165 |
test_blkid_cache_LDFLAGS = $(blkid_tests_ldflags) |
| 166 |
test_blkid_cache_LDADD = $(blkid_tests_ldadd) |
| 167 |
|
| 168 |
test_blkid_config_SOURCES = libblkid/src/config.c |
| 169 |
test_blkid_config_CFLAGS = $(blkid_tests_cflags) |
| 170 |
test_blkid_config_LDFLAGS = $(blkid_tests_ldflags) |
| 171 |
test_blkid_config_LDADD = $(blkid_tests_ldadd) |
| 172 |
|
| 173 |
test_blkid_dev_SOURCES = libblkid/src/dev.c |
| 174 |
test_blkid_dev_CFLAGS = $(blkid_tests_cflags) |
| 175 |
test_blkid_dev_LDFLAGS = $(blkid_tests_ldflags) |
| 176 |
test_blkid_dev_LDADD = $(blkid_tests_ldadd) |
| 177 |
|
| 178 |
test_blkid_devname_SOURCES = libblkid/src/devname.c |
| 179 |
test_blkid_devname_CFLAGS = $(blkid_tests_cflags) |
| 180 |
test_blkid_devname_LDFLAGS = $(blkid_tests_ldflags) |
| 181 |
test_blkid_devname_LDADD = $(blkid_tests_ldadd) |
| 182 |
|
| 183 |
test_blkid_devno_SOURCES = libblkid/src/devno.c |
| 184 |
test_blkid_devno_CFLAGS = $(blkid_tests_cflags) |
| 185 |
test_blkid_devno_LDFLAGS = $(blkid_tests_ldflags) |
| 186 |
test_blkid_devno_LDADD = $(blkid_tests_ldadd) |
| 187 |
|
| 188 |
test_blkid_evaluate_SOURCES = libblkid/src/evaluate.c |
| 189 |
test_blkid_evaluate_CFLAGS = $(blkid_tests_cflags) |
| 190 |
test_blkid_evaluate_LDFLAGS = $(blkid_tests_ldflags) |
| 191 |
test_blkid_evaluate_LDADD = $(blkid_tests_ldadd) |
| 192 |
|
| 193 |
test_blkid_read_SOURCES = libblkid/src/read.c |
| 194 |
test_blkid_read_CFLAGS = $(blkid_tests_cflags) |
| 195 |
test_blkid_read_LDFLAGS = $(blkid_tests_ldflags) |
| 196 |
test_blkid_read_LDADD = $(blkid_tests_ldadd) |
| 197 |
|
| 198 |
test_blkid_resolve_SOURCES = libblkid/src/resolve.c |
| 199 |
test_blkid_resolve_CFLAGS = $(blkid_tests_cflags) |
| 200 |
test_blkid_resolve_LDFLAGS = $(blkid_tests_ldflags) |
| 201 |
test_blkid_resolve_LDADD = $(blkid_tests_ldadd) |
| 202 |
|
| 203 |
test_blkid_save_SOURCES = libblkid/src/save.c |
| 204 |
test_blkid_save_CFLAGS = $(blkid_tests_cflags) |
| 205 |
test_blkid_save_LDFLAGS = $(blkid_tests_ldflags) |
| 206 |
test_blkid_save_LDADD = $(blkid_tests_ldadd) |
| 207 |
|
| 208 |
test_blkid_tag_SOURCES = libblkid/src/tag.c |
| 209 |
test_blkid_tag_CFLAGS = $(blkid_tests_cflags) |
| 210 |
test_blkid_tag_LDFLAGS = $(blkid_tests_ldflags) |
| 211 |
test_blkid_tag_LDADD = $(blkid_tests_ldadd) |
| 212 |
|
| 213 |
test_blkid_verify_SOURCES = libblkid/src/verify.c |
| 214 |
test_blkid_verify_CFLAGS = $(blkid_tests_cflags) |
| 215 |
test_blkid_verify_LDFLAGS = $(blkid_tests_ldflags) |
| 216 |
test_blkid_verify_LDADD = $(blkid_tests_ldadd) |
| 217 |
|
| 218 |
if FUZZING_ENGINE |
| 219 |
check_PROGRAMS += test_blkid_fuzz |
| 220 |
|
| 221 |
test_blkid_fuzz_SOURCES = libblkid/src/fuzz.c |
| 222 |
|
| 223 |
# https://google.github.io/oss-fuzz/getting-started/new-project-guide/#Requirements |
| 224 |
nodist_EXTRA_test_blkid_fuzz_SOURCES = dummy.cxx |
| 225 |
|
| 226 |
test_blkid_fuzz_CFLAGS = $(blkid_tests_cflags) -DFUZZ_TARGET |
| 227 |
test_blkid_fuzz_LDFLAGS = $(blkid_tests_ldflags) $(PTHREAD_LIBS) |
| 228 |
test_blkid_fuzz_LDADD = $(blkid_tests_ldadd) $(LIB_FUZZING_ENGINE) |
| 229 |
endif |
| 230 |
|
| 231 |
check_PROGRAMS += test_blkid_fuzz_sample |
| 232 |
|
| 233 |
test_blkid_fuzz_sample_SOURCES = libblkid/src/fuzz.c |
| 234 |
|
| 235 |
test_blkid_fuzz_sample_CFLAGS = $(blkid_tests_cflags) |
| 236 |
test_blkid_fuzz_sample_LDFLAGS = $(blkid_tests_ldflags) |
| 237 |
test_blkid_fuzz_sample_LDADD = $(blkid_tests_ldadd) |
| 238 |
|
| 239 |
endif # BUILD_LIBBLKID_TESTS |
| 240 |
|
| 241 |
# move lib from $(usrlib_execdir) to $(libdir) if needed |
| 242 |
install-exec-hook-libblkid: |
| 243 |
if test "$(usrlib_execdir)" != "$(libdir)" -a -f "$(DESTDIR)$(usrlib_execdir)/libblkid.so"; then \ |
| 244 |
$(MKDIR_P) $(DESTDIR)$(libdir); \ |
| 245 |
mv $(DESTDIR)$(usrlib_execdir)/libblkid.so.* $(DESTDIR)$(libdir); \ |
| 246 |
so_img_name=$$(readlink $(DESTDIR)$(usrlib_execdir)/libblkid.so); \ |
| 247 |
so_img_rel_target=$$(echo $(usrlib_execdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ |
| 248 |
(cd $(DESTDIR)$(usrlib_execdir) && \ |
| 249 |
rm -f libblkid.so && \ |
| 250 |
$(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libblkid.so); \ |
| 251 |
fi |
| 252 |
|
| 253 |
uninstall-hook-libblkid: |
| 254 |
rm -f $(DESTDIR)$(libdir)/libblkid.so* |
| 255 |
|
| 256 |
INSTALL_EXEC_HOOKS += install-exec-hook-libblkid |
| 257 |
UNINSTALL_HOOKS += uninstall-hook-libblkid |