forked from warmcat/libwebsockets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is enough for all the test app features to work on ESP32 without SSL.
- Loading branch information
Showing
16 changed files
with
776 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
menu "Libwebsockets" | ||
|
||
config LWS | ||
bool "Enable Libwebsockets" | ||
default n | ||
help | ||
Enable Libwebsockets Library | ||
|
||
endmenu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
COMPONENT_ADD_INCLUDEDIRS := ../../../../../../../../../$(COMPONENT_BUILD_DIR)/include-ext | ||
|
||
COMPONENT_OWNBUILDTARGET:= 1 | ||
|
||
CROSS_PATH1:=$(shell which xtensa-esp32-elf-gcc ) | ||
CROSS_PATH:= $(shell dirname $(CROSS_PATH1) )/.. | ||
|
||
#-DLWS_USE_BORINGSSL=1 \ | ||
# -DOPENSSL_ROOT_DIR="${PWD}/../../boringssl" \ | ||
# -DOPENSSL_LIBRARIES="${PWD}/../../boringssl/build/ssl/libssl.a;${PWD}/../../boringssl/build/crypto/libcrypto.a" \ | ||
# -DOPENSSL_INCLUDE_DIRS="${PWD}/../../boringssl/include" \ | ||
.PHONY: build | ||
build: | ||
cd $(COMPONENT_BUILD_DIR) ; \ | ||
echo "doing lws cmake" ; \ | ||
cmake $(COMPONENT_PATH) -DLWS_C_FLAGS="$(CFLAGS)" \ | ||
-DCROSS_PATH=$(CROSS_PATH) \ | ||
-DCOMPONENT_PATH=$(COMPONENT_PATH) \ | ||
-DCMAKE_TOOLCHAIN_FILE=$(COMPONENT_PATH)/cross-esp32.cmake \ | ||
-DCMAKE_BUILD_TYPE=RELEASE \ | ||
-DLWS_WITH_NO_LOGS=0 \ | ||
-DLWS_WITH_ESP32=1 ;\ | ||
mkdir -p $(COMPONENT_BUILD_DIR)/include-ext ; \ | ||
cp $(COMPONENT_PATH)/lib/libwebsockets.h \ | ||
$(COMPONENT_BUILD_DIR)/lws_config.h \ | ||
$(COMPONENT_BUILD_DIR)/include-ext ; \ | ||
make VERBOSE=1 && \ | ||
cp ${COMPONENT_BUILD_DIR}/lib/libwebsockets.a ${COMPONENT_BUILD_DIR}/liblibwebsockets.a | ||
|
||
clean: myclean | ||
|
||
myclean: | ||
rm -rf ./build | ||
|
||
INCLUDES := $(INCLUDES) -I build/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# CMake Toolchain file for crosscompiling on ARM. | ||
# | ||
# This can be used when running cmake in the following way: | ||
# cd build/ | ||
# cmake .. -DCMAKE_TOOLCHAIN_FILE=../cross-arm-linux-gnueabihf.cmake | ||
# | ||
|
||
# Target operating system name. | ||
set(CMAKE_SYSTEM_NAME Linux) | ||
|
||
# Name of C compiler. | ||
set(CMAKE_C_COMPILER "${CROSS_PATH}/bin/xtensa-esp32-elf-gcc") | ||
|
||
SET(CMAKE_C_FLAGS "-nostdlib -Wall -Werror -I${COMPONENT_PATH}/../lwip/include/lwip/posix -I${COMPONENT_PATH}/../lwip/include/lwip -I${COMPONENT_PATH}/../lwip/include/lwip/port -I${COMPONENT_PATH}/../esp32/include/ ${LWS_C_FLAGS} -I${COMPONENT_PATH}/../nvs_flash/test_nvs_host -I${COMPONENT_PATH}/../freertos/include -Os" CACHE STRING "" FORCE) | ||
|
||
# Where to look for the target environment. (More paths can be added here) | ||
set(CMAKE_FIND_ROOT_PATH "${CROSS_PATH}") | ||
|
||
# Adjust the default behavior of the FIND_XXX() commands: | ||
# search programs in the host environment only. | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
|
||
# Search headers and libraries in the target environment only. | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.