-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (32 loc) · 1.46 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
# the compiler: define as g++ for C++
CXX = g++
# Definition of paths
OBJECT_DIR = obj/
REPORT_DIR = reports/
INCLUDE_DIR = src/include
SOURCE_DIR = src/
CLASSES_DIR = src/classes/
# compiler flags:
# -g - this flag adds debugging information to the executable file
# -Wall - this flag is used to turn on most compiler warnings
CFLAGS = -g -Wall -fexceptions -I$(INCLUDE_DIR)
# Necessary libraries
LIBS = -fopenmp
# The build target
TARGET = smith_waterman
.PHONY: all clean $(TARGET) obj_files
all: $(TARGET)
$(TARGET): obj_files
@mkdir -p $(OBJECT_DIR)
$(CXX) -o $(TARGET) $(OBJECT_DIR)SmithWatermanExecutor.o $(OBJECT_DIR)Framework.o $(OBJECT_DIR)ParallelCoarseOMPImplementation.o $(OBJECT_DIR)ParallelFineOMPImplementation.o $(OBJECT_DIR)SequentialImplementation.o $(LIBS)
@mkdir -p $(REPORT_DIR)
obj_files:
@mkdir -p $(OBJECT_DIR)
$(CXX) $(CFLAGS) -c $(SOURCE_DIR)SmithWatermanExecutor.cpp -o $(OBJECT_DIR)SmithWatermanExecutor.o
$(CXX) $(CFLAGS) -c $(CLASSES_DIR)Framework.cpp -o $(OBJECT_DIR)Framework.o
$(CXX) $(CFLAGS) -c $(CLASSES_DIR)ParallelCoarseOMPImplementation.cpp -o $(OBJECT_DIR)ParallelCoarseOMPImplementation.o $(LIBS)
$(CXX) $(CFLAGS) -c $(CLASSES_DIR)ParallelFineOMPImplementation.cpp -o $(OBJECT_DIR)ParallelFineOMPImplementation.o $(LIBS)
$(CXX) $(CFLAGS) -c $(CLASSES_DIR)SequentialImplementation.cpp -o $(OBJECT_DIR)SequentialImplementation.o $(LIBS)
clean:
rm -rf $(OBJECT_DIR)
rm -f $(TARGET)