blob: 896647140104afb61a52ebd467f7fcbcae102dca [file] [log] [blame]
include Makefile.am.in
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
SUBDIRS = . daxctl/lib ndctl/lib ndctl daxctl
if ENABLE_DOCS
SUBDIRS += Documentation/ndctl Documentation/daxctl
endif
SUBDIRS += test
BUILT_SOURCES = version.m4
version.m4: FORCE
$(AM_V_GEN)$(top_srcdir)/git-version-gen
FORCE:
noinst_SCRIPTS = rhel/ndctl.spec sles/ndctl.spec
CLEANFILES += $(noinst_SCRIPTS)
do_rhel_subst = sed -e 's,VERSION,$(VERSION),g' \
-e 's,DAX_DNAME,daxctl-devel,g' \
-e 's,DNAME,ndctl-devel,g' \
-e '/^%defattr.*/d' \
-e 's,DAX_LNAME,daxctl-libs,g' \
-e 's,LNAME,ndctl-libs,g'
do_sles_subst = sed -e 's,VERSION,$(VERSION),g' \
-e 's,DAX_DNAME,libdaxctl-devel,g' \
-e 's,DNAME,libndctl-devel,g' \
-e 's,%license,%doc,g' \
-e 's,\(^License:.*GPL\)v2,\1-2.0,g' \
-e "s,DAX_LNAME,libdaxctl$$(($(LIBDAXCTL_CURRENT) - $(LIBDAXCTL_AGE))),g" \
-e "s,LNAME,libndctl$$(($(LIBNDCTL_CURRENT) - $(LIBNDCTL_AGE))),g"
rhel/ndctl.spec: ndctl.spec.in Makefile.am version.m4
$(AM_V_GEN)$(MKDIR_P) rhel; $(do_rhel_subst) < $< > $@
sles/ndctl.spec: ndctl.spec.in Makefile.am version.m4
$(AM_V_GEN)$(MKDIR_P) sles; cat sles/header $< | $(do_sles_subst) > $@
if ENABLE_BASH_COMPLETION
bashcompletiondir = $(BASH_COMPLETION_DIR)
dist_bashcompletion_DATA = contrib/ndctl
endif
noinst_LIBRARIES = libccan.a
libccan_a_SOURCES = \
ccan/str/str.h \
ccan/str/str_debug.h \
ccan/str/str.c \
ccan/str/debug.c \
ccan/container_of/container_of.h \
ccan/check_type/check_type.h \
ccan/build_assert/build_assert.h \
ccan/short_types/short_types.h \
ccan/endian/endian.h
noinst_LIBRARIES += libutil.a
libutil_a_SOURCES = \
../lib/subcmd/exec-cmd.c \
../lib/subcmd/help.c \
../lib/subcmd/pager.c \
../lib/subcmd/parse-options.c \
../lib/subcmd/run-command.c \
../lib/subcmd/sigchain.c \
../lib/subcmd/subcmd-config.c \
../lib/str_error_r.c \
../lib/find_bit.c \
util/usage.c \
util/size.c \
util/main.c \
util/help.c \
util/strbuf.c \
util/wrapper.c \
util/filter.c \
util/fletcher.c
nobase_include_HEADERS = daxctl/libdaxctl.h