-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (19 loc) · 747 Bytes
/
Makefile
File metadata and controls
28 lines (19 loc) · 747 Bytes
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
.PHONY: clean
MAKEFLAGS += --warn-undefined-variables --no-builtin-rules -j
.DELETE_ON_ERROR:
target/spec: target/spec.c target/lib/libfut.so
gcc -DATS_MEMALLOC_LIBC $< -o $@ -I$$PATSHOME -I$$PATSHOME/ccomp/runtime -L$$PATSHOME/ccomp/atslib/lib -L./target/lib -lfut -lOpenCL -lm -latslib
target/spec.c: test/spec.dats SATS/futhark.sats SATS/futhark-types.sats
@mkdir -p $(dir $@)
patsopt -dd $< > $@
all: target/lib/libfut.so
target/lib:
mkdir -p $@
target/include:
mkdir -p $@
target/lib/libfut.so: target/include/fut.c target/lib
gcc $< -o $@ -fPIC -shared
target/include/fut.c: export.fut target/include
futhark opencl --library $< -o target/include/fut
clean:
@rm -rf lib *_dats.c *_sats.c *.so *.h .atspkg target tags .shake