-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
68 lines (55 loc) · 2.01 KB
/
Makefile
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
LDPATH=$(LD_LIBRARY_PATH)
LONG_BIT=$(shell getconf LONG_BIT)
CFLAGS_32=
CFLAGS_64=-fPIC
CFLAGS=$(CFLAGS_$(LONG_BIT))
all:
echo 'usage: make $traget'
echo ' sagittarius'
echo ' vicare'
echo ' mosh'
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
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-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
plt-r6rs --force --install src/pffi/compat.mzscheme.sls
plt-r6rs --force --install src/pffi/misc.sls
plt-r6rs --force --install src/pffi/procedure.sls
plt-r6rs --force --install src/pffi/variable.sls
plt-r6rs --force --install src/pffi/pointers.sls
plt-r6rs --force --install src/pffi/struct.sls
plt-r6rs --force --install src/pffi.sls
racket: prepare prepare-racket
cd tests; plt-r6rs test.scm
guile: prepare
cd tests; guile --no-auto-compile --r6rs -L ../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
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; scheme --libdirs ../src:lib --program test.scm
cd tests; scheme --libdirs ../src:lib --program chez.test.scm