mbed TLS upgraded to 2.6.0
Fork of mbedtls by
Makefile@0:cdf462088d13, 2017-01-05 (annotated)
- Committer:
- markrad
- Date:
- Thu Jan 05 00:18:44 2017 +0000
- Revision:
- 0:cdf462088d13
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
markrad | 0:cdf462088d13 | 1 | |
markrad | 0:cdf462088d13 | 2 | DESTDIR=/usr/local |
markrad | 0:cdf462088d13 | 3 | PREFIX=mbedtls_ |
markrad | 0:cdf462088d13 | 4 | |
markrad | 0:cdf462088d13 | 5 | .SILENT: |
markrad | 0:cdf462088d13 | 6 | |
markrad | 0:cdf462088d13 | 7 | .PHONY: all no_test programs lib tests install uninstall clean test check covtest lcov apidoc apidoc_clean |
markrad | 0:cdf462088d13 | 8 | |
markrad | 0:cdf462088d13 | 9 | all: programs tests |
markrad | 0:cdf462088d13 | 10 | $(MAKE) post_build |
markrad | 0:cdf462088d13 | 11 | |
markrad | 0:cdf462088d13 | 12 | no_test: programs |
markrad | 0:cdf462088d13 | 13 | |
markrad | 0:cdf462088d13 | 14 | programs: lib |
markrad | 0:cdf462088d13 | 15 | $(MAKE) -C programs |
markrad | 0:cdf462088d13 | 16 | |
markrad | 0:cdf462088d13 | 17 | lib: |
markrad | 0:cdf462088d13 | 18 | $(MAKE) -C library |
markrad | 0:cdf462088d13 | 19 | |
markrad | 0:cdf462088d13 | 20 | tests: lib |
markrad | 0:cdf462088d13 | 21 | $(MAKE) -C tests |
markrad | 0:cdf462088d13 | 22 | |
markrad | 0:cdf462088d13 | 23 | ifndef WINDOWS |
markrad | 0:cdf462088d13 | 24 | install: no_test |
markrad | 0:cdf462088d13 | 25 | mkdir -p $(DESTDIR)/include/mbedtls |
markrad | 0:cdf462088d13 | 26 | cp -r include/mbedtls $(DESTDIR)/include |
markrad | 0:cdf462088d13 | 27 | |
markrad | 0:cdf462088d13 | 28 | mkdir -p $(DESTDIR)/lib |
markrad | 0:cdf462088d13 | 29 | cp -RP library/libmbedtls.* $(DESTDIR)/lib |
markrad | 0:cdf462088d13 | 30 | cp -RP library/libmbedx509.* $(DESTDIR)/lib |
markrad | 0:cdf462088d13 | 31 | cp -RP library/libmbedcrypto.* $(DESTDIR)/lib |
markrad | 0:cdf462088d13 | 32 | |
markrad | 0:cdf462088d13 | 33 | mkdir -p $(DESTDIR)/bin |
markrad | 0:cdf462088d13 | 34 | for p in programs/*/* ; do \ |
markrad | 0:cdf462088d13 | 35 | if [ -x $$p ] && [ ! -d $$p ] ; \ |
markrad | 0:cdf462088d13 | 36 | then \ |
markrad | 0:cdf462088d13 | 37 | f=$(PREFIX)`basename $$p` ; \ |
markrad | 0:cdf462088d13 | 38 | cp $$p $(DESTDIR)/bin/$$f ; \ |
markrad | 0:cdf462088d13 | 39 | fi \ |
markrad | 0:cdf462088d13 | 40 | done |
markrad | 0:cdf462088d13 | 41 | |
markrad | 0:cdf462088d13 | 42 | uninstall: |
markrad | 0:cdf462088d13 | 43 | rm -rf $(DESTDIR)/include/mbedtls |
markrad | 0:cdf462088d13 | 44 | rm -f $(DESTDIR)/lib/libmbedtls.* |
markrad | 0:cdf462088d13 | 45 | rm -f $(DESTDIR)/lib/libmbedx509.* |
markrad | 0:cdf462088d13 | 46 | rm -f $(DESTDIR)/lib/libmbedcrypto.* |
markrad | 0:cdf462088d13 | 47 | |
markrad | 0:cdf462088d13 | 48 | for p in programs/*/* ; do \ |
markrad | 0:cdf462088d13 | 49 | if [ -x $$p ] && [ ! -d $$p ] ; \ |
markrad | 0:cdf462088d13 | 50 | then \ |
markrad | 0:cdf462088d13 | 51 | f=$(PREFIX)`basename $$p` ; \ |
markrad | 0:cdf462088d13 | 52 | rm -f $(DESTDIR)/bin/$$f ; \ |
markrad | 0:cdf462088d13 | 53 | fi \ |
markrad | 0:cdf462088d13 | 54 | done |
markrad | 0:cdf462088d13 | 55 | endif |
markrad | 0:cdf462088d13 | 56 | |
markrad | 0:cdf462088d13 | 57 | WARNING_BORDER =*******************************************************\n |
markrad | 0:cdf462088d13 | 58 | NULL_ENTROPY_WARN_L1=**** WARNING! MBEDTLS_TEST_NULL_ENTROPY defined! ****\n |
markrad | 0:cdf462088d13 | 59 | NULL_ENTROPY_WARN_L2=**** THIS BUILD HAS NO DEFINED ENTROPY SOURCES ****\n |
markrad | 0:cdf462088d13 | 60 | NULL_ENTROPY_WARN_L3=**** AND IS *NOT* SUITABLE FOR PRODUCTION USE ****\n |
markrad | 0:cdf462088d13 | 61 | |
markrad | 0:cdf462088d13 | 62 | NULL_ENTROPY_WARNING=\n$(WARNING_BORDER)$(NULL_ENTROPY_WARN_L1)$(NULL_ENTROPY_WARN_L2)$(NULL_ENTROPY_WARN_L3)$(WARNING_BORDER) |
markrad | 0:cdf462088d13 | 63 | |
markrad | 0:cdf462088d13 | 64 | # Post build steps |
markrad | 0:cdf462088d13 | 65 | post_build: |
markrad | 0:cdf462088d13 | 66 | ifndef WINDOWS |
markrad | 0:cdf462088d13 | 67 | # If NULL Entropy is configured, display an appropriate warning |
markrad | 0:cdf462088d13 | 68 | -scripts/config.pl get MBEDTLS_TEST_NULL_ENTROPY && ([ $$? -eq 0 ]) && \ |
markrad | 0:cdf462088d13 | 69 | echo '$(NULL_ENTROPY_WARNING)' |
markrad | 0:cdf462088d13 | 70 | endif |
markrad | 0:cdf462088d13 | 71 | |
markrad | 0:cdf462088d13 | 72 | clean: |
markrad | 0:cdf462088d13 | 73 | $(MAKE) -C library clean |
markrad | 0:cdf462088d13 | 74 | $(MAKE) -C programs clean |
markrad | 0:cdf462088d13 | 75 | $(MAKE) -C tests clean |
markrad | 0:cdf462088d13 | 76 | ifndef WINDOWS |
markrad | 0:cdf462088d13 | 77 | find . \( -name \*.gcno -o -name \*.gcda -o -name \*.info \) -exec rm {} + |
markrad | 0:cdf462088d13 | 78 | endif |
markrad | 0:cdf462088d13 | 79 | |
markrad | 0:cdf462088d13 | 80 | check: lib tests |
markrad | 0:cdf462088d13 | 81 | $(MAKE) -C tests check |
markrad | 0:cdf462088d13 | 82 | |
markrad | 0:cdf462088d13 | 83 | test: check |
markrad | 0:cdf462088d13 | 84 | |
markrad | 0:cdf462088d13 | 85 | ifndef WINDOWS |
markrad | 0:cdf462088d13 | 86 | # note: for coverage testing, build with: |
markrad | 0:cdf462088d13 | 87 | # make CFLAGS='--coverage -g3 -O0' |
markrad | 0:cdf462088d13 | 88 | covtest: |
markrad | 0:cdf462088d13 | 89 | $(MAKE) check |
markrad | 0:cdf462088d13 | 90 | programs/test/selftest |
markrad | 0:cdf462088d13 | 91 | tests/compat.sh |
markrad | 0:cdf462088d13 | 92 | tests/ssl-opt.sh |
markrad | 0:cdf462088d13 | 93 | |
markrad | 0:cdf462088d13 | 94 | lcov: |
markrad | 0:cdf462088d13 | 95 | rm -rf Coverage |
markrad | 0:cdf462088d13 | 96 | lcov --capture --initial --directory library -o files.info |
markrad | 0:cdf462088d13 | 97 | lcov --capture --directory library -o tests.info |
markrad | 0:cdf462088d13 | 98 | lcov --add-tracefile files.info --add-tracefile tests.info -o all.info |
markrad | 0:cdf462088d13 | 99 | lcov --remove all.info -o final.info '*.h' |
markrad | 0:cdf462088d13 | 100 | gendesc tests/Descriptions.txt -o descriptions |
markrad | 0:cdf462088d13 | 101 | genhtml --title "mbed TLS" --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info |
markrad | 0:cdf462088d13 | 102 | rm -f files.info tests.info all.info final.info descriptions |
markrad | 0:cdf462088d13 | 103 | |
markrad | 0:cdf462088d13 | 104 | apidoc: |
markrad | 0:cdf462088d13 | 105 | mkdir -p apidoc |
markrad | 0:cdf462088d13 | 106 | doxygen doxygen/mbedtls.doxyfile |
markrad | 0:cdf462088d13 | 107 | |
markrad | 0:cdf462088d13 | 108 | apidoc_clean: |
markrad | 0:cdf462088d13 | 109 | rm -rf apidoc |
markrad | 0:cdf462088d13 | 110 | endif |