You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2020/04/23 13:05:06 UTC
[plc4x] branch feature/c-api-simple-directories updated: - Changed
the structure again.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch feature/c-api-simple-directories
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/feature/c-api-simple-directories by this push:
new 210810f - Changed the structure again.
210810f is described below
commit 210810fd00aaf510495b431de44d2cf157d07011
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Apr 23 15:05:00 2020 +0200
- Changed the structure again.
---
sandbox/plc4c/CMakeLists.txt | 2 --
sandbox/plc4c/api/CMakeLists.txt | 2 +-
sandbox/plc4c/{includes => api/include}/Adder.h | 0
sandbox/plc4c/{includes => api/include}/plc4c.h | 6 +++---
.../plc4c/{includes/plc4c/api => api/include/plc4c}/connection.h | 0
sandbox/plc4c/{includes/plc4c/api => api/include/plc4c}/system.h | 0
sandbox/plc4c/{includes/plc4c/api => api/include/plc4c}/types.h | 0
sandbox/plc4c/api/src/Adder.c | 2 +-
sandbox/plc4c/api/test/AdderTest.c | 2 +-
sandbox/plc4c/examples/hello-world/src/hello_world.c | 2 +-
sandbox/plc4c/spi/CMakeLists.txt | 2 +-
.../plc4c/{includes/plc4c/spi => spi/include/plc4c}/types_private.h | 0
sandbox/plc4c/spi/src/connection.c | 4 ++--
sandbox/plc4c/spi/src/system.c | 4 ++--
sandbox/plc4c/spi/src/types.c | 4 ++--
15 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/sandbox/plc4c/CMakeLists.txt b/sandbox/plc4c/CMakeLists.txt
index c57cd06..f2349da 100644
--- a/sandbox/plc4c/CMakeLists.txt
+++ b/sandbox/plc4c/CMakeLists.txt
@@ -66,8 +66,6 @@ if(DEBUG_OUTPUT)
endforeach()
endif()
-include_directories("includes")
-
#[[
Build all the modules of PLC4C
]]
diff --git a/sandbox/plc4c/api/CMakeLists.txt b/sandbox/plc4c/api/CMakeLists.txt
index 160862e..cd129f7 100644
--- a/sandbox/plc4c/api/CMakeLists.txt
+++ b/sandbox/plc4c/api/CMakeLists.txt
@@ -17,7 +17,7 @@
under the License.
]]
-#include_directories("src/main/include")
+include_directories("include")
file(GLOB sources "src/*.c")
diff --git a/sandbox/plc4c/includes/Adder.h b/sandbox/plc4c/api/include/Adder.h
similarity index 100%
rename from sandbox/plc4c/includes/Adder.h
rename to sandbox/plc4c/api/include/Adder.h
diff --git a/sandbox/plc4c/includes/plc4c.h b/sandbox/plc4c/api/include/plc4c.h
similarity index 90%
rename from sandbox/plc4c/includes/plc4c.h
rename to sandbox/plc4c/api/include/plc4c.h
index fe66407..ea09afd 100644
--- a/sandbox/plc4c/includes/plc4c.h
+++ b/sandbox/plc4c/api/include/plc4c.h
@@ -24,9 +24,9 @@ extern "C" {
/* Convenience header file that just imports all the different parts of the API */
-#include "plc4c/api/types.h"
-#include "plc4c/api/system.h"
-#include "plc4c/api/connection.h"
+#include "plc4c/types.h"
+#include "plc4c/system.h"
+#include "plc4c/connection.h"
#ifdef __cplusplus
}
diff --git a/sandbox/plc4c/includes/plc4c/api/connection.h b/sandbox/plc4c/api/include/plc4c/connection.h
similarity index 100%
rename from sandbox/plc4c/includes/plc4c/api/connection.h
rename to sandbox/plc4c/api/include/plc4c/connection.h
diff --git a/sandbox/plc4c/includes/plc4c/api/system.h b/sandbox/plc4c/api/include/plc4c/system.h
similarity index 100%
rename from sandbox/plc4c/includes/plc4c/api/system.h
rename to sandbox/plc4c/api/include/plc4c/system.h
diff --git a/sandbox/plc4c/includes/plc4c/api/types.h b/sandbox/plc4c/api/include/plc4c/types.h
similarity index 100%
rename from sandbox/plc4c/includes/plc4c/api/types.h
rename to sandbox/plc4c/api/include/plc4c/types.h
diff --git a/sandbox/plc4c/api/src/Adder.c b/sandbox/plc4c/api/src/Adder.c
index 69b64b9..8f14af0 100644
--- a/sandbox/plc4c/api/src/Adder.c
+++ b/sandbox/plc4c/api/src/Adder.c
@@ -17,7 +17,7 @@
* under the License.
*/
#include<stdio.h>
-#include <Adder.h>
+#include "../include/Adder.h"
int add(int a, int b) {
return a + b;
diff --git a/sandbox/plc4c/api/test/AdderTest.c b/sandbox/plc4c/api/test/AdderTest.c
index 05b8bea..7033a32 100644
--- a/sandbox/plc4c/api/test/AdderTest.c
+++ b/sandbox/plc4c/api/test/AdderTest.c
@@ -17,7 +17,7 @@
* under the License.
*/
#include <unity.h>
-#include <Adder.h>
+#include "../include/Adder.h"
void setUp(void) {
}
diff --git a/sandbox/plc4c/examples/hello-world/src/hello_world.c b/sandbox/plc4c/examples/hello-world/src/hello_world.c
index 9a14b8f..1768792 100644
--- a/sandbox/plc4c/examples/hello-world/src/hello_world.c
+++ b/sandbox/plc4c/examples/hello-world/src/hello_world.c
@@ -17,7 +17,7 @@
* under the License.
*/
#include <stdio.h>
-#include <plc4c.h>
+#include "../../../api/include/plc4c.h"
void onGlobalConnectionSuccess(plc4c_connection *connection) {
printf("Connected to %s", plc4c_connection_get_connection_string(connection));
diff --git a/sandbox/plc4c/spi/CMakeLists.txt b/sandbox/plc4c/spi/CMakeLists.txt
index 2ed8405..d620594 100644
--- a/sandbox/plc4c/spi/CMakeLists.txt
+++ b/sandbox/plc4c/spi/CMakeLists.txt
@@ -17,7 +17,7 @@
under the License.
]]
-#include_directories("../includes")
+include_directories("include")
file(GLOB sources "src/*.c")
diff --git a/sandbox/plc4c/includes/plc4c/spi/types_private.h b/sandbox/plc4c/spi/include/plc4c/types_private.h
similarity index 100%
rename from sandbox/plc4c/includes/plc4c/spi/types_private.h
rename to sandbox/plc4c/spi/include/plc4c/types_private.h
diff --git a/sandbox/plc4c/spi/src/connection.c b/sandbox/plc4c/spi/src/connection.c
index 673efb0..5ceceb3 100644
--- a/sandbox/plc4c/spi/src/connection.c
+++ b/sandbox/plc4c/spi/src/connection.c
@@ -17,8 +17,8 @@
* under the License.
*/
-#include <plc4c/api/connection.h>
-#include <plc4c/spi/types_private.h>
+#include "../../api/include/plc4c/connection.h"
+#include "../include/plc4c/types_private.h"
return_code plc4c_connection_disconnect(plc4c_connection *connection) {
return OK;
diff --git a/sandbox/plc4c/spi/src/system.c b/sandbox/plc4c/spi/src/system.c
index fd8505e..1bad2d1 100644
--- a/sandbox/plc4c/spi/src/system.c
+++ b/sandbox/plc4c/spi/src/system.c
@@ -18,8 +18,8 @@
*/
#include <stdlib.h>
-#include <plc4c/api/system.h>
-#include <plc4c/spi/types_private.h>
+#include "../../api/include/plc4c/system.h"
+#include "../include/plc4c/types_private.h"
return_code plc4c_system_create(plc4c_system **system) {
return OK;
diff --git a/sandbox/plc4c/spi/src/types.c b/sandbox/plc4c/spi/src/types.c
index f9223b5..a3c7432 100644
--- a/sandbox/plc4c/spi/src/types.c
+++ b/sandbox/plc4c/spi/src/types.c
@@ -17,8 +17,8 @@
* under the License.
*/
-#include <plc4c/api/types.h>
-#include <plc4c/spi/types_private.h>
+#include "../../api/include/plc4c/types.h"
+#include "../include/plc4c/types_private.h"
char *plc4c_return_code_to_message(return_code err) {
return "hurz";