Skip to content

Commit 26019a2

Browse files
committed
Fixup various bits of incorrect automake usage
Signed-off-by: Mark Syms <[email protected]>
1 parent 706a266 commit 26019a2

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

cbt/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ sbin_PROGRAMS = cbt-util
99
noinst_LTLIBRARIES = libcbtutil.la
1010

1111
libcbtutil_la_SOURCES = cbt-util.c
12+
libcbtutil_la_LIBADD = -luuid
1213

1314
cbt_util_SOURCES = main.c
14-
cbt_util_LDADD = libcbtutil.la -lrt -luuid
15+
cbt_util_LDADD = libcbtutil.la
1516

1617
clean-local:
1718
-rm -rf *.gc??

mockatests/cbt/Makefile.am

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/cbt -I../include
1111
check_PROGRAMS = test-cbt-util
1212
TESTS = test-cbt-util
1313

14+
test_cbt_util_LDADD = $(top_srcdir)/cbt/libcbtutil.la ../wrappers/libwrappers.la
15+
1416
test_cbt_util_SOURCES = test-cbt-util.c test-cbt-util-commands.c test-cbt-util-set.c test-cbt-util-get.c test-cbt-util-create.c test-cbt-util-coalesce.c
15-
test_cbt_util_LDFLAGS = $(top_srcdir)/cbt/libcbtutil.la -lcmocka -luuid
16-
test_cbt_util_LDFLAGS += ../wrappers/libwrappers.la
17+
test_cbt_util_LDFLAGS = -lcmocka
1718
test_cbt_util_LDFLAGS += -Wl,--wrap=fopen,--wrap=fclose
1819
test_cbt_util_LDFLAGS += -Wl,--wrap=malloc,--wrap=free,--wrap=calloc
1920
# Need to wrap both of these as rpmbuild/mock set -D_FORTIFY_SOURCE=2

mockatests/control/Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/control -I../include
1111
check_PROGRAMS = test-control
1212
TESTS = test-control
1313

14-
test_control_SOURCES = test-control.c test-tap-ctl-free.c test-tap-ctl-allocate.c test-tap-ctl-close.c test-tap-ctl-list.c control-wrappers.c util.c
15-
test_control_LDFLAGS = $(top_srcdir)/control/libblktapctl.la -lcmocka -luuid
14+
test_control_LDADD = $(top_srcdir)/control/libblktapctl.la ../wrappers/libwrappers.la
1615

16+
test_control_SOURCES = test-control.c test-tap-ctl-free.c test-tap-ctl-allocate.c test-tap-ctl-close.c test-tap-ctl-list.c control-wrappers.c util.c
17+
test_control_LDFLAGS = -lcmocka
1718
test_control_LDFLAGS += -static-libtool-libs
18-
test_control_LDFLAGS += ../wrappers/libwrappers.la
1919
# Would be good to use the cmocka malloc wraps but looks like maybe strdup doesn't call malloc
2020
#test_control_LDFLAGS += -Wl,--wrap=malloc,--wrap=free
2121
test_control_LDFLAGS += -Wl,--wrap=socket,--wrap=connect,--wrap=read,--wrap=select,--wrap=write,--wrap=fdopen

mockatests/drivers/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/drivers -I../include
1111
check_PROGRAMS = test-drivers
1212
TESTS = test-drivers
1313

14+
test_drivers_LDADD = $(top_srcdir)/drivers/libtapdisk.la
15+
1416
test_drivers_SOURCES = test-drivers.c test-tapdisk-stats.c test-tapdisk-vbd.c vbd-wrappers.c test-tapdisk-nbdserver.c
15-
test_drivers_LDFLAGS = $(top_srcdir)/drivers/libtapdisk.la -lcmocka -luuid
17+
test_drivers_LDFLAGS = -lcmocka
1618
test_drivers_LDFLAGS += -Wl,--wrap=tapdisk_image_check_request
1719
test_drivers_LDFLAGS += -Wl,--wrap=td_queue_block_status
1820
test_drivers_LDFLAGS += -Wl,--wrap=send

mockatests/vhd/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/cbt -I../include
1212
check_PROGRAMS = test-vhd-util
1313
TESTS = test-vhd-util
1414

15+
test_vhd_util_LDADD = $(top_srcdir)/vhd/lib/libvhd.la
16+
1517
test_vhd_util_SOURCES = test-vhd-util.c test-vhd-util-snapshot.c test-canonpath.c test-vhd-util-utilities.c vhd-wrappers.c
16-
test_vhd_util_LDFLAGS = $(top_srcdir)/vhd/lib/libvhd.la -lcmocka -luuid
18+
test_vhd_util_LDFLAGS = -lcmocka
1719
test_vhd_util_LDFLAGS += -static-libtool-libs
1820
test_vhd_util_LDFLAGS += -Wl,--wrap=free,--wrap=malloc,--wrap=realloc
1921
test_vhd_util_LDFLAGS += -Wl,--wrap=canonpath

0 commit comments

Comments
 (0)