-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
44 lines (34 loc) · 1006 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# ################################################
#
# C Makefile
# PDS Exercise 1: Vantage-Point Tree Build
# Versions: Sequential, Pthreads, openMP, Cilk
#
# Author: Panagiotis Karelis (9099)
# Author: Emmanouil Michalainas (9070)
# ################################################
#
# 'make' build executable file 'main'
# 'make lib' build the libraries .a
# 'make clean' removes all .o and executables
#
#define the shell to bash
SHELL := /bin/bash
#define the C compiler to use
CC = gcc-7
#define compile-time flags
CFLAGS = -Wall -O3 -pthread -fopenmp -fcilkplus
#define directories containing header files
INCLUDES = -I ./inc
#define objects
SL = vptree_sequential.a vptree_pthreads.a vptree_cilk.a vptree_openmp.a
########################################################################
lib: $(SL)
%.o: src/%.c
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o lib/$@
%.a: %.o
ar rcs lib/$@ lib/$<
rm lib/$<
clean:
find . -name "benchmark_*" -delete
find . -name "*.a" -delete