-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (64 loc) · 2.46 KB
/
Makefile
File metadata and controls
79 lines (64 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
LDPATH=$(LD_LIBRARY_PATH)
LONG_BIT=$(shell getconf LONG_BIT)
CFLAGS_32=
CFLAGS_64=-fPIC
CFLAGS=$(CFLAGS_$(LONG_BIT))
CHEZ?=scheme
RACKET?=plt-r6rs
GUILE?=guile
SAGITTARIUS?=sagittarius
all:
@echo 'usage: make $traget'
@echo ' sagittarius'
@echo ' racket'
@echo ' guile'
@echo ' chez'
prepare:
cd tests; gcc $(CFLAGS) -shared -Wall -o functions.so functions.c
test: sagittarius mosh vicare racket guile larceny
@echo done!
# Sagittarius and Vicare read shared object from LD_LIBRARY_PATH
sagittarius: prepare
cd tests; $(SAGITTARIUS) -L../src test.scm
cd tests; $(SAGITTARIUS) -L../src test-struct.scm
prepare-racket:
# Not sure since when, but Racket requires either platform specific extension
# e.g. dynlib, or no extension.
cd tests; gcc $(CFLAGS) -shared -Wall -o functions functions.c
# Don't they have oneshot library installation command?
# raco pkg install -t file -n pffi/helper --pkgs --force pffi-helper.plt
$(RACKET) --force --install src/pffi/ffi-type-descriptor.sls
$(RACKET) --force --install src/pffi/compat.mzscheme.sls
$(RACKET) --force --install src/pffi/misc.sls
$(RACKET) --force --install src/pffi/procedure.sls
$(RACKET) --force --install src/pffi/variable/helper.sls
$(RACKET) --force --install src/pffi/variable.sls
$(RACKET) --force --install src/pffi/pointers.sls
$(RACKET) --force --install src/pffi/struct/helper.sls
$(RACKET) --force --install src/pffi/struct.sls
$(RACKET) --force --install src/pffi.sls
racket: prepare prepare-racket
cd tests; $(RACKET) test.scm
cd tests; $(RACKET) test-struct.scm
guile: prepare
cd tests; $(GUILE) --no-auto-compile --r6rs -L ../src test.scm
cd tests; $(GUILE) --no-auto-compile --r6rs -L ../src test-struct.scm
prepare-chez: prepare
$(shell test ! -f tests/lib/srfi/:64.sls && ln -s %3a64.chezscheme.sls tests/lib/srfi/:64.sls)
$(shell test ! -d tests/lib/srfi/:64 && ln -s %3a64 tests/lib/srfi/:64)
chez: prepare-chez
cd tests; $(CHEZ) --libdirs ../src:lib --program test.scm
cd tests; $(CHEZ) --libdirs ../src:lib --program chez.test.scm
### Unsupported implementatins, let's put them at the bottom
vicare: prepare
cd test; vicare -L ../src test.scm
# Seems Mosh as well
mosh: prepare
cd tests; mosh --loadpath=../src test.scm
cd tests; nmosh --loadpath=../src test.scm
prepare-larceny:
cd tests; gcc -m32 -shared -Wall -o functions.so functions.c
# Larceny raises an error if PFFI.log is there...
larceny: prepare-larceny
rm -f PFFI.log
cd tests; larceny -path ../src -r6rs -program test.scm