Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

All libs/ now build shared and static libraries. io2c is being genera…

…ted as well. io and io_static are still absent. .gitignore updated to reflect files we don't want to know anything about during a commit. That's all.
  • Loading branch information...
commit 0eafe77ae45a45d2637ca26b6ec8e97fac0ef832 1 parent 86413d8
Jeremy Tregunna authored
View
3  .gitignore
@@ -88,3 +88,6 @@ addons/*/docs/docs.txt
extras/osxvm/build
extras/osxmain/build
*~
+CMakeFiles
+CMakeCache.txt
+cmake_install.cmake
View
1  libs/CMakeLists.txt
@@ -8,3 +8,4 @@
add_subdirectory(coroutine)
add_subdirectory(basekit)
add_subdirectory(garbagecollector)
+add_subdirectory(iovm)
View
39 libs/basekit/CMakeLists.txt
@@ -10,44 +10,7 @@ add_definitions("-DBUILDING_BASEKIT_DLL")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/source/simd_cph/include)
# Our library sources.
-set(SRCS
- source/BStream.c
- source/BStreamTag.c
- source/CHash.c
- source/Common.c
- source/Date.c
- source/Duration.c
- source/DynLib.c
- source/Hash_fnv.c
- source/Hash_murmur.c
- source/Hash_superfast.c
- source/List.c
- source/MainArgs.c
- source/PointerHash.c
- source/PortableGettimeofday.c
- source/PortableSnprintf.c
- source/PortableSorting.c
- source/PortableStrlcpy.c
- source/PortableStrptime.c
- source/PortableTruncate.c
- source/PortableUsleep.c
- source/RandomGen.c
- source/Stack.c
- source/UArray.c
- source/UArray_character.c
- source/UArray_format.c
- source/UArray_math.c
- source/UArray_path.c
- source/UArray_stream.c
- source/UArray_string.c
- source/UArray_utf.c
- source/cdecode.c
- source/cencode.c
- source/ucs2.c
- source/ucs4.c
- source/utf8.c
- source/utf_convert.c
-)
+file(GLOB SRCS "source/*.c")
# Now build the shared library
add_library(basekit SHARED ${SRCS})
View
7 libs/coroutine/CMakeLists.txt
@@ -14,11 +14,8 @@ set(ASM_SOURCES source/asm.S)
set_source_files_properties(${ASM_SOURCES} PROPERTIES LANGUAGE C)
# Sources... in all their wonderous glory!
-set(SRCS
- source/Coro.c
- source/context.c
- ${ASM_SOURCES}
-)
+file(GLOB SRCS "source/*.c")
+list(APPEND SRCS ${ASM_SOURCES})
# Now build the shared library
add_library(coroutine SHARED ${SRCS})
View
5 libs/garbagecollector/CMakeLists.txt
@@ -10,10 +10,7 @@ add_definitions("-DBUILDING_COLLECTOR_DLL")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../basekit/source)
# Our library sources.
-set(SRCS
- source/CollectorMarker.c
- source/Collector.c
-)
+file(GLOB SRCS "source/*.c")
# Now build the shared library
add_library(garbagecollector SHARED ${SRCS})
View
114 libs/iovm/CMakeLists.txt
@@ -0,0 +1,114 @@
+# Base Io build system
+# Written by Jeremy Tregunna <jeremy.tregunna@me.com>
+#
+# Build the Io VM.
+
+# Need to go in and build io2c first. We need it to build our library.
+add_subdirectory(tools)
+
+# Our Io source files to be "compiled" into a C source file.
+set(IO_SRCS
+ io/A0_List.io
+ io/A1_OperatorTable.io
+ io/A2_Object.io
+ io/A3_List.io
+ io/A4_Exception.io
+ io/Actor.io
+ io/AddonLoader.io
+ io/B_List.io
+ io/B_Sequence.io
+ io/Block.io
+ io/CFunction.io
+ io/Date.io
+ io/Debugger.io
+ io/Directory.io
+ io/DynLib.io
+ io/Error.io
+ io/File.io
+ io/List_schwartzian.io
+ io/Map.io
+ io/Message.io
+ io/Number.io
+ io/Profiler.io
+ io/Sandbox.io
+ io/Serialize.io
+ io/System.io
+ io/UnitTest.io
+ io/Vector.io
+ io/Y_Path.io
+ io/Z_CLI.io
+ io/Z_Importer.io
+)
+
+# The custom command to generate source/IoVMInit.c which is our
+# "compiled" Io to C source code.
+add_custom_command(
+ OUTPUT source/IoVMInit.c
+ COMMAND tools/io2c VMCode IoState_doString_ ${IO_SRCS} > source/IoVMInit.c
+ DEPENDS io2c
+)
+
+# Marvelous flags, likely compiler dependent.
+add_definitions("-DBUILDING_IOVM_DLL")
+
+# Include dirs, -I flags and whatnot
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}/../basekit/source
+ ${CMAKE_CURRENT_SOURCE_DIR}/../coroutine/source
+ ${CMAKE_CURRENT_SOURCE_DIR}/../garbagecollector/source
+)
+
+# Our library sources.
+set(SRCS
+ source/IoBlock.c
+ source/IoCFunction.c
+ source/IoCall.c
+ source/IoCollector.c
+ source/IoCompiler.c
+ source/IoCoroutine.c
+ source/IoDate.c
+ source/IoDebugger.c
+ source/IoDirectory.c
+ source/IoDuration.c
+ source/IoDynLib.c
+ source/IoError.c
+ source/IoFile.c
+ source/IoFile_stat.c
+ source/IoLexer.c
+ source/IoList.c
+ source/IoMap.c
+ source/IoMessage.c
+ source/IoMessage_opShuffle.c
+ source/IoMessage_parser.c
+ source/IoNumber.c
+ source/IoObject.c
+ source/IoObject_flow.c
+ source/IoProfiler.c
+ source/IoSandbox.c
+ source/IoSeq.c
+ source/IoSeq_immutable.c
+ source/IoSeq_mutable.c
+ source/IoSeq_vector.c
+ source/IoState.c
+ source/IoState_callbacks.c
+ source/IoState_coros.c
+ source/IoState_debug.c
+ source/IoState_eval.c
+ source/IoState_exceptions.c
+ source/IoState_symbols.c
+ source/IoSystem.c
+ source/IoTag.c
+ source/IoToken.c
+ source/IoVMInit.c
+ source/IoWeakLink.c
+ source/PHash.c
+)
+
+# Now build the shared library
+add_library(iovmall SHARED ${SRCS})
+add_dependencies(iovmall io2c basekit coroutine garbagecollector)
+target_link_libraries(iovmall basekit coroutine garbagecollector)
+
+# ...And the static library
+add_library(iovmall_static STATIC ${SRCS})
+
View
2  libs/iovm/Makefile
@@ -1,2 +0,0 @@
-include ../../Makefile.lib
-CFLAGS += -DBUILDING_IOVM_DLL $(IOVMALLFLAGS)
View
23 libs/iovm/Makefile.local
@@ -1,23 +0,0 @@
-CCLDOUTFLAG := -o
-ifneq (,$(findstring Windows,$(SYS)))
- CCLDOUTFLAG := -Fe
-endif
-
-iofiles=$(wildcard io/*.io)
-
-tools/io2c:
- $(CC) tools/io2c.c $(CCLDOUTFLAG)tools/io2c
-
-all_begin: source/IoVMInit.c
-
-source/IoVMInit.c: tools/io2c $(iofiles)
- ./tools/io2c VMCode IoState_doString_ $(iofiles) > $@
-
-all_end:
-
-
-clean:
- -rm -f tools/io2c
-
-test:
-
View
10 libs/iovm/tools/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Base Io build system
+# Written by Jeremy Tregunna <jeremy.tregunna@me.com>
+#
+# io2c -- Take an Io script, and "compile" it into C source
+# code. I use the term loosely, since all it does is make a
+# big C String, and pipe that through IoState's evaluator.
+# Nevertheless, this is it!
+
+# Just build the bloody binary!
+add_executable(io2c io2c.c)
Please sign in to comment.
Something went wrong with that request. Please try again.