(use make) (define +objects+ (map symbol->string '(lapi lcode ldebug ldo ldump lfunc lgc llex lmem lobject lopcodes lparser lstate lstring ltable ltm lundump lvm lzio lauxlib lbaselib ldblib liolib lmathlib loslib ltablib lstrlib loadlib linit))) (define +ofiles+ (map (cut make-pathname #f <> "o") +objects+)) (define +cflags+ "-C \"-I .\"") (make/proc (cons* `("lua.so" ("lua-main.o" . ,+ofiles+) ,(lambda () (compile -s lua-main.o ,@+ofiles+ -o lua.so))) `("lua-main.o" ("lua-main.scm") ,(lambda () (compile -S -sc -O2 -d1 -j lua lua-main.scm -o lua-main.o ,+cflags+ ))) `("lua.import.so" ("lua-main.o" "lua.import.scm" ) ,(lambda () (compile -s lua.import.scm))) (map (lambda (o) (let ((cfile (pathname-replace-extension o "c"))) (list o (list cfile) (lambda () (compile -sc ,cfile -o ,o ,+cflags+))))) +ofiles+)) (list "lua.import.so" "lua.so" ) ) (install-extension ; Name of your extension: 'lua ; Files to install for your extension: `("lua.so" "lua.import.so") ; Assoc list with properties for your extension: `((version 0.4) ))