-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (22 loc) · 972 Bytes
/
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
#define the shell to bash
SHELL := /bin/bash
#define the C compiler to use
CC = gcc-7
#define the MPI compiler to use
MPIC = mpicc
#define compile-time flags
CFLAGS = -Wall -O3
CLIBS = -lopenblas -lm
#define directories containing header files
INCLUDES = -I ./inc
lib: knnring_sequential.o knnring_synchronous.o knnring_asynchronous.o
ar rcs lib/knnring_sequential.a lib/knnring_sequential.o
ar rcs lib/knnring_synchronous.a lib/knnring_synchronous.o lib/knnring_sequential.o
ar rcs lib/knnring_asynchronous.a lib/knnring_asynchronous.o lib/knnring_sequential.o
rm ./lib/*.o
knnring_sequential.o: src/knnring_sequential.c
$(CC) $(CFLAGS) $(INCLUDES) -c src/knnring_sequential.c $(CLIBS) -o lib/$@
knnring_synchronous.o: src/knnring_synchronous.c
$(MPIC) $(CFlAGS) $(INCLUDES) -c src/knnring_synchronous.c $(CLIBS) -o lib/$@
knnring_asynchronous.o: src/knnring_asynchronous.c
$(MPIC) $(CFLAGS) $(INCLUDES) -c src/knnring_asynchronous.c $(CLIBS) -o lib/$@