Makefile 607 Bytes
Newer Older
Thierry Martinez's avatar
Thierry Martinez committed
1
MODULES=$(shell sed -n -E 's/^- (.*\.plt?)$$/\1/p' toc.org)
Thierry Martinez's avatar
Thierry Martinez committed
2

Thierry Martinez's avatar
Thierry Martinez committed
3 4
all: biocham biocham_debug tests doc

SOLIMAN Sylvain's avatar
SOLIMAN Sylvain committed
5
.PHONY: tests doc clean
Thierry Martinez's avatar
Thierry Martinez committed
6

Thierry Martinez's avatar
Thierry Martinez committed
7
biocham: $(MODULES) toc.org Makefile
SOLIMAN Sylvain's avatar
SOLIMAN Sylvain committed
8
	@echo $(MODULES)
Thierry Martinez's avatar
Thierry Martinez committed
9
	swipl -o biocham --goal=start --toplevel=toplevel -c $(MODULES)
Thierry Martinez's avatar
Thierry Martinez committed
10

Thierry Martinez's avatar
Thierry Martinez committed
11
biocham_debug: $(MODULES) toc.org Makefile
Thierry Martinez's avatar
Thierry Martinez committed
12
	swipl -o biocham_debug --goal=initialize -c $(MODULES)
Thierry Martinez's avatar
Thierry Martinez committed
13 14 15 16

tests: biocham_tests
	./biocham_tests

Thierry Martinez's avatar
Thierry Martinez committed
17 18 19
doc: biocham
	./biocham --generate-doc

Thierry Martinez's avatar
Thierry Martinez committed
20 21 22
biocham_tests: $(MODULES) Makefile
	swipl -o biocham_tests \
	  --goal="call_cleanup((run_tests, halt(0)), halt(1))" -c $(MODULES)
SOLIMAN Sylvain's avatar
SOLIMAN Sylvain committed
23 24 25

clean:
	-rm -f biocham biocham_debug biocham_tests