blob: 502271ebb65e4909e3bf25c002a0b441c4a3a286 [file] [log] [blame]
include $(top_srcdir)/Makefile.am.in
bin_PROGRAMS = ndctl
DISTCLEANFILES = config.h
BUILT_SOURCES = config.h
config.h: $(srcdir)/Makefile.am
$(AM_V_GEN) echo "/* Autogenerated by ndctl/Makefile.am */" >$@ && \
echo '#define NDCTL_CONF_FILE \
"$(ndctl_monitorconfdir)/$(ndctl_monitorconf)"' >>$@
$(AM_V_GEN) echo '#define NDCTL_KEYS_DIR "$(ndctl_keysdir)"' >>$@
ndctl_SOURCES = ndctl.c \
bus.c \
create-nfit.c \
namespace.c \
check.c \
region.c \
dimm.c \
../util/log.c \
list.c \
../util/json.c \
util/json-smart.c \
util/json-firmware.c \
inject-error.c \
inject-smart.c \
monitor.c
if ENABLE_KEYUTILS
ndctl_SOURCES += util/keys.c \
load-keys.c
keys_configdir = $(ndctl_keysdir)
keys_config_DATA = $(ndctl_keysreadme)
endif
if ENABLE_DESTRUCTIVE
ndctl_SOURCES += ../test/blk_namespaces.c \
../test/pmem_namespaces.c
ndctl_SOURCES += bat.c
endif
ndctl_LDADD =\
lib/libndctl.la \
../daxctl/lib/libdaxctl.la \
../libutil.a \
$(UUID_LIBS) \
$(KMOD_LIBS) \
$(JSON_LIBS)
if ENABLE_KEYUTILS
ndctl_LDADD += -lkeyutils
endif
if ENABLE_TEST
ndctl_SOURCES += ../test/libndctl.c \
../test/dsm-fail.c \
../util/sysfs.c \
../test/dpa-alloc.c \
../test/parent-uuid.c \
../test/multi-pmem.c \
../test/core.c \
test.c
endif
monitor_configdir = $(ndctl_monitorconfdir)
monitor_config_DATA = $(ndctl_monitorconf)
if ENABLE_SYSTEMD_UNITS
systemd_unit_DATA = ndctl-monitor.service
endif