forked from richardjgowers/zeoplusplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
155 lines (131 loc) · 2.95 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# This Makefile compiles Zeo++ into an executable named network
# To see instructions of implementation please see README
#Use GNU C++ Compilier
CC = g++
#Flags to compile with
CFLAGS = -g #-fPIC
CFLAGS_DYLIB = -fPIC
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
LDFLAGS_DYLIB = -shared
else ifeq ($(UNAME_S),Darwin)
LDFLAGS_DYLIB = -dynamiclib
endif
#Libraries to use while compiling
LIB = -lvoro++
# The relative of path of the main library source files
VOROINCLDIR = -I/usr/local/include/voro++
VOROLINKDIR = -L/usr/local/local/lib
#Object files to be created for network
MAIN_OBJ = main.o
FB_OBJ = framework_builder.o
MTA_OBJ = molecule_to_abstract.o
OBJS = network.o \
networkinfo.o \
networkio.o \
instructions.o \
networkanalysis.o \
area_and_volume.o \
segment.o \
string_additions.o \
symbcalc.o \
ray.o \
graphstorage.o \
networkstorage.o \
voronoicell.o \
channel.o \
mindist.o \
feature.o \
v_network.o \
geometry.o \
holograms.o \
grid.o \
psd.o \
sphere_approx.o \
networkaccessibility.o \
poreinfo.o \
cluster.o \
net.o \
rmsd.o \
symmetry.o \
cycle.o \
arguments.o \
material.o \
OMS.o
DY_OBJS=${OBJS}
STATIC_OBJS=${OBJS}
TOT_OBJS=$(MAIN_OBJ) $(FB_OBJ) $(MTA_OBJ) $(OBJS)
SRC=$(patsubst %.o,%.cc,$(TOT_OBJS))
INCS = network.h \
heap.h \
general.h \
networkstorage.h \
networkinfo.h \
mindist.h \
networkio.h \
geometry.h \
graphstorage.h \
graphstorage.h \
instructions.h \
voronoicell.h \
channel.h \
segment.h \
networkanalysis.h \
area_and_volume.h \
holograms.h \
string_additions.h \
symbcalc.h \
ray.h \
feature.h \
v_network.h \
grid.h \
psd.h \
sphere_approx.h \
networkaccessibility.h \
poreinfo.h \
cluster.h \
net.h \
rmsd.h \
symmetry.h \
cycle.h \
arguments.h \
zeojobs.h \
material.h \
OMS.hh
# List of executables
EXECUTABLES = network framework_builder molecule_to_abstract
DY_LIB = libzeo++.so
STATIC_LIB = libzeo++.a
# Makefile rules
all: network framework_builder molecule_to_abstract
include Makefile.dep
depend:
$(CC) -MG $(CFLAGS) -MM $(SRC) | sed 's/voro++\.hh //g' > Makefile.dep
network: ${OBJS} ${MAIN_OBJ}
@echo
@echo Linking $@
$(CC) $(VOROINCLDIR) $(VOROLINKDIR) -o $@ $(CFLAGS) ${OBJS} ${MAIN_OBJ} $(LIB)
framework_builder: ${OBJS} ${FB_OBJ}
@echo
@echo Linking $@
$(CC) $(VOROINCLDIR) $(VOROLINKDIR) -o $@ $(CFLAGS) ${OBJS} ${FB_OBJ} $(LIB)
molecule_to_abstract: ${OBJS} ${MTA_OBJ}
@echo
@echo Linking $@
$(CC) $(VOROINCLDIR) $(VOROLINKDIR) -o $@ $(CFLAGS) ${OBJS} ${MTA_OBJ} $(LIB)
statlib: ${STATIC_LIB}
${STATIC_LIB}: ${STATIC_OBJS}
@echo
@echo Linking $@
ar rs $@ $^ #$(VOROINCLDIR) $(VOROLINKDIR) $(LIB)
dylib: CFLAGS += -fPIC
dylib: ${DY_LIB}
${DY_LIB}: ${DY_OBJS}
@echo
@echo Linking $@
$(CC) $(VOROINCLDIR) $(VOROLINKDIR) -o $@ $(LDFLAGS_DYLIB) ${OBJS} $(LIB)
%.o: %.cc
$(CC) $(VOROINCLDIR) $(CFLAGS) -c $<
clean:
rm -f $(TOT_OBJS) *.err $(EXECUTABLES)
.PHONY: all clean depend