summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--chunk.c6
-rw-r--r--compiler.c10
-rw-r--r--include/ucode/chunk.h (renamed from chunk.h)0
-rw-r--r--include/ucode/compiler.h (renamed from compiler.h)0
-rw-r--r--include/ucode/lexer.h (renamed from lexer.h)0
-rw-r--r--include/ucode/lib.h (renamed from lib.h)0
-rw-r--r--include/ucode/module.h (renamed from module.h)0
-rw-r--r--include/ucode/source.h (renamed from source.h)0
-rw-r--r--include/ucode/types.h (renamed from types.h)0
-rw-r--r--include/ucode/util.h (renamed from util.h)0
-rw-r--r--include/ucode/value.h (renamed from value.h)0
-rw-r--r--include/ucode/vm.h (renamed from vm.h)0
-rw-r--r--lexer.c6
-rw-r--r--lib.c10
-rw-r--r--lib/fs.c2
-rw-r--r--lib/math.c2
-rw-r--r--lib/ubus.c2
-rw-r--r--lib/uci.c2
-rw-r--r--main.c10
-rw-r--r--source.c2
-rw-r--r--types.c6
-rw-r--r--value.c8
-rw-r--r--vm.c6
24 files changed, 39 insertions, 37 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a93b80..83b029e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,8 @@ IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6)
ENDIF()
ADD_DEFINITIONS(-Wmissing-declarations -Wno-error=unused-variable -Wno-unused-parameter)
+INCLUDE_DIRECTORIES(include)
+
OPTION(FS_SUPPORT "Filesystem plugin support" ON)
OPTION(MATH_SUPPORT "Math plugin support" ON)
OPTION(UBUS_SUPPORT "Ubus plugin support" ON)
@@ -131,5 +133,5 @@ INSTALL(TARGETS ucode RUNTIME DESTINATION bin)
INSTALL(TARGETS libucode LIBRARY DESTINATION lib)
INSTALL(TARGETS ${LIBRARIES} LIBRARY DESTINATION lib/ucode)
-SET(UCODE_HEADERS chunk.h compiler.h lexer.h lib.h module.h source.h types.h util.h value.h vm.h)
+FILE(GLOB UCODE_HEADERS "include/ucode/*.h")
INSTALL(FILES ${UCODE_HEADERS} DESTINATION include/ucode)
diff --git a/chunk.c b/chunk.c
index 8b2c447..ab576da 100644
--- a/chunk.c
+++ b/chunk.c
@@ -16,9 +16,9 @@
#include <assert.h>
-#include "chunk.h"
-#include "types.h"
-#include "util.h"
+#include "ucode/chunk.h"
+#include "ucode/types.h"
+#include "ucode/util.h"
#define OFFSETINFO_BITS (sizeof(((uc_offsetinfo_t *)NULL)->entries[0]) * 8)
#define OFFSETINFO_BYTE_BITS 3
diff --git a/compiler.c b/compiler.c
index 9278324..a1d058a 100644
--- a/compiler.c
+++ b/compiler.c
@@ -16,11 +16,11 @@
#include <assert.h>
-#include "compiler.h"
-#include "chunk.h"
-#include "vm.h" /* I_* */
-#include "source.h"
-#include "lib.h" /* format_error_context() */
+#include "ucode/compiler.h"
+#include "ucode/chunk.h"
+#include "ucode/vm.h" /* I_* */
+#include "ucode/source.h"
+#include "ucode/lib.h" /* format_error_context() */
static void uc_compiler_compile_unary(uc_compiler_t *compiler, bool assignable);
static void uc_compiler_compile_binary(uc_compiler_t *compiler, bool assignable);
diff --git a/chunk.h b/include/ucode/chunk.h
index 458af1f..458af1f 100644
--- a/chunk.h
+++ b/include/ucode/chunk.h
diff --git a/compiler.h b/include/ucode/compiler.h
index 19fcf37..19fcf37 100644
--- a/compiler.h
+++ b/include/ucode/compiler.h
diff --git a/lexer.h b/include/ucode/lexer.h
index 1b19b60..1b19b60 100644
--- a/lexer.h
+++ b/include/ucode/lexer.h
diff --git a/lib.h b/include/ucode/lib.h
index 7eeae9f..7eeae9f 100644
--- a/lib.h
+++ b/include/ucode/lib.h
diff --git a/module.h b/include/ucode/module.h
index 43d9d51..43d9d51 100644
--- a/module.h
+++ b/include/ucode/module.h
diff --git a/source.h b/include/ucode/source.h
index 3de7c93..3de7c93 100644
--- a/source.h
+++ b/include/ucode/source.h
diff --git a/types.h b/include/ucode/types.h
index e2cb15d..e2cb15d 100644
--- a/types.h
+++ b/include/ucode/types.h
diff --git a/util.h b/include/ucode/util.h
index 858a3fd..858a3fd 100644
--- a/util.h
+++ b/include/ucode/util.h
diff --git a/value.h b/include/ucode/value.h
index 04d37a9..04d37a9 100644
--- a/value.h
+++ b/include/ucode/value.h
diff --git a/vm.h b/include/ucode/vm.h
index 553cf61..553cf61 100644
--- a/vm.h
+++ b/include/ucode/vm.h
diff --git a/lexer.c b/lexer.c
index 8e6378a..07b3cb5 100644
--- a/lexer.c
+++ b/lexer.c
@@ -25,9 +25,9 @@
#include <errno.h>
#include <endian.h>
-#include "vm.h"
-#include "lib.h"
-#include "lexer.h"
+#include "ucode/vm.h"
+#include "ucode/lib.h"
+#include "ucode/lexer.h"
#define UC_LEX_CONTINUE_PARSING (void *)1
diff --git a/lib.c b/lib.c
index ebdd1af..c61e307 100644
--- a/lib.c
+++ b/lib.c
@@ -32,11 +32,11 @@
#include <sys/wait.h>
#include <fnmatch.h>
-#include "lexer.h"
-#include "compiler.h"
-#include "vm.h"
-#include "lib.h"
-#include "source.h"
+#include "ucode/lexer.h"
+#include "ucode/compiler.h"
+#include "ucode/vm.h"
+#include "ucode/lib.h"
+#include "ucode/source.h"
static void
format_context_line(uc_stringbuf_t *buf, const char *line, size_t off, bool compact)
diff --git a/lib/fs.c b/lib/fs.c
index 7d501a2..a6a5227 100644
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -26,7 +26,7 @@
#include <pwd.h>
#include <glob.h>
-#include "../module.h"
+#include "ucode/module.h"
#define err_return(err) do { last_error = err; return NULL; } while(0)
diff --git a/lib/math.c b/lib/math.c
index 5ba8d76..e2c2fd8 100644
--- a/lib/math.c
+++ b/lib/math.c
@@ -17,7 +17,7 @@
#include <math.h>
#include <sys/time.h>
-#include "../module.h"
+#include "ucode/module.h"
static bool srand_called = false;
diff --git a/lib/ubus.c b/lib/ubus.c
index d1b2c8c..79b615c 100644
--- a/lib/ubus.c
+++ b/lib/ubus.c
@@ -19,7 +19,7 @@
#include <libubox/blobmsg.h>
#include <libubox/blobmsg_json.h>
-#include "../module.h"
+#include "ucode/module.h"
#define err_return(err) do { last_error = err; return NULL; } while(0)
diff --git a/lib/uci.c b/lib/uci.c
index 89c5c92..116fad6 100644
--- a/lib/uci.c
+++ b/lib/uci.c
@@ -17,7 +17,7 @@
#include <string.h>
#include <uci.h>
-#include "../module.h"
+#include "ucode/module.h"
#define err_return(err) do { last_error = err; return NULL; } while(0)
diff --git a/main.c b/main.c
index 6544a59..0229094 100644
--- a/main.c
+++ b/main.c
@@ -28,11 +28,11 @@
#include <json-c/json.h>
#endif
-#include "compiler.h"
-#include "lexer.h"
-#include "lib.h"
-#include "vm.h"
-#include "source.h"
+#include "ucode/compiler.h"
+#include "ucode/lexer.h"
+#include "ucode/lib.h"
+#include "ucode/vm.h"
+#include "ucode/source.h"
static void
diff --git a/source.c b/source.c
index e5a924f..b7bb96d 100644
--- a/source.c
+++ b/source.c
@@ -16,7 +16,7 @@
#include <string.h>
-#include "source.h"
+#include "ucode/source.h"
uc_source_t *
diff --git a/types.c b/types.c
index 5808d8e..e888687 100644
--- a/types.c
+++ b/types.c
@@ -21,9 +21,9 @@
#include <errno.h>
#include <math.h>
-#include "types.h"
-#include "util.h"
-#include "vm.h"
+#include "ucode/types.h"
+#include "ucode/util.h"
+#include "ucode/vm.h"
uc_type_t
ucv_type(uc_value_t *uv)
diff --git a/value.c b/value.c
index b72ba8c..c27470f 100644
--- a/value.c
+++ b/value.c
@@ -20,10 +20,10 @@
#include <ctype.h> /* isspace(), isdigit(), isxdigit() */
#include <errno.h>
-#include "util.h"
-#include "chunk.h"
-#include "value.h"
-#include "vm.h"
+#include "ucode/util.h"
+#include "ucode/chunk.h"
+#include "ucode/value.h"
+#include "ucode/vm.h"
#define TAG_TYPE uint64_t
#define TAG_BITS 3
diff --git a/vm.c b/vm.c
index 443c64e..79838f9 100644
--- a/vm.c
+++ b/vm.c
@@ -20,9 +20,9 @@
#include <ctype.h>
#include <math.h>
-#include "vm.h"
-#include "compiler.h"
-#include "lib.h" /* format_error_context() */
+#include "ucode/vm.h"
+#include "ucode/compiler.h"
+#include "ucode/lib.h" /* format_error_context() */
#undef __insn
#define __insn(_name) #_name,