Add domod.
This commit is contained in:
@@ -45,6 +45,9 @@ source "$BR2_EXTERNAL_DOMO_PATH/package/chacond/Config.in"
|
|||||||
# SPRINKLERD
|
# SPRINKLERD
|
||||||
source "$BR2_EXTERNAL_DOMO_PATH/package/sprinklerd/Config.in"
|
source "$BR2_EXTERNAL_DOMO_PATH/package/sprinklerd/Config.in"
|
||||||
|
|
||||||
|
# DOMOD
|
||||||
|
source "$BR2_EXTERNAL_DOMO_PATH/package/domod/Config.in"
|
||||||
|
|
||||||
endmenu # Programmes
|
endmenu # Programmes
|
||||||
|
|
||||||
endmenu # Domo
|
endmenu # Domo
|
||||||
|
|||||||
7
bsp/buildroot_external/package/domod/Config.in
Normal file
7
bsp/buildroot_external/package/domod/Config.in
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
config BR2_PACKAGE_DOMOD
|
||||||
|
bool "domod"
|
||||||
|
select BR2_PACKAGE_LIBUBUS_CPP
|
||||||
|
select BR2_PACKAGE_JSONCPP
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
This program is the main domo daemon.
|
||||||
21
bsp/buildroot_external/package/domod/domod.mk
Normal file
21
bsp/buildroot_external/package/domod/domod.mk
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# DOMOD
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
DOMOD_VERSION:= 1.0
|
||||||
|
|
||||||
|
DOMOD_SITE = $(TOPDIR)/../../src/prog/domod/builders/cmake
|
||||||
|
DOMOD_SITE_METHOD = local
|
||||||
|
DOMOD_INSTALL_STAGING = YES
|
||||||
|
|
||||||
|
DOMOD_DEPENDENCIES = libubus-cpp jsoncpp
|
||||||
|
|
||||||
|
DOMOD_CONF = SRC_DIR=$(TOPDIR)/../..
|
||||||
|
|
||||||
|
DOMOD_CONF_ENV = $(DOMOD_CONF)
|
||||||
|
DOMOD_MAKE_ENV = $(DOMOD_CONF)
|
||||||
|
DOMOD_CONF_OPTS += -DMODULE_PATH=$(TOPDIR)/../../bsp/cmake-modules -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
|
||||||
|
|
||||||
|
$(eval $(cmake-package))
|
||||||
@@ -10,7 +10,8 @@ endif(CMAKE_SYSTEM_PROCESSOR STREQUAL mipsel)
|
|||||||
SET(CMAKE_INSTALL_RPATH "/usr/local/lib")
|
SET(CMAKE_INSTALL_RPATH "/usr/local/lib")
|
||||||
|
|
||||||
# C++
|
# C++
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
|
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
|
||||||
|
|
||||||
#
|
#
|
||||||
# Release
|
# Release
|
||||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG -Os")
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG -Os")
|
||||||
|
|||||||
@@ -59,3 +59,4 @@ BR2_PACKAGE_UBOX=y
|
|||||||
BR2_PACKAGE_MOUNTD=y
|
BR2_PACKAGE_MOUNTD=y
|
||||||
BR2_PACKAGE_CHACOND=y
|
BR2_PACKAGE_CHACOND=y
|
||||||
BR2_PACKAGE_SPRINKLERD=y
|
BR2_PACKAGE_SPRINKLERD=y
|
||||||
|
BR2_PACKAGE_DOMOD=y
|
||||||
|
|||||||
@@ -1,49 +1,51 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.11)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
|
||||||
project(domod)
|
project(domod)
|
||||||
|
|
||||||
include (libubus)
|
set (CMAKE_MODULE_PATH "${MODULE_PATH}")
|
||||||
include (libubox)
|
set (CMAKE_CXX_STANDARD 11)
|
||||||
include (libubuscpp)
|
|
||||||
include (libjsoncpp)
|
|
||||||
|
|
||||||
include_directories(../../src)
|
include (br)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -pedantic -Werror=strict-aliasing")
|
include_directories($ENV{SRC_DIR}/src/prog/domod/src)
|
||||||
|
|
||||||
|
#set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Werror=strict-aliasing")
|
||||||
|
|
||||||
file(
|
file(
|
||||||
GLOB_RECURSE
|
GLOB_RECURSE
|
||||||
source_files
|
source_files
|
||||||
../../src/timers/Timers.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/timers/Timers.cpp
|
||||||
../../src/timers/Event.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/timers/Event.cpp
|
||||||
../../src/timers/Clock.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/timers/Clock.cpp
|
||||||
../../src/devices/Devices.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/devices/Devices.cpp
|
||||||
../../src/devices/Device.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/devices/Device.cpp
|
||||||
../../src/devices/LightDevice.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/devices/LightDevice.cpp
|
||||||
../../src/devices/ShutterDevice.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/devices/ShutterDevice.cpp
|
||||||
../../src/devices/SprinklerDevice.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/devices/SprinklerDevice.cpp
|
||||||
../../src/devices/Light.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/devices/Light.cpp
|
||||||
../../src/devices/Shutter.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/devices/Shutter.cpp
|
||||||
../../src/devices/Sprinkler.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/devices/Sprinkler.cpp
|
||||||
../../src/ubus/capabilities.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/ubus/capabilities.cpp
|
||||||
../../src/ubus/capabilities_lights.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/ubus/capabilities_lights.cpp
|
||||||
../../src/ubus/capabilities_shutters.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/ubus/capabilities_shutters.cpp
|
||||||
../../src/ubus/capabilities_sprinklers.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/ubus/capabilities_sprinklers.cpp
|
||||||
../../src/ubus/speach_command.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/ubus/speach_command.cpp
|
||||||
../../src/ubus/timers.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/ubus/timers.cpp
|
||||||
../../src/helpers/Tokenizer.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/helpers/Tokenizer.cpp
|
||||||
../../src/helpers/Strings.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/helpers/Strings.cpp
|
||||||
../../src/main.cpp
|
$ENV{SRC_DIR}/src/prog/domod/src/main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable (
|
add_executable (domod ${source_files})
|
||||||
domod
|
|
||||||
${source_files}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries (domod
|
target_link_libraries (domod
|
||||||
LINK_PUBLIC
|
LINK_PUBLIC
|
||||||
jsoncpp
|
jsoncpp
|
||||||
ubuscpp
|
ubus-cpp
|
||||||
|
ubox
|
||||||
|
ubus
|
||||||
|
blobmsg_json
|
||||||
rt
|
rt
|
||||||
)
|
)
|
||||||
|
|
||||||
|
install (TARGETS domod DESTINATION local/bin)
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#include <ubuscpp/UBusCall.h>
|
#include <ubus-cpp/UBusCall.h>
|
||||||
|
|
||||||
#include "devices/Light.h"
|
#include "devices/Light.h"
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#include <ubuscpp/UBusCall.h>
|
#include <ubus-cpp/UBusCall.h>
|
||||||
|
|
||||||
#include "devices/Shutter.h"
|
#include "devices/Shutter.h"
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#include <ubuscpp/UBusCall.h>
|
#include <ubus-cpp/UBusCall.h>
|
||||||
|
|
||||||
#include "devices/Sprinkler.h"
|
#include "devices/Sprinkler.h"
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#include <jsoncpp/json.h>
|
#include <jsoncpp/json.h>
|
||||||
|
|
||||||
#include "ubuscpp/UBusTimer.h"
|
#include "ubus-cpp/UBusTimer.h"
|
||||||
#include "timers/Event.h"
|
#include "timers/Event.h"
|
||||||
|
|
||||||
/*---------------------------------- Deps -----------------------------------*/
|
/*---------------------------------- Deps -----------------------------------*/
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <ubuscpp/UBusObject.h>
|
#include <ubus-cpp/UBusObject.h>
|
||||||
|
|
||||||
/*--------------------------------- Define ----------------------------------*/
|
/*--------------------------------- Define ----------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <jsoncpp/json.h>
|
#include <jsoncpp/json.h>
|
||||||
#include <ubuscpp/UBusObject.h>
|
#include <ubus-cpp/UBusObject.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <ubuscpp/UBusObject.h>
|
#include <ubus-cpp/UBusObject.h>
|
||||||
|
|
||||||
/*--------------------------------- Define ----------------------------------*/
|
/*--------------------------------- Define ----------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ extern "C" {
|
|||||||
#include <libubox/blobmsg_json.h>
|
#include <libubox/blobmsg_json.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <ubuscpp/UBusCall.h>
|
#include <ubus-cpp/UBusCall.h>
|
||||||
|
|
||||||
#include <jsoncpp/json.h>
|
#include <jsoncpp/json.h>
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <ubuscpp/UBusObject.h>
|
#include <ubus-cpp/UBusObject.h>
|
||||||
|
|
||||||
/*--------------------------------- Define ----------------------------------*/
|
/*--------------------------------- Define ----------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ extern "C" {
|
|||||||
#include <libubox/blobmsg_json.h>
|
#include <libubox/blobmsg_json.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <ubuscpp/UBusCall.h>
|
#include <ubus-cpp/UBusCall.h>
|
||||||
|
|
||||||
#include "devices/Devices.h"
|
#include "devices/Devices.h"
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <jsoncpp/json.h>
|
#include <jsoncpp/json.h>
|
||||||
#include <ubuscpp/UBusObject.h>
|
#include <ubus-cpp/UBusObject.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <ubuscpp/UBusObject.h>
|
#include <ubus-cpp/UBusObject.h>
|
||||||
|
|
||||||
/*--------------------------------- Define ----------------------------------*/
|
/*--------------------------------- Define ----------------------------------*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user