mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
make EMS-ESP compile standalone on osx/darwin and linux
This commit is contained in:
2
Makefile
2
Makefile
@@ -30,7 +30,7 @@ CHECKFLAGS = -q --force --std=c++11
|
||||
#----------------------------------------------------------------------
|
||||
C_STANDARD := -std=c17
|
||||
# CXX_STANDARD := -std=c++17
|
||||
CXX_STANDARD := -std=gnu++17
|
||||
CXX_STANDARD := -std=gnu++11
|
||||
|
||||
# C_STANDARD := -std=c11
|
||||
# CXX_STANDARD := -std=c++11
|
||||
|
||||
@@ -197,7 +197,7 @@ const char * MqttClient::getClientId() const {
|
||||
}
|
||||
|
||||
void MqttClient::loop() {
|
||||
switch (_state) {
|
||||
switch ((State)_state) { // TOOD modified by proddy for EMS-ESP compiling on osx
|
||||
case State::disconnected:
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
if (_useInternalTask == espMqttClientTypes::UseInternalTask::YES) {
|
||||
|
||||
@@ -123,8 +123,7 @@ class MqttClient {
|
||||
#elif defined(ARDUINO_ARCH_ESP8266) && EMC_ESP8266_MULTITHREADING
|
||||
std::atomic<bool> _xSemaphore = false;
|
||||
#elif defined(__linux__)
|
||||
// added mutable to compile EMS-ESP standalone
|
||||
mutable std::mutex mtx;
|
||||
mutable std::mutex mtx; // TOOD modified by proddy for EMS-ESP
|
||||
#endif
|
||||
|
||||
uint8_t _rxBuffer[EMC_RX_BUFFER_SIZE];
|
||||
|
||||
@@ -147,7 +147,7 @@ build_flags =
|
||||
-DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST -D__linux__
|
||||
-DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.0-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
|
||||
-lpthread
|
||||
-std=gnu++17 -Og -ggdb
|
||||
-std=gnu++11 -Og -ggdb
|
||||
build_src_flags =
|
||||
-Wall -Wextra -Werror -Wswitch-enum -Wno-unused-parameter -Wno-inconsistent-missing-override -Wno-unused-lambda-capture
|
||||
-Wno-missing-braces
|
||||
|
||||
Reference in New Issue
Block a user