-
Notifications
You must be signed in to change notification settings - Fork 57
/
Makefile
47 lines (34 loc) · 1.1 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
# Include common makefile
include src/genn/MakefileCommon
# List of backends
BACKENDS :=single_threaded_cpu_backend
ifdef CUDA_PATH
BACKENDS +=cuda_backend
endif
ifdef OPENCL_PATH
BACKENDS +=opencl_backend
endif
# Build list of libraries
BACKEND_LIBS :=$(BACKENDS:%=$(LIBRARY_DIRECTORY)/libgenn_%$(GENN_PREFIX).$(LIBRARY_EXTENSION))
# Default install location
PREFIX ?= /usr/local
.PHONY: all clean genn $(BACKENDS)
all: genn $(BACKENDS)
genn:
$(MAKE) -C src/genn/genn
single_threaded_cpu_backend: genn
$(MAKE) -C src/genn/backends/single_threaded_cpu
cuda_backend: genn
$(MAKE) -C src/genn/backends/cuda
opencl_backend: genn
$(MAKE) -C src/genn/backends/opencl
clean:
@# Delete all objects, dependencies and coverage files if object directory exists
@if [ -d "${OBJECT_DIRECTORY}" ]; then find $(OBJECT_DIRECTORY) -type f \( -name "*.o" -o -name "*.d" -o -name "*.gcda" -o -name "*.gcdo" \) -delete; fi;
@# Delete libGeNN
@rm -f $(LIBGENN)
@rm -f $(BACKEND_LIBS)
GENN_VER := $(shell cat version.txt)
.PHONY docker-build:
docker-build:
@docker build --build-arg GENN_VER=$(GENN_VER) -t genn:latest .