-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
30 lines (21 loc) · 752 Bytes
/
makefile
File metadata and controls
30 lines (21 loc) · 752 Bytes
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
CC = mpicc
CFLAGS = -Wall -std=gnu99 -O3 -pg -fopenmp -g
DEBUG = -g
TARGETS = helper.o io.o main
# Mark the default target to run (otherwise make will select the first target in the file)
.DEFAULT: all clean
# Mark targets as not generating output files (ensure the targets will always run)
.PHONY: all debug clean
all: $(TARGETS)
# A debug target to update flags before cleaning and compiling all targets
debug: CFLAGS += $(DEBUG)
debug: clean $(TARGETS)
helper.o: helper.c helper.h
$(CC) $(CFLAGS) -c helper.c -o helper.o
io.o: io.c io.h
$(CC) $(CFLAGS) -c io.c -o io.o
main: main.c helper.o io.o
$(CC) $(CFLAGS) helper.o io.o main.c -o centrality-solver
# Clean up our directory - remove objects and binaries
clean:
rm -f *.o