-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
59 lines (49 loc) · 1.21 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
VERSION = v0.4
DEFAULT_FLAGS = -DAGE_VERSION=\"$(VERSION)\" -DAGE_TIME
CXX = g++ -fopenmp -DOMP $(DEFAULT_FLAGS)
MESS = "Compiling with parallel (OpenMP) support."
ifeq ($(OMP),no)
CXX = g++ $(DEFAULT_FLAGS)
MESS = "Compiling with NO parallel support."
endif
OBJDIR = obj
OBJS = $(OBJDIR)/AGEaligner.o \
$(OBJDIR)/age_align.o
DISTRIBUTION = $(PWD)/AGE_$(VERSION).zip
TESTFILE = TestDecription_$(VERSION).txt
TMPDIR = /tmp
AGEDIR = age_$(VERSION)
MAINDIR = $(TMPDIR)/$(AGEDIR)
SRCDIR = $(MAINDIR)/src
EXAMPLEDIR = $(MAINDIR)/examples
all: mess age_align
mess:
@echo ""
@echo $(MESS)
@echo ""
age_align: $(OBJS)
$(CXX) -o $@ $(OBJS)
$(OBJDIR)/%.o: %.cpp
@mkdir -p $(OBJDIR)
$(CXX) -c $< -o $@
clean:
rm -f $(OBJS)
distribution: clean all
@echo Creating directory ...
@rm -rf $(MAINDIR)
@mkdir $(MAINDIR)
@mkdir $(SRCDIR)
@mkdir $(EXAMPLEDIR)
@echo Making tests ...
@./test.sh > $(TESTFILE)
@echo Copying files ...
@cp *.cpp *.hh $(SRCDIR)
@cp Makefile $(SRCDIR)
@cp README $(MAINDIR)
@cp CITATION $(MAINDIR)
@cp license.rtf $(MAINDIR)
@cp test*.fa $(TESTFILE) $(EXAMPLEDIR)
@echo Zipping ...
@ln -s $(MAINDIR)
@zip -qr $(DISTRIBUTION) $(AGEDIR)
@rm $(AGEDIR)