Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libwebsockets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Fork
libwebsockets
Commits
3db1ce09
Commit
3db1ce09
authored
7 years ago
by
Ben Delarre
Committed by
Andy Green
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Esp32: allow build on windows
parent
31606054
No related branches found
No related tags found
Loading
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
component.mk
+16
-9
16 additions, 9 deletions
component.mk
contrib/cross-esp32.cmake
+7
-4
7 additions, 4 deletions
contrib/cross-esp32.cmake
with
24 additions
and
13 deletions
.gitignore
+
1
−
0
View file @
3db1ce09
...
...
@@ -38,3 +38,4 @@ ar-lib
libwebsockets.pc
build/
*.swp
doc
\ No newline at end of file
This diff is collapsed.
Click to expand it.
component.mk
+
16
−
9
View file @
3db1ce09
COMPONENT_DEPENDS
:=
mbedtls openssl
COMPONENT_ADD_INCLUDEDIRS
:=
../../../../../../../../../../../../../../../../../../../../
$(
COMPONENT_BUILD_DIR
)
/include
COMPONENT_DEPENDS
:=
mbedtls openssl
#
COMPONENT_ADD_INCLUDEDIRS := ../../../../../../../../../../../../../../../../../../../../$(COMPONENT_BUILD_DIR)/include
COMPONENT_OWNBUILDTARGET
:=
1
COMPONENT_OWNBUILDTARGET
:=
1
CROSS_PATH1
:=
$(
shell which xtensa-esp32-elf-gcc
)
CROSS_PATH
:=
$(
shell
dirname
$(
CROSS_PATH1
)
)
/..
CROSS_PATH1
:=
$(
shell which xtensa-esp32-elf-gcc
)
CROSS_PATH
:=
$(
shell
dirname
$(
CROSS_PATH1
)
)
/..
# detect MSYS2 environment and set generator flag if found
# also set executable extension to .exe so that tools can be properly found
# and disable bundled zlib
MSYS_VERSION
=
$(
if
$(
findstring Msys,
$(
shell
uname
-o
))
,
$(
word 1,
$(
subst ., ,
$(
shell
uname
-r
)))
,0
)
ifneq
($(MSYS_VERSION),0)
MSYS_FLAGS
=
-DLWS_WITH_BUNDLED_ZLIB
=
0
-DEXECUTABLE_EXT
=
.exe
-G
'MSYS Makefiles'
endif
# -DNDEBUG=1 after cflags stops debug etc being built
.PHONY
:
build
...
...
@@ -20,9 +28,11 @@ build:
-DLWS_MBEDTLS_INCLUDE_DIRS
=
"
${
IDF_PATH
}
/components/openssl/include;
${
IDF_PATH
}
/components/mbedtls/include;
${
IDF_PATH
}
/components/mbedtls/port/include"
\
-DLWS_WITH_STATS
=
0
\
-DLWS_WITH_HTTP2
=
1
\
-DLWS_WITH_ACME
=
1
\
-DZLIB_LIBRARY
=
$(
BUILD_DIR_BASE
)
/zlib/libzlib.a
\
-DZLIB_INCLUDE_DIR
=
$(
COMPONENT_PATH
)
/../zlib
\
-DLWS_WITH_ESP32
=
1
;
\
-DLWS_WITH_ESP32
=
1
\
$(
MSYS_FLAGS
)
;
\
make
&&
\
cp
${
COMPONENT_BUILD_DIR
}
/lib/libwebsockets.a
${
COMPONENT_BUILD_DIR
}
/liblibwebsockets.a
...
...
@@ -30,6 +40,3 @@ clean: myclean
myclean
:
rm
-rf
./build
INCLUDES
:=
$(
INCLUDES
)
-I
build/
This diff is collapsed.
Click to expand it.
contrib/cross-esp32.cmake
+
7
−
4
View file @
3db1ce09
...
...
@@ -10,14 +10,15 @@
set
(
CMAKE_SYSTEM_NAME Linux
)
# Name of C compiler.
set
(
CMAKE_C_COMPILER
"
${
CROSS_PATH
}
/bin/xtensa-esp32-elf-gcc"
)
set
(
CMAKE_AR
"
${
CROSS_PATH
}
/bin/xtensa-esp32-elf-ar"
)
set
(
CMAKE_RANLIB
"
${
CROSS_PATH
}
/bin/xtensa-esp32-elf-ranlib"
)
set
(
CMAKE_LINKER
"
${
CROSS_PATH
}
/bin/xtensa-esp32-elf-ld"
)
set
(
CMAKE_C_COMPILER
"
${
CROSS_PATH
}
/bin/xtensa-esp32-elf-gcc
${
EXECUTABLE_EXT
}
"
)
set
(
CMAKE_AR
"
${
CROSS_PATH
}
/bin/xtensa-esp32-elf-ar
${
EXECUTABLE_EXT
}
"
)
set
(
CMAKE_RANLIB
"
${
CROSS_PATH
}
/bin/xtensa-esp32-elf-ranlib
${
EXECUTABLE_EXT
}
"
)
set
(
CMAKE_LINKER
"
${
CROSS_PATH
}
/bin/xtensa-esp32-elf-ld
${
EXECUTABLE_EXT
}
"
)
SET
(
CMAKE_C_FLAGS
"-nostdlib -Wall -Werror \
-I
${
BUILD_DIR_BASE
}
/include \
-I
${
IDF_PATH
}
/components/mdns/include \
-I
${
IDF_PATH
}
/components/heap/include \
-I
${
IDF_PATH
}
/components/driver/include \
-I
${
IDF_PATH
}
/components/spi_flash/include \
-I
${
IDF_PATH
}
/components/nvs_flash/include \
...
...
@@ -29,6 +30,8 @@ SET(CMAKE_C_FLAGS "-nostdlib -Wall -Werror \
-I
${
IDF_PATH
}
/components/bootloader_support/include/ \
-I
${
IDF_PATH
}
/components/app_update/include/ \
-I$(IDF_PATH)/components/soc/esp32/include/ \
-I$(IDF_PATH)/components/soc/include/ \
-I$(IDF_PATH)/components/vfs/include/ \
${
LWS_C_FLAGS
}
-Os \
-I
${
IDF_PATH
}
/components/nvs_flash/test_nvs_host \
-I
${
IDF_PATH
}
/components/freertos/include"
CACHE STRING
""
FORCE
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment