-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (33 loc) · 1.06 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
CC = g++
BOOST_COMPUTE = /usr/include/boost
INCLUDES = -Isrc/snp -Isrc/utils -I$(BOOST_COMPUTE)
LIBS = -lOpenCL -lre2 -pthread
CFLAGS = -std=c++14 -Wall
OBJS = build/snp/snp.o\
build/snp/regex_tree.o\
build/snp/emulator.o\
build/utils/array.o\
build/utils/binary_reader.o\
build/utils/regex.o\
build/utils/opencl_error.o
all: build_directories bin/oclsnp bin/linsnp bin/kernels
@echo Done
bin/oclsnp: build/main.o $(OBJS)
$(CC) -o $@ $^ $(CFLAGS) $(INCLUDES) $(LIBS)
bin/linsnp: build/main_linear.o $(OBJS)
$(CC) -o $@ $^ $(CFLAGS) $(INCLUDES) $(LIBS)
build/%.o: src/%.cpp
$(CC) $(CFLAGS) -c $(INCLUDES) $< $(LIBS) -o $@
build/utils/%.o: src/utils/%.cpp
$(CC) $(CFLAGS) -c $(INCLUDES) $< $(LIBS) -o $@
build/snp/%.o: src/snp/%.cpp
$(CC) $(CFLAGS) -c $(INCLUDES) $< $(LIBS) -o $@
bin/kernels: update_kernels
@echo Copying Kernels
build_directories:
mkdir -p build/utils build/snp
update_kernels:
if [ -d "bin/kernels" ]; then rm -r bin/kernels; fi
cp -r src/kernels bin/
clean:
rm build/**/* build/* bin/oclsnp bin/linsnp bin/kernels -r