This commit is contained in:
2024-10-10 18:16:13 -05:00
commit 3657b8de60
11 changed files with 118 additions and 0 deletions

21
guile-agar/Makefile Normal file
View File

@@ -0,0 +1,21 @@
CFLAGS:=`pkg-config --cflags guile-3.0 agar` -I./include/
LDLIBS:=`pkg-config --libs guile-3.0 agar`
SRCS:=$(wildcard src/*.c)
OBJS:=$(SRCS:.c=.o)
SCMS:=$(patsubst src/%.o,scm/agar/%.scm,$(OBJS))
OBJS+=$(patsubst scm/agar/%.scm,scm/agar_%_wrap.o,$(SCMS))
.PHONY: driver
all: libguileagar.so $(SCMS)
clean:
rm -rf libguileagar.so $(SCMS) $(OBJS) $(WRAPS)
libguileagar.so: $(OBJS)
$(CC) -shared -fPIC -o $@ $^ $(LDLIBS)
scm/agar/%.scm scm/agar_%_wrap.c: scm/%.i include/%.h
swig -I./include -guile -Linkage module -scmstub -package agar -o scm/agar_$*_wrap.c scm/$*.i
driver:
GUILE_EXTENSIONS_PATH=. guile -L scm driver.scm