Feature/ws windows (#86)
* try to build ws on window on travis 📮 * cmake invocation fixed on windows 🐝 * Can use mbedtls to calculate hmac + no openssl config option * build only windows on travis 🕢 * run msbuild 💷 * proper command to build 🕛 * some build fixes * change weird sizeof call 🐙 * warning and missing includes fixes 💮 * ifdef out statsd code on windows 🐍 * logic invertion in ifdef 👄 * bring back makefile 📜 * command line tool is built with mbedtls 🏥
This commit is contained in:
committed by
GitHub
parent
17eaa323ed
commit
fa84ade6be
298
third_party/mbedtls/Makefile
vendored
298
third_party/mbedtls/Makefile
vendored
@ -1,140 +1,200 @@
|
||||
# export the submodule flag so that crypto knows it's being built as a submodule
|
||||
export USE_CRYPTO_SUBMODULE=1
|
||||
DESTDIR=/usr/local
|
||||
PREFIX=mbedtls_
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.12
|
||||
|
||||
.SILENT:
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
|
||||
.PHONY: all no_test programs lib tests install uninstall clean test check covtest lcov apidoc apidoc_clean
|
||||
.PHONY : default_target
|
||||
|
||||
all: programs tests
|
||||
$(MAKE) post_build
|
||||
|
||||
no_test: programs
|
||||
|
||||
programs: lib
|
||||
$(MAKE) -C programs
|
||||
|
||||
lib:
|
||||
$(MAKE) -C library
|
||||
|
||||
tests: lib
|
||||
$(MAKE) -C tests
|
||||
$(MAKE) CRYPTO_INCLUDES:="-I../../include -I../include" -C crypto/tests
|
||||
|
||||
ifndef WINDOWS
|
||||
install: no_test
|
||||
mkdir -p $(DESTDIR)/include/mbedtls
|
||||
cp -rp include/mbedtls $(DESTDIR)/include
|
||||
|
||||
mkdir -p $(DESTDIR)/lib
|
||||
cp -RP library/libmbedtls.* $(DESTDIR)/lib
|
||||
cp -RP library/libmbedx509.* $(DESTDIR)/lib
|
||||
|
||||
mkdir -p $(DESTDIR)/include/psa
|
||||
cp -rp crypto/include/psa $(DESTDIR)/include
|
||||
cp -RP crypto/library/libmbedcrypto.* $(DESTDIR)/lib
|
||||
|
||||
mkdir -p $(DESTDIR)/bin
|
||||
for p in programs/*/* ; do \
|
||||
if [ -x $$p ] && [ ! -d $$p ] ; \
|
||||
then \
|
||||
f=$(PREFIX)`basename $$p` ; \
|
||||
cp $$p $(DESTDIR)/bin/$$f ; \
|
||||
fi \
|
||||
done
|
||||
|
||||
uninstall:
|
||||
rm -rf $(DESTDIR)/include/mbedtls
|
||||
rm -f $(DESTDIR)/lib/libmbedtls.*
|
||||
rm -f $(DESTDIR)/lib/libmbedx509.*
|
||||
rm -f $(DESTDIR)/lib/libmbedcrypto.*
|
||||
$(MAKE) -C crypto uninstall
|
||||
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||
.NOTPARALLEL:
|
||||
|
||||
|
||||
for p in programs/*/* ; do \
|
||||
if [ -x $$p ] && [ ! -d $$p ] ; \
|
||||
then \
|
||||
f=$(PREFIX)`basename $$p` ; \
|
||||
rm -f $(DESTDIR)/bin/$$f ; \
|
||||
fi \
|
||||
done
|
||||
endif
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
WARNING_BORDER =*******************************************************\n
|
||||
NULL_ENTROPY_WARN_L1=**** WARNING! MBEDTLS_TEST_NULL_ENTROPY defined! ****\n
|
||||
NULL_ENTROPY_WARN_L2=**** THIS BUILD HAS NO DEFINED ENTROPY SOURCES ****\n
|
||||
NULL_ENTROPY_WARN_L3=**** AND IS *NOT* SUITABLE FOR PRODUCTION USE ****\n
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
NULL_ENTROPY_WARNING=\n$(WARNING_BORDER)$(NULL_ENTROPY_WARN_L1)$(NULL_ENTROPY_WARN_L2)$(NULL_ENTROPY_WARN_L3)$(WARNING_BORDER)
|
||||
|
||||
WARNING_BORDER_LONG =**********************************************************************************\n
|
||||
CTR_DRBG_128_BIT_KEY_WARN_L1=**** WARNING! MBEDTLS_CTR_DRBG_USE_128_BIT_KEY defined! ****\n
|
||||
CTR_DRBG_128_BIT_KEY_WARN_L2=**** Using 128-bit keys for CTR_DRBG limits the security of generated ****\n
|
||||
CTR_DRBG_128_BIT_KEY_WARN_L3=**** keys and operations that use random values generated to 128-bit security ****\n
|
||||
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||
SUFFIXES =
|
||||
|
||||
CTR_DRBG_128_BIT_KEY_WARNING=\n$(WARNING_BORDER_LONG)$(CTR_DRBG_128_BIT_KEY_WARN_L1)$(CTR_DRBG_128_BIT_KEY_WARN_L2)$(CTR_DRBG_128_BIT_KEY_WARN_L3)$(WARNING_BORDER_LONG)
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
# Post build steps
|
||||
post_build:
|
||||
ifndef WINDOWS
|
||||
|
||||
# If 128-bit keys are configured for CTR_DRBG, display an appropriate warning
|
||||
-scripts/config.pl get MBEDTLS_CTR_DRBG_USE_128_BIT_KEY && ([ $$? -eq 0 ]) && \
|
||||
echo '$(CTR_DRBG_128_BIT_KEY_WARNING)'
|
||||
# Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# If NULL Entropy is configured, display an appropriate warning
|
||||
-scripts/config.pl get MBEDTLS_TEST_NULL_ENTROPY && ([ $$? -eq 0 ]) && \
|
||||
echo '$(NULL_ENTROPY_WARNING)'
|
||||
endif
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /Applications/CMake.app/Contents/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /Applications/CMake.app/Contents/bin/cmake -E remove -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /Users/bsergeant/src/foss/ixwebsocket
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /Users/bsergeant/src/foss/ixwebsocket
|
||||
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
|
||||
/Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
|
||||
/Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local/fast
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
|
||||
/Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
|
||||
/Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip/fast
|
||||
|
||||
# Special rule for the target install
|
||||
install: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
|
||||
/Applications/CMake.app/Contents/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install
|
||||
|
||||
# Special rule for the target install
|
||||
install/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
|
||||
/Applications/CMake.app/Contents/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install/fast
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
|
||||
.PHONY : list_install_components
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components/fast: list_install_components
|
||||
|
||||
.PHONY : list_install_components/fast
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
|
||||
/Applications/CMake.app/Contents/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
|
||||
/Applications/CMake.app/Contents/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : edit_cache
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -E cmake_progress_start /Users/bsergeant/src/foss/ixwebsocket/CMakeFiles /Users/bsergeant/src/foss/ixwebsocket/third_party/mbedtls/CMakeFiles/progress.marks
|
||||
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /Users/bsergeant/src/foss/ixwebsocket/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
# The main clean target
|
||||
clean:
|
||||
$(MAKE) -C library clean
|
||||
$(MAKE) -C programs clean
|
||||
$(MAKE) -C tests clean
|
||||
$(MAKE) -C crypto clean
|
||||
ifndef WINDOWS
|
||||
find . \( -name \*.gcno -o -name \*.gcda -o -name \*.info \) -exec rm {} +
|
||||
endif
|
||||
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/clean
|
||||
.PHONY : clean
|
||||
|
||||
check: lib tests
|
||||
$(MAKE) -C tests check
|
||||
$(MAKE) CRYPTO_INCLUDES:="-I../../include -I../include" -C crypto/tests check
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
|
||||
test: check
|
||||
.PHONY : clean/fast
|
||||
|
||||
ifndef WINDOWS
|
||||
# note: for coverage testing, build with:
|
||||
# make CFLAGS='--coverage -g3 -O0'
|
||||
covtest:
|
||||
$(MAKE) check
|
||||
programs/test/selftest
|
||||
tests/compat.sh
|
||||
tests/ssl-opt.sh
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
lcov:
|
||||
rm -rf Coverage
|
||||
lcov --capture --initial --directory library -o files.info
|
||||
lcov --capture --directory library -o tests.info
|
||||
lcov --add-tracefile files.info --add-tracefile tests.info -o all.info
|
||||
lcov --remove all.info -o final.info '*.h'
|
||||
gendesc tests/Descriptions.txt -o descriptions
|
||||
genhtml --title "mbed TLS" --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info
|
||||
rm -f files.info tests.info all.info final.info descriptions
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
apidoc:
|
||||
mkdir -p apidoc
|
||||
cd doxygen && doxygen mbedtls.doxyfile
|
||||
# clear depends
|
||||
depend:
|
||||
cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
apidoc_clean:
|
||||
rm -rf apidoc
|
||||
endif
|
||||
# Convenience name for target.
|
||||
third_party/mbedtls/CMakeFiles/apidoc.dir/rule:
|
||||
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/CMakeFiles/apidoc.dir/rule
|
||||
.PHONY : third_party/mbedtls/CMakeFiles/apidoc.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
apidoc: third_party/mbedtls/CMakeFiles/apidoc.dir/rule
|
||||
|
||||
.PHONY : apidoc
|
||||
|
||||
# fast build rule for target.
|
||||
apidoc/fast:
|
||||
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/CMakeFiles/apidoc.dir/build.make third_party/mbedtls/CMakeFiles/apidoc.dir/build
|
||||
.PHONY : apidoc/fast
|
||||
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... install/local"
|
||||
@echo "... install/strip"
|
||||
@echo "... install"
|
||||
@echo "... list_install_components"
|
||||
@echo "... rebuild_cache"
|
||||
@echo "... edit_cache"
|
||||
@echo "... apidoc"
|
||||
.PHONY : help
|
||||
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
||||
## Editor navigation files
|
||||
C_SOURCE_FILES = $(wildcard include/*/*.h library/*.[hc] programs/*/*.[hc] tests/suites/*.function)
|
||||
tags: $(C_SOURCE_FILES)
|
||||
ctags -o $@ $(C_SOURCE_FILES)
|
||||
TAGS: $(C_SOURCE_FILES)
|
||||
etags -o $@ $(C_SOURCE_FILES)
|
||||
GPATH GRTAGS GSYMS GTAGS: $(C_SOURCE_FILES)
|
||||
ls $(C_SOURCE_FILES) | gtags -f - --gtagsconf .globalrc
|
||||
|
Reference in New Issue
Block a user