-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (25 loc) · 1.08 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
### Basic Makefile for OpenMP
# Offload mode execution
CC = icc -Wall -openmp -fPIC -wd2568
# Native Phi Execution
# CC = icc -mmic -g -Wall -openmp -fPIC -L /opt/intel/lib/mic -Wno-unknown-pragmas -liomp5
# Using GCC
# CC = gcc -fopenmp
CFLAGS = -w -g -DOFFLOAD -DSINGLE_TASK
# See MasterProcess.c for additional options
# To offload to the Phi, -DOFFLOAD
# To run host scheduler multithreaded (untested), -DHOST_PARALLEL
# To block parallel tasks (only execute one at a time), -DSINGLE_TASK
LDFLAGS = $(CFLAGS)
all:
$(CC) $(CFLAGS) -c src/MIC_OpenMP.c src/Apps/MatrixMul.c src/Apps/Sleep.c src/MasterProcess.c src/GeMTC_API.c src/Queue.c
$(CC) $(LDFLAGS) -o MIC_OpenMP MIC_OpenMP.o MatrixMul.o Sleep.o MasterProcess.o GeMTC_API.o Queue.o
$(CC) $(CFLAGS) -c src/client.c
$(CC) $(LDFLAGS) -o client client.o
MIC_OpenMP: MIC_OpenMP.o
$(CC) $(LDFLAGS) -o MIC_OpenMP MIC_OpenMP.o
MIC_OpenMP.o: MIC_OpenMP.c
$(CC) $(CFLAGS) -c src/MIC_OpenMP.c src/Apps/MatrixMul.c src/Apps/Sleep.c src/MasterProcess.c src/GeMTC_API.c src/Queue.c
clean:
rm -f MIC_OpenMP client *.o
rebuild: clean all