libmach: initial API bindings for mach core

This commit is contained in:
Zachary Huang 2022-07-13 00:55:36 -04:00 committed by Stephen Gutekanst
parent 02c7fe9a75
commit 9ece370059
8 changed files with 234 additions and 0 deletions

12
libmach/Makefile Normal file
View file

@ -0,0 +1,12 @@
build/libmach.dylib: ../build.zig ../src/*.zig ../src/**/*.zig
cd ..; zig build
test: test.c build/libmach.dylib
clang -L./build -lmach -o test test.c
test_c: test
# my best attempt at cross-platform dynamic linking (for now)
DYLD_LIBRARY_PATH=./build LD_LIBRARY_OATH=./build ./test
test_lisp: build/libmach.dylib
sbcl --load test.lisp