Make it compile.

This commit is contained in:
Dominik Pantůček 2025-03-31 19:54:16 +02:00
parent a61fa0dc31
commit 4fb44325de
4 changed files with 25 additions and 2 deletions

3
backend/.gitignore vendored
View file

@ -1 +1,4 @@
frontend.scm
*.import.scm
*.o
*.link

View file

@ -1,11 +1,28 @@
.PHONY: default
default: ../brminv
SCRP=$(shell chicken-install -repository)
CSC=CHICKEN_REPOSITORY_PATH=../eggs:$(SCRP) csc
BRMINV_SOURCES=brminv.scm frontend.import.scm
BRMINV_OBJS=brminv.o frontend.o
../brminv: $(BRMINV_SOURCES)
touch ../brminv
%.o: %.scm
$(CSC) -c -static $<
%.import.scm: %.scm
$(CSC) -regenerate-import-libraries -P -J $<
../brminv: $(BRMINV_OBJS)
$(CSC) -L --no-lto -L -Wl,-static -L -Wl,-lsqlite3 -L -Wl,-Bdynamic -strip -static -o $@ $(BRMINV_OBJS)
frontend.o: frontend.import.scm
frontend.import.scm: frontend.scm
.PHONY: frontend.scm
frontend.scm:
cd ../frontend && npm run build && cd ../backend && csi -b -q ../tools/schemify-tree.scm -- ../frontend/dist frontend frontend-lookup
BRMINV_SOURCES=brminv.scm frontend.import.scm
brminv.o: $(BRMINV_SOURCES)

View file

@ -1,3 +1,4 @@
(import frontend)
(display "brminv")
(newline)

View file

@ -77,6 +77,8 @@
(define (compile-tree-module dir name getter)
(with-output-to-file (format "~a.scm" name)
(lambda ()
(display `(declare (unit ,name)))
(newline)
(write (make-tree-module dir name getter))
(newline))))