#common make targets shared over multiple makefiles bins: $(USEFUL_DEMOS) all_test: test tv_gen $(DEMOS) #build the doxy files (requires Doxygen, tetex and patience) doxygen: $(MAKE) -C doc/ doxygen V=$(V) doxy: $(MAKE) -C doc/ doxy V=$(V) docs: $(MAKE) -C doc/ crypt.pdf V=$(V) install_hooks: for s in `ls hooks/`; do ln -s ../../hooks/$$s .git/hooks/$$s; done #This rule cleans the source tree of all compiled code, not including the pdf #documentation. clean: rm -f `find . -type f -name "*.o" | xargs` rm -f `find . -type f -name "*.lo" | xargs` rm -f `find . -type f -name "*.a" | xargs` rm -f `find . -type f -name "*.la" | xargs` rm -f `find . -type f -name "*.obj" | xargs` rm -f `find . -type f -name "*.lib" | xargs` rm -f `find . -type f -name "*.exe" | xargs` rm -f `find . -type f -name "*.dll" | xargs` rm -f `find . -type f -name "*.so" | xargs` rm -f `find . -type f -name "*.gcov" | xargs` rm -f `find . -type f -name "*.gcda" | xargs` rm -f `find . -type f -name "*.gcno" | xargs` rm -f `find . -type f -name "*.il" | xargs` rm -f `find . -type f -name "*.dyn" | xargs` rm -f `find . -type f -name "*.dpi" | xargs` rm -rf `find . -type d -name "*.libs" | xargs` rm -f crypt.aux crypt.dvi crypt.idx crypt.ilg crypt.ind crypt.log crypt.toc rm -f $(TIMING) $(TEST) $(DEMOS) rm -rf doc/doxygen rm -f `find . -type f -name "*.pdf" | grep -FL crypt.pdf | xargs` rm -f *.txt rm -f *.pc zipup: docs @git diff-index --quiet HEAD -- || ( echo "FAILURE: uncommited changes or not a git" && exit 1 ) @perl helper.pl --check-all || ( echo "FAILURE: helper.pl --check-all errors" && exit 1 ) rm -rf libtomcrypt-$(VERSION) libtomcrypt-$(VERSION).* # files/dirs excluded from "git archive" are defined in .gitattributes git archive --format=tar --prefix=libtomcrypt-$(VERSION)/ HEAD | tar x mkdir -p libtomcrypt-$(VERSION)/doc cp doc/crypt.pdf libtomcrypt-$(VERSION)/doc/crypt.pdf tar -cJf libtomcrypt-$(VERSION).tar.xz libtomcrypt-$(VERSION) zip -9rq libtomcrypt-$(VERSION).zip libtomcrypt-$(VERSION) rm -rf libtomcrypt-$(VERSION) gpg -b -a libtomcrypt-$(VERSION).tar.xz gpg -b -a libtomcrypt-$(VERSION).zip codecheck: perl helper.pl -a perlcritic *.pl