Skip to content

Commit

Permalink
pool: fix dependencies with pmempool
Browse files Browse the repository at this point in the history
Fix dependencies with pmempool.
Not all tools that include 'src/tools/Makefile.inc'
require linking with the common.o and output.o objects
from pmempool. Only pmempool itself, ddmap, pmemobjcli,
pmemspoil and pmemwrite tool require that.
  • Loading branch information
ldorau committed Jan 18, 2023
1 parent 06f10e7 commit 72dc4a6
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/test/tools/ddmap/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2016, Intel Corporation
# Copyright 2014-2023, Intel Corporation
#
# Makefile -- Makefile for ddmap tool
#
Expand All @@ -12,6 +12,7 @@ OBJS = ddmap.o

LIBPMEM=y
TOOLS_COMMON=y
TOOLS_PMEMPOOL_COMMON=y
LIBPMEMBLK_PRIV=btt_info_convert2h

include $(TOP)/src/tools/Makefile.inc
3 changes: 2 additions & 1 deletion src/test/tools/pmemobjcli/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2022, Intel Corporation
# Copyright 2014-2023, Intel Corporation
#
# Makefile -- Makefile for pmemalloc tool
#
Expand All @@ -13,6 +13,7 @@ OBJS = pmemobjcli.o
LIBPMEM=y
LIBPMEMOBJ=y
TOOLS_COMMON=y
TOOLS_PMEMPOOL_COMMON=y
LIBPMEMBLK_PRIV=btt_info_convert2h

include $(TOP)/src/tools/Makefile.inc
3 changes: 2 additions & 1 deletion src/test/tools/pmemspoil/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2022, Intel Corporation
# Copyright 2014-2023, Intel Corporation
#
# Makefile -- Makefile for pmemspoil tool
#
Expand All @@ -12,6 +12,7 @@ OBJS = spoil.o

LIBPMEM=y
TOOLS_COMMON=y
TOOLS_PMEMPOOL_COMMON=y
LIBPMEMBLK_PRIV=btt_info_convert2h

include $(TOP)/src/tools/Makefile.inc
3 changes: 2 additions & 1 deletion src/test/tools/pmemwrite/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2016, Intel Corporation
# Copyright 2014-2023, Intel Corporation
#
# Makefile -- Makefile for pmemwrite tool
#
Expand All @@ -14,6 +14,7 @@ LIBPMEM=y
LIBPMEMBLK=y
LIBPMEMLOG=y
TOOLS_COMMON=y
TOOLS_PMEMPOOL_COMMON=y
LIBPMEMBLK_PRIV=btt_info_convert2h

include $(TOP)/src/tools/Makefile.inc
12 changes: 6 additions & 6 deletions src/tools/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2022, Intel Corporation
# Copyright 2014-2023, Intel Corporation
#
# src/tools/Makefile.inc -- Makefile include for all tools
#
Expand Down Expand Up @@ -191,18 +191,18 @@ LIBS += $(LIBDL)
endif

ifeq ($(TOOLS_COMMON), y)
vpath %.c $(TOP)/src/tools/pmempool

OBJS += common.o output.o

CFLAGS += -I$(TOP)/src/core
CFLAGS += -I$(TOP)/src/common
CFLAGS += -I$(TOP)/src/libpmemlog
CFLAGS += -I$(TOP)/src/libpmemblk
CFLAGS += -I$(TOP)/src/libpmemobj
CFLAGS += -I$(TOP)/src/tools/pmempool
CFLAGS += $(UNIX98_CFLAGS)
endif

ifeq ($(TOOLS_PMEMPOOL_COMMON), y)
vpath %.c $(TOP)/src/tools/pmempool
CFLAGS += -I$(TOP)/src/tools/pmempool
OBJS += common.o output.o
endif

ifneq ($(LIBPMEMLOG_PRIV),)
Expand Down
3 changes: 2 additions & 1 deletion src/tools/pmempool/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2022, Intel Corporation
# Copyright 2014-2023, Intel Corporation
#
# Makefile -- top Makefile for pmempool
#
Expand All @@ -18,6 +18,7 @@ LIBPMEMOBJ=y
LIBPMEMLOG=y
LIBPMEMPOOL=y
TOOLS_COMMON=y
TOOLS_PMEMPOOL_COMMON=y

LIBPMEMOBJ_PRIV=memblock_from_offset alloc_class_by_id\
memblock_rebuild_state alloc_class_by_run\
Expand Down

0 comments on commit 72dc4a6

Please sign in to comment.