2014-03-16 11:38:19 +04:00
LIBSUBDIRS = src src-cpp
2012-09-19 14:26:37 +04:00
2014-03-16 11:38:19 +04:00
CHECK_FILES += CONFIGURATION.md \
examples/rdkafka_example examples/rdkafka_performance \
examples/rdkafka_example_cpp
2012-09-19 14:26:37 +04:00
2015-12-02 21:28:53 +03:00
PACKAGE_NAME ?= librdkafka
2016-01-13 14:52:34 +03:00
VERSION ?= $( shell python packaging/get_version.py src/rdkafka.h)
2015-12-02 21:28:53 +03:00
2015-04-09 18:30:09 +03:00
# Jenkins CI integration
BUILD_NUMBER ?= 1
2019-05-27 16:27:22 +03:00
# Skip copyright check in the following paths
MKL_COPYRIGHT_SKIP ?= ^( tests| packaging)
2012-09-19 14:26:37 +04:00
.PHONY :
2014-03-16 11:38:19 +04:00
all : mklove -check libs CONFIGURATION .md check
2012-09-19 14:26:37 +04:00
2014-03-16 11:38:19 +04:00
i n c l u d e m k l o v e / M a k e f i l e . b a s e
2012-09-19 14:26:37 +04:00
2014-03-16 11:38:19 +04:00
libs :
@( for d in $( LIBSUBDIRS) ; do $( MAKE) -C $$ d || exit $? ; done )
2012-09-19 14:26:37 +04:00
2014-03-16 11:38:19 +04:00
CONFIGURATION.md : src /rdkafka .h examples
2015-04-30 03:00:32 +03:00
@printf " $( MKL_YELLOW) Updating $( MKL_CLR_RESET) \n "
2019-03-14 19:35:07 +03:00
@echo "# Configuration properties" > CONFIGURATION.md.tmp
2019-08-15 12:25:27 +03:00
@( examples/rdkafka_performance -X list | \
sed 's/||/\\|\\|/g' >> \
CONFIGURATION.md.tmp; \
2015-04-21 20:12:45 +03:00
cmp CONFIGURATION.md CONFIGURATION.md.tmp || \
2014-02-05 10:11:05 +04:00
mv CONFIGURATION.md.tmp CONFIGURATION.md; \
2015-04-21 20:12:45 +03:00
rm -f CONFIGURATION.md.tmp)
2013-10-04 02:15:59 +04:00
2017-04-11 14:59:08 +03:00
file-check : CONFIGURATION .md LICENSES .txt examples
2014-03-16 11:38:19 +04:00
check : file -check
@( for d in $( LIBSUBDIRS) ; do $( MAKE) -C $$ d $@ || exit $? ; done )
2013-09-23 18:31:56 +04:00
2018-06-19 13:13:37 +03:00
install uninstall :
2014-03-16 11:38:19 +04:00
@( for d in $( LIBSUBDIRS) ; do $( MAKE) -C $$ d $@ || exit $? ; done )
2014-02-05 10:11:05 +04:00
2015-01-29 02:05:33 +03:00
examples tests : .PHONY libs
2014-03-16 11:38:19 +04:00
$( MAKE) -C $@
2014-02-05 10:11:05 +04:00
2015-12-07 05:13:32 +03:00
docs :
doxygen Doxyfile
@echo "Documentation generated in staging-docs"
2015-12-08 03:45:09 +03:00
clean-docs :
rm -rf staging-docs
2012-09-19 14:26:37 +04:00
clean :
2014-03-16 11:38:19 +04:00
@$( MAKE) -C tests $@
@$( MAKE) -C examples $@
@( for d in $( LIBSUBDIRS) ; do $( MAKE) -C $$ d $@ ; done )
2015-04-09 18:30:09 +03:00
2019-02-13 11:06:57 +03:00
distclean : clean deps -clean
2015-12-02 21:28:53 +03:00
./configure --clean
rm -f config.log config.log.old
archive :
git archive --prefix= $( PACKAGE_NAME) -$( VERSION) / \
-o $( PACKAGE_NAME) -$( VERSION) .tar.gz HEAD
git archive --prefix= $( PACKAGE_NAME) -$( VERSION) / \
-o $( PACKAGE_NAME) -$( VERSION) .zip HEAD
2016-01-13 14:52:34 +03:00
rpm : distclean
$( MAKE) -C packaging/rpm
2016-11-21 23:51:25 +03:00
2017-04-11 14:59:08 +03:00
LICENSES.txt : .PHONY
2017-05-11 11:56:09 +03:00
@( for i in LICENSE LICENSE.*[ ^~] ; do ( echo " $$ i " ; echo "--------------------------------------------------------------" ; cat $$ i ; echo "" ; echo "" ) ; done ) > $@ .tmp
2017-04-11 14:59:08 +03:00
@cmp $@ $@ .tmp || mv $@ .tmp $@ ; rm -f $@ .tmp
2016-11-21 23:51:25 +03:00