Skip to content

Commit

Permalink
Merge pull request #1 from bdoolittle/julia-ize-porta
Browse files Browse the repository at this point in the history
Julia ize porta, merging
- shared object can be called with CCall
- xporta and valid  binaries work
- cross-compilation with BinaryBuilder is successful
  • Loading branch information
bdoolittle authored Apr 24, 2022
2 parents 5379133 + 859d3c2 commit 41a7653
Show file tree
Hide file tree
Showing 35 changed files with 1,046 additions and 2,400 deletions.
38 changes: 3 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
porta.log

# ignore changes to examples/
examples/*

# Object files
*.o
*.ko
*.obj
*.elf

# Libraries
*.lib
*.a

# Dependency files
*.d

# Compiled binary files
gnu-make/bin/valid
gnu-make/bin/xporta

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Build and install directories for clean out-of-source testing
build/*
install/*
39 changes: 39 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
cmake_minimum_required(VERSION 3.12)
project(julia-porta)

set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:\$ORIGIN/../lib:\$ORIGIN")

if(MSVC)
add_compile_options(/W4)
else()
add_compile_options(-Wall)
endif()

set(JULIA_PORTA_SRC "${PROJECT_SOURCE_DIR}/src")

add_library(porta SHARED
"${JULIA_PORTA_SRC}/arith.c"
"${JULIA_PORTA_SRC}/common.c"
"${JULIA_PORTA_SRC}/four_mot.c"
"${JULIA_PORTA_SRC}/inout.c"
"${JULIA_PORTA_SRC}/largecalc.c"
"${JULIA_PORTA_SRC}/log.c"
"${JULIA_PORTA_SRC}/mp.c"
"${JULIA_PORTA_SRC}/portsort.c"
"${JULIA_PORTA_SRC}/porta.c"
)
target_include_directories(porta PRIVATE "${JULIA_PORTA_SRC}")

add_executable(xporta
"${JULIA_PORTA_SRC}/main.c"
)
target_link_libraries(xporta PRIVATE porta)
target_include_directories(xporta PRIVATE "${JULIA_PORTA_SRC}")

add_executable(valid
"${JULIA_PORTA_SRC}/valid.c"
)
target_link_libraries(valid PRIVATE porta)
target_include_directories(valid PRIVATE "${JULIA_PORTA_SRC}")

install(TARGETS porta xporta valid)
Loading

0 comments on commit 41a7653

Please sign in to comment.