-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (42 loc) · 1.09 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
.PHONY: setup clean test test_math local_test_math test_datetime rosetta movie clean libfunctors
ifeq ($(OS),Windows_NT)
SONAME = so
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
SONAME = so
endif
ifeq ($(UNAME_S),Darwin)
SONAME = dylib
endif
endif
setup: libfunctors math.dl test.dl
# Testing and examples
test: test_datetime test_math
test_math: test.dl math.dl
souffle -D- `lib_ldscript -lm` test.dl
local_test_math: test.dl math.dl
PATH=../souffle-32bit/src:$(PATH) ./configure
PATH=../souffle-32bit/src:$(PATH) souffle -D- `lib_ldscript -lm` test.dl
test_datetime: libfunctors
souffle -D- test_datetime.dl
rosetta: libfunctors
souffle -D- rosetta.dl
movie: libfunctors
souffle -D- movie.dl
# Configure for 32/64 bit and compile
libfunctors: datetime.cpp
g++ -shared -fPIC datetime.cpp -o libfunctors.$(SONAME)
datetime.cpp: configure
@./configure
math.dl: configure
@./configure
test.dl: configure
@./configure
configure: configure.ac
autoconf
clean:
@rm -f test.dl
@rm -f math.dl
@rm -f libfunctors.$(SONAME)
@rm -f datetime.cpp