-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
executable file
·137 lines (91 loc) · 3.01 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Copyright (C) 1997-2001 Imperial Cancer Research Technology
# author: Gidon Moont
# Biomolecular Modelling Laboratory
# Imperial Cancer Research Fund
# 44 Lincoln's Inn Fields
# London WC2A 3PX
# +44 (0)20 7269 3348
# http://www.bmm.icnet.uk/
#############
FFTW_DIR = /path/to/FFTW/2.1.5/
#############
# You may need/want to edit some of these
#
# Hint: For the CC_FLAGS have a look at what the fftw build used
SHELL = /bin/sh
# Use of the OpenMPI compiler, change it according to your MPI environment
CC = mpicc
# Something more aggresive than -03 produces numerical unstability
CC_FLAGS = -DUSE_MPI -O3 -pthread
CC_LINKERS = -lm
STRIP = strip
SECURITY = chmod 555
####################################################
# You should not be editing anything below here
CC_FLAGS_FULL = -I$(FFTW_DIR)/include $(CC_FLAGS)
# Using double precision here
FFTW_LINKERS = -L$(FFTW_DIR)/lib -ldrfftw -ldfftw
# Old configuration, might be useful in some old machines
#CC_FLAGS_FULL = -I$(FFTW_DIR)/fftw -I$(FFTW_DIR)/rfftw $(CC_FLAGS)
#FFTW_LINKERS = -L$(FFTW_DIR)/fftw/.libs -L$(FFTW_DIR)/rfftw/.libs -lrfftw -lfftw
#############
.SUFFIXES: .c .o
.c.o:
$(CC) $(CC_FLAGS_FULL) -c $<
#############
LIBRARY_OBJECTS = manipulate_structures.o angles.o coordinates.o electrostatics.o grid.o qsort_scores.o
PROGRAMS = ftdock rpscore rpdock filter build centres randomspin
all: $(PROGRAMS)
#############
ftdock: ftdock.o $(LIBRARY_OBJECTS) structures.h
$(CC) $(CC_FLAGS_FULL) -o $@ ftdock.o $(LIBRARY_OBJECTS) $(FFTW_LINKERS) $(CC_LINKERS)
$(STRIP) $@
$(SECURITY) $@
#############
rpdock: rpdock.o $(LIBRARY_OBJECTS) structures.h
$(CC) $(CC_FLAGS) -o $@ rpdock.o $(LIBRARY_OBJECTS) $(CC_LINKERS)
$(STRIP) $@
$(SECURITY) $@
#############
rpscore: rpscore.o $(LIBRARY_OBJECTS) structures.h
$(CC) $(CC_FLAGS) -o $@ rpscore.o $(LIBRARY_OBJECTS) $(CC_LINKERS)
$(STRIP) $@
$(SECURITY) $@
#############
filter: filter.o $(LIBRARY_OBJECTS) structures.h
$(CC) $(CC_FLAGS) -o $@ filter.o $(LIBRARY_OBJECTS) $(CC_LINKERS)
$(STRIP) $@
$(SECURITY) $@
#############
build: build.o $(LIBRARY_OBJECTS) structures.h
$(CC) $(CC_FLAGS) -o $@ build.o $(LIBRARY_OBJECTS) $(CC_LINKERS)
$(STRIP) $@
$(SECURITY) $@
#############
centres: centres.o $(LIBRARY_OBJECTS) structures.h
$(CC) $(CC_FLAGS) -o $@ centres.o $(LIBRARY_OBJECTS) $(CC_LINKERS)
$(STRIP) $@
$(SECURITY) $@
#############
randomspin: randomspin.o $(LIBRARY_OBJECTS) structures.h
$(CC) $(CC_FLAGS) -o $@ randomspin.o $(LIBRARY_OBJECTS) $(CC_LINKERS)
$(STRIP) $@
$(SECURITY) $@
#############
clean:
rm -f *.o core $(PROGRAMS)
#############
# dependencies
ftdock.o: structures.h
rpscore.o: structures.h
rpdock.o: structures.h
filter.o: structures.h
build.o: structures.h
centres.o: structures.h
randomspin.o: structures.h
angles.o: structures.h
coordinates.o: structures.h
electrostatics.o: structures.h
grid.o: structures.h
manipulate_structures.o: structures.h
qsort_scores.o: structures.h