-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (55 loc) · 1.54 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#
# Agent-based Simulation of Fire Extinguishing
#
# Parallel computing (Degree in Computer Engineering)
# 2018/2019
#
# EduHPC 2019: Peachy assignment
#
# (c) 2019 Arturo Gonzalez-Escribano, Jorge Fernandez-Fabeiro
# Grupo Trasgo, Universidad de Valladolid (Spain)
#
# This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
# https://creativecommons.org/licenses/by-sa/4.0/
#
#
# The current Parallel Computing course includes contests using:
# OpenMP, MPI, and CUDA.
#
# Compilers
CC=gcc
OMPFLAG=-fopenmp
# Flags for optimization and libs
FLAGS=-O3
LIBS=-lm
# Targets to build
OBJS=extinguishing_seq extinguishing_omp
# Rules. By default show help
help:
@echo
@echo "Agent-based Simulation of Fire Extinguishing"
@echo
@echo "Group Trasgo, Universidad de Valladolid (Spain)"
@echo "EduHPC 2019: Peachy assignment"
@echo
@echo "make extinguishing_seq Build only the sequential version"
@echo "make extinguishing_omp Build only the OpenMP version"
@echo
@echo "make all Build all versions (Sequential, OpenMP)"
@echo "make debug Build all version with demo output for small surfaces)"
@echo "make clean Remove targets"
@echo
all: $(OBJS)
extinguishing_seq: extinguishing.c
$(CC) $(DEBUG) $< $(LIBS) -o $@
extinguishing_omp: extinguishing_omp.c
$(CC) $(DEBUG) $(OMPFLAG) $< $(LIBS) -o $@
# Remove the target files
clean:
rm -rf $(OBJS)
# Compile in debug mode
debug:
make DEBUG=-DDEBUG
custom:
gcc -fopenmp -lm -O3 'versions_2/parallel_all.c' -lm -O3 -o 'parallel_all.bin'
./parallel_all.bin -f test_files/test3