Skip to content

Commit

Permalink
All libs/ now build shared and static libraries. io2c is being genera…
Browse files Browse the repository at this point in the history
…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
Jeremy Tregunna authored and Jeremy Tregunna committed May 3, 2010
1 parent 86413d8 commit 0eafe77
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 72 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -88,3 +88,6 @@ addons/*/docs/docs.txt
extras/osxvm/build extras/osxvm/build
extras/osxmain/build extras/osxmain/build
*~ *~
CMakeFiles
CMakeCache.txt
cmake_install.cmake
1 change: 1 addition & 0 deletions libs/CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
add_subdirectory(coroutine) add_subdirectory(coroutine)
add_subdirectory(basekit) add_subdirectory(basekit)
add_subdirectory(garbagecollector) add_subdirectory(garbagecollector)
add_subdirectory(iovm)
39 changes: 1 addition & 38 deletions libs/basekit/CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,44 +10,7 @@ add_definitions("-DBUILDING_BASEKIT_DLL")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/source/simd_cph/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/source/simd_cph/include)


# Our library sources. # Our library sources.
set(SRCS file(GLOB SRCS "source/*.c")
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
)


# Now build the shared library # Now build the shared library
add_library(basekit SHARED ${SRCS}) add_library(basekit SHARED ${SRCS})
Expand Down
7 changes: 2 additions & 5 deletions libs/coroutine/CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ set(ASM_SOURCES source/asm.S)
set_source_files_properties(${ASM_SOURCES} PROPERTIES LANGUAGE C) set_source_files_properties(${ASM_SOURCES} PROPERTIES LANGUAGE C)


# Sources... in all their wonderous glory! # Sources... in all their wonderous glory!
set(SRCS file(GLOB SRCS "source/*.c")
source/Coro.c list(APPEND SRCS ${ASM_SOURCES})
source/context.c
${ASM_SOURCES}
)


# Now build the shared library # Now build the shared library
add_library(coroutine SHARED ${SRCS}) add_library(coroutine SHARED ${SRCS})
Expand Down
5 changes: 1 addition & 4 deletions libs/garbagecollector/CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ add_definitions("-DBUILDING_COLLECTOR_DLL")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../basekit/source) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../basekit/source)


# Our library sources. # Our library sources.
set(SRCS file(GLOB SRCS "source/*.c")
source/CollectorMarker.c
source/Collector.c
)


# Now build the shared library # Now build the shared library
add_library(garbagecollector SHARED ${SRCS}) add_library(garbagecollector SHARED ${SRCS})
Expand Down
114 changes: 114 additions & 0 deletions libs/iovm/CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
@@ -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})

2 changes: 0 additions & 2 deletions libs/iovm/Makefile

This file was deleted.

23 changes: 0 additions & 23 deletions libs/iovm/Makefile.local

This file was deleted.

10 changes: 10 additions & 0 deletions libs/iovm/tools/CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
@@ -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)

0 comments on commit 0eafe77

Please sign in to comment.