diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fa358f..9260a4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,6 @@ add_subdirectory(diag) add_subdirectory(lang) add_subdirectory(asm) add_subdirectory(mie) -add_subdirectory(rt) +add_subdirectory(vm) add_subdirectory(frontend) add_subdirectory(test) diff --git a/frontend/CMakeLists.txt b/frontend/CMakeLists.txt index 5e7318f..5bd82c9 100644 --- a/frontend/CMakeLists.txt +++ b/frontend/CMakeLists.txt @@ -8,7 +8,7 @@ file(GLOB ivy_sources file(GLOB_RECURSE sys_sources sys/${system_name}/*.c sys/${system_name}/*.h) - + if (WIN32) set(rc_file ${CMAKE_CURRENT_SOURCE_DIR}/../res/win32/frontend.rc) endif () @@ -16,7 +16,7 @@ endif () add_executable(ivy ${ivy_sources} ${sys_sources} ${rc_file}) target_link_libraries( ivy - ivy-rt + ivy-vm ivy-asm ivy-lang ivy-common @@ -24,4 +24,4 @@ target_link_libraries( Bluelib::Object Bluelib::Cmd) -target_compile_definitions(ivy PRIVATE IVY_STATIC=${IVY_STATIC}) \ No newline at end of file +target_compile_definitions(ivy PRIVATE IVY_STATIC=${IVY_STATIC}) diff --git a/rt/CMakeLists.txt b/rt/CMakeLists.txt deleted file mode 100644 index d1590aa..0000000 --- a/rt/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -file(GLOB_RECURSE rt_sources *.c *.h include/ivy/rt/*.h) - -if (WIN32) - set(rc_file ${CMAKE_CURRENT_SOURCE_DIR}/../res/win32/rt.rc) -endif () - -if (IVY_STATIC) - add_library(ivy-rt STATIC ${rt_sources} ${rc_file}) -else () - add_library(ivy-rt SHARED ${rt_sources} ${rc_file}) -endif () - -target_include_directories(ivy-rt PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/) -target_link_libraries(ivy-rt ivy-common) -target_compile_definitions(ivy-rt PRIVATE IVY_EXPORT=1 IVY_STATIC=${IVY_STATIC}) \ No newline at end of file diff --git a/rt/runtime.c b/rt/runtime.c deleted file mode 100644 index 7e818a8..0000000 --- a/rt/runtime.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -void placeholder(void) -{ - -} \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e72b607..c35619e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -4,7 +4,7 @@ foreach (test_file ${test_sources}) get_filename_component(test_name ${test_file} NAME_WE) add_executable(${test_name} ${test_file}) - target_link_libraries(${test_name} ivy-common ivy-diag ivy-lang ivy-asm ivy-rt mie) + target_link_libraries(${test_name} ivy-common ivy-diag ivy-lang ivy-asm ivy-vm mie) set_target_properties(${test_name} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" diff --git a/vm/CMakeLists.txt b/vm/CMakeLists.txt new file mode 100644 index 0000000..07f1a47 --- /dev/null +++ b/vm/CMakeLists.txt @@ -0,0 +1,15 @@ +file(GLOB_RECURSE vm_sources *.c *.h include/ivy/vm/*.h) + +if (WIN32) + set(rc_file ${CMAKE_CURRENT_SOURCE_DIR}/../res/win32/vm.rc) +endif () + +if (IVY_STATIC) + add_library(ivy-vm STATIC ${vm_sources} ${rc_file}) +else () + add_library(ivy-vm SHARED ${vm_sources} ${rc_file}) +endif () + +target_include_directories(ivy-vm PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/) +target_link_libraries(ivy-vm ivy-common) +target_compile_definitions(ivy-vm PRIVATE IVY_EXPORT=1 IVY_STATIC=${IVY_STATIC}) diff --git a/rt/include/ivy/rt/runtime.h b/vm/include/ivy/vm/vm.h similarity index 100% rename from rt/include/ivy/rt/runtime.h rename to vm/include/ivy/vm/vm.h diff --git a/vm/vm.c b/vm/vm.c new file mode 100644 index 0000000..fe17e61 --- /dev/null +++ b/vm/vm.c @@ -0,0 +1,5 @@ +#include + +void placeholder(void) +{ +}