ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/Makefile.in
Revision: 940
Committed: Tue Jan 13 22:34:55 2004 UTC (20 years, 5 months ago) by gezelter
File size: 12411 byte(s)
Log Message:
Some changes for new MPI organization and direct charge-charge interactions

File Contents

# User Rev Content
1 gezelter 747 #####################################################
2     # Makefile for libmdtools (bundled with OOPSE) #
3     #####################################################
4     # You should not change anything here. #
5     #####################################################
6    
7     # No make rules by default
8     .SUFFIXES : .c .cpp .F90 .hpp .h $(O)
9    
10     # Extension of object files
11     O=@OBJEXT@
12    
13     # Extension of executables
14     EXE=@EXEEXT@
15    
16     # Bourn shell
17     SHELL=/bin/sh
18    
19     # Path prefix for installation links
20     PREFIX=@prefix@
21    
22     # List of subdirectories
23     SUBDIRS=@SUBDIRS@
24    
25     # Location of the oopse home
26     OOPSE_HOME=@OOPSE_HOME@
27    
28     FORCE_PARAM_DIR=@OOPSE_HOME@/share/forceFields/
29     SAMPLE_SIM_DIR=@OOPSE_HOME@/share/samples/
30    
31     # SPRNG library path
32     SPRNG_LIBDIR=@SPRNG_LIBDIR@
33    
34     # SPRNG library
35     SPRNG_LIB=@SPRNG_LIB@
36    
37     # SPRNG include path
38     SPRNG_INC=@SPRNG_INC@
39    
40     # MPICH library path
41     MPI_LIBDIR=@MPI_LIBDIR@
42    
43     # MPICH library
44     MPI_LIB=@MPI_LIB@
45    
46     # MPICH include path
47     MPI_INC=@MPI_INC@
48    
49 gezelter 826 # MODDIRFLAG
50     MODDIRFLAG=@MODDIRFLAG@
51    
52 gezelter 747 # Compiler dependent Fortran module
53     FLIBS_EXTRA = @F90LIBS@
54    
55     # Location of yacc (or its substitution)
56     YACC=@YACC@
57    
58     #location of lex
59     LEX=@LEX@
60    
61     # C compiler
62     CC=@CC@
63    
64     # C++ compiler
65    
66     CXX=@CXX@
67    
68     # F90 compiler
69     F90=@F90@
70    
71     # ar
72     AR=@AR@
73    
74     # ranlib
75     RANLIB=@RANLIB@
76    
77     # rm
78     RM=rm -f
79    
80     # soft link
81     LN_S=@LN_S@
82    
83     # BSD install
84     INSTALL=@INSTALL@
85     INSTALL_PROGRAM=@INSTALL_PROGRAM@
86     INSTALL_DATA=@INSTALL_DATA@
87     MKINSTALLDIRS=@MKINSTALLDIRS@
88    
89     # CPP flags
90     CPPFLAGS=@CPPFLAGS@
91    
92     # C flags
93     CFLAGS_C=@CFLAGS@
94    
95     # C++ flags
96     CXXFLAGS_C=@CXXFLAGS@
97    
98 gezelter 840 # C++ template flags
99     OOPSE_TEMPLATE_FLAGS=@OOPSE_TEMPLATE_FLAGS@
100    
101     # C++ namespace flags
102     EXTRA_CC_FLAG=@EXTRA_CC_FLAG@
103    
104 gezelter 747 # Preprocessor flag for fortran
105     PREPFLAG=@PREPFLAG@
106    
107     # Preprocessor define flag for fortran
108     PREPDEFFLAG=@PREPDEFFLAG@
109    
110     # Fortran flags
111 gezelter 785 FFLAGS_C=@FFLAGS@
112 gezelter 747
113 gezelter 785 # Fortran90 flags
114     F90FLAGS_C=@F90FLAGS@
115    
116 gezelter 747 # LDFLAGS
117     LDFLAGS=@LDFLAGS@
118    
119     # First do compile-time flags:
120    
121     DECLARE=-DFRC_PATH="$(FORCE_PARAM_DIR)"
122     MPI_DECLARE=-DIS_MPI
123    
124     # include paths starting with "." are all relative to the SUBDIRS!!!
125    
126     INCLUDES= -I.. -I../../libBASS $(SPRNG_INC)
127 gezelter 940 MPI_INCLUDES= -I$(MPI_INC)
128 chuckv 858 F90_INCLUDES= -I/usr/local/include
129 gezelter 747
130     CFLAGS=$(CFLAGS_C) $(INCLUDES) $(DECLARE) $(MPI_INCLUDES) $(FUNCWRAP)
131 gezelter 840 CXXFLAGS=$(CXXFLAGS_C) $(OOPSE_TEMPLATE_FLAGS) $(EXTRA_CC_FLAG) $(INCLUDES) $(DECLARE) $(FUNCWRAP)
132 gezelter 747 FFLAGS=$(PREPFLAG) $(FFLAGS_C)
133 chuckv 858 F90FLAGS=$(PREPFLAG) $(F90FLAGS_C) $(F90_INCLUDES)
134 gezelter 747 DEPFLAGS=$(CFLAGS_C) -I. -I../libBASS $(SPRNG_INC) $(MPI_INCLUDES)
135    
136     MPI_CFLAGS=$(CFLAGS) $(MPI_INCLUDES) $(MPI_DECLARE)
137     MPI_CXXFLAGS=$(CXXFLAGS) $(MPI_INCLUDES) $(MPI_DECLARE)
138 gezelter 785 MPI_F90FLAGS=$(F90FLAGS) $(PREPDEFFLAG)$(MPI_DECLARE) $(MPI_INCLUDES)
139 gezelter 747
140 gezelter 829 SRC_DIR := ..
141 gezelter 747
142     # Then do the compile rules:
143    
144     obj/%.o: %.F90
145 gezelter 785 cd obj; $(F90) $(F90FLAGS) -c $(SRC_DIR)/$<
146 gezelter 747
147     MPIobj/%.o: %.F90
148 gezelter 785 cd MPIobj; $(F90) $(MPI_F90FLAGS) -c $(SRC_DIR)/$<
149 gezelter 747
150     obj/%.o: %.cpp
151     cd obj; $(CXX) $(CXXFLAGS) -c $(SRC_DIR)/$<
152    
153     MPIobj/%.o: %.cpp
154     cd MPIobj; $(CXX) $(MPI_CXXFLAGS) -c $(SRC_DIR)/$<
155    
156     obj/%.o: %.c
157     cd obj; $(CC) $(CFLAGS) -c $(SRC_DIR)/$<
158    
159     MPIobj/%.o: %.c
160     cd MPIobj; $(CC) $(MPI_CFLAGS) -c $(SRC_DIR)/$<
161    
162     # Then list what we have to compile
163    
164     C_FILES = \
165     $(DIR)/mpiForceField.c \
166     $(DIR)/fInfo.c
167    
168     CXX_FILES = \
169     $(DIR)/Atom.cpp \
170     $(DIR)/Bend.cpp \
171     $(DIR)/BendExtensions.cpp \
172     $(DIR)/Bond.cpp \
173     $(DIR)/BondExtensions.cpp \
174     $(DIR)/DirectionalAtom.cpp \
175     $(DIR)/DumpWriter.cpp \
176 mmeineke 804 $(DIR)/DumpReader.cpp \
177 gezelter 747 $(DIR)/Exclude.cpp \
178     $(DIR)/InitializeFromFile.cpp \
179     $(DIR)/LJFF.cpp \
180     $(DIR)/EAM_FF.cpp \
181     $(DIR)/SimInfo.cpp \
182     $(DIR)/SimSetup.cpp \
183     $(DIR)/StatWriter.cpp \
184     $(DIR)/Integrator.cpp \
185     $(DIR)/Thermo.cpp \
186     $(DIR)/GhostBend.cpp \
187     $(DIR)/Torsion.cpp \
188     $(DIR)/TorsionExtensions.cpp \
189     $(DIR)/DUFF.cpp \
190     $(DIR)/randomSPRNG.cpp \
191     $(DIR)/fortranWrappers.cpp \
192     $(DIR)/ForceFields.cpp \
193     $(DIR)/Molecule.cpp \
194 gezelter 761 $(DIR)/NPTf.cpp \
195     $(DIR)/NPTi.cpp \
196 mmeineke 812 $(DIR)/NPTxyz.cpp \
197 gezelter 761 $(DIR)/NVT.cpp \
198 gezelter 747 $(DIR)/SimState.cpp \
199     $(DIR)/ZConstraint.cpp \
200     $(DIR)/ZConsWriter.cpp \
201 mmeineke 887 $(DIR)/mdProfile.cpp \
202 gezelter 940 $(DIR)/GenericData.cpp \
203     $(DIR)/mpiSimulation.cpp
204 gezelter 747
205     F90_FILES= \
206     $(DIR)/definitions_module.F90 \
207     $(DIR)/status_module.F90 \
208     $(DIR)/atype_module.F90 \
209     $(DIR)/calc_dipole_dipole.F90 \
210 gezelter 940 $(DIR)/calc_charge_charge.F90 \
211 gezelter 747 $(DIR)/calc_reaction_field.F90 \
212     $(DIR)/calc_LJ_FF.F90 \
213     $(DIR)/calc_eam.F90 \
214     $(DIR)/calc_sticky_pair.F90 \
215     $(DIR)/do_Forces.F90 \
216     $(DIR)/vector_class.F90 \
217     $(DIR)/simulation_module.F90 \
218     $(DIR)/wrappers.F90 \
219     $(DIR)/neighborLists.F90 \
220     $(DIR)/calc_gb.F90 \
221     $(DIR)/force_globals.F90 \
222     $(DIR)/mpiSimulation_module.F90 \
223 chuckv 858 $(DIR)/notifyCutoffs.F90 \
224 gezelter 940 $(DIR)/timing.F90 \
225     $(DIR)/oopseMPI_module.F90
226 gezelter 747
227     DIR:=.
228     C_SRCS := $(C_FILES)
229     CXX_SRCS := $(CXX_FILES)
230     F90_SRCS := $(F90_FILES)
231     SRCS := $(C_SRCS) $(CXX_SRCS) $(F90_SRCS)
232    
233     DIR:=obj
234     C_OBJS := $(C_FILES:.c=.o)
235     CXX_OBJS := $(CXX_FILES:.cpp=.o)
236     F90_OBJS := $(F90_FILES:.F90=.o)
237     OBJS := $(C_OBJS) $(CXX_OBJS) $(F90_OBJS)
238    
239     DIR:=MPIobj
240     C_MPIOBJS := $(C_FILES:.c=.o)
241     CXX_MPIOBJS := $(CXX_FILES:.cpp=.o)
242     F90_MPIOBJS := $(F90_FILES:.F90=.o)
243     MPIOBJS := $(C_MPIOBJS) $(CXX_MPIOBJS) $(F90_MPIOBJS)
244    
245     LIBSUBDIRS = \
246     obj \
247     MPIobj
248    
249     # Possible make targets:
250    
251     all: libmdtools.a libmdtools_MPI.a
252    
253     libmdtools.a: $(OBJS)
254     $(RM) $@
255     $(AR) cr $@ $(OBJS)
256     $(RANLIB) $@
257    
258     libmdtools_MPI.a: $(MPIOBJS)
259     $(RM) $@
260     $(AR) cr $@ $(MPIOBJS)
261     $(RANLIB) $@
262    
263     .PHONY : clean
264    
265     clean : dummy
266     for i in $(LIBSUBDIRS); do \
267     (cd $$i; $(RM) *.o *.mod) || exit 1; \
268     done
269     $(RM) libmdtools.a libmdtools_MPI.a *.o *.mod *~ Make.temp Make.ftemp
270    
271     distclean : dummy
272     for i in $(LIBSUBDIRS); do \
273     (cd $$i; $(RM) *.o *.mod) || exit 1; \
274     done
275     $(RM) libmdtools.a libmdtools_MPI.a *.o *.mod *~ Make.temp Make.ftemp
276    
277     depend : Make.dep
278    
279     Make.dep :
280     echo "Only C dependencies are made automagically!"
281     echo "# DO NOT DELETE THIS LINE - used by make depend" > Make.dep
282     $(CC) $(DEPFLAGS) -MM $(C_SRCS) \
283     | sed 's/\.o:/\$$(O)\ :/g' > Make.temp
284     $(CXX) $(DEPFLAGS) -MM $(CXX_SRCS) \
285     | sed 's/\.o:/\$$(O)\ :/g' >> Make.temp
286     cat Make.temp | sed 's/^[a-zA-Z0-9]/obj\/&/g' >> Make.dep
287     cat Make.temp | sed 's/^[a-zA-Z0-9]/MPIobj\/&/g' >> Make.dep
288     # ../scripts/sfmakedepend -I $(MPI_F90_MODS) -d obj -f ./Make.ftemp -h *.F90
289     # ../scripts/sfmakedepend -I $(MPI_F90_MODS) -d MPIobj -f ./Make.ftemp -h *.F90
290     # cat Make.ftemp | sed 's/\.o:/\$$(O)\ :/g' >> Make.dep
291     $(RM) Make.ftemp Make.temp
292    
293     install : dummy
294    
295     links : dummy
296    
297     tests : dummy
298    
299     dummy :
300    
301     include Make.dep
302    
303     obj/definitions_module$(O): ./definitions_module.F90
304    
305     obj/vector_class$(O): ./vector_class.F90
306    
307     obj/status_module$(O): ./status_module.F90
308    
309     obj/force_globals$(O): ./force_globals.F90 \
310     obj/definitions_module$(O)
311    
312     obj/neighborLists$(O): ./neighborLists.F90 \
313     obj/definitions_module$(O)
314    
315     obj/calc_sticky_pair$(O): ./calc_sticky_pair.F90 \
316     obj/definitions_module$(O) \
317     obj/simulation_module$(O) \
318     obj/force_globals$(O)
319    
320     obj/calc_eam$(O): ./calc_eam.F90 \
321     obj/definitions_module$(O) \
322     obj/atype_module$(O) \
323     obj/simulation_module$(O) \
324     obj/vector_class$(O) \
325     obj/force_globals$(O) \
326     obj/status_module$(O)
327    
328     obj/calc_gb$(O): ./calc_gb.F90 \
329     obj/definitions_module$(O) \
330     obj/simulation_module$(O) \
331     obj/force_globals$(O)
332    
333     obj/atype_module$(O): ./atype_module.F90 \
334     obj/definitions_module$(O) \
335     obj/vector_class$(O)
336    
337     obj/simulation_module$(O): ./simulation_module.F90 \
338     obj/definitions_module$(O) \
339     obj/vector_class$(O) \
340     obj/force_globals$(O) \
341     obj/atype_module$(O) \
342     obj/neighborLists$(O)
343    
344     obj/calc_LJ_FF$(O): ./calc_LJ_FF.F90 \
345     obj/definitions_module$(O) \
346     obj/atype_module$(O) \
347     obj/simulation_module$(O) \
348     obj/vector_class$(O) \
349     obj/force_globals$(O)
350    
351     obj/calc_reaction_field$(O): ./calc_reaction_field.F90 \
352     obj/definitions_module$(O) \
353     obj/vector_class$(O) \
354     obj/atype_module$(O) \
355     obj/simulation_module$(O) \
356     obj/force_globals$(O)
357    
358     obj/calc_dipole_dipole$(O): ./calc_dipole_dipole.F90 \
359     obj/definitions_module$(O) \
360     obj/atype_module$(O) \
361     obj/simulation_module$(O) \
362     obj/force_globals$(O) \
363     obj/vector_class$(O)
364    
365 gezelter 940 obj/calc_charge_charge$(O): ./calc_charge_charge.F90 \
366     obj/definitions_module$(O) \
367     obj/atype_module$(O) \
368     obj/simulation_module$(O) \
369     obj/force_globals$(O) \
370     obj/vector_class$(O)
371    
372 gezelter 747 obj/do_Forces$(O): ./do_Forces.F90 \
373     obj/definitions_module$(O) \
374     obj/atype_module$(O) \
375     obj/simulation_module$(O) \
376     obj/neighborLists$(O) \
377     obj/calc_LJ_FF$(O) \
378     obj/calc_sticky_pair$(O) \
379     obj/calc_dipole_dipole$(O) \
380     obj/calc_reaction_field$(O) \
381     obj/calc_gb$(O) \
382     obj/force_globals$(O) \
383     obj/vector_class$(O)
384    
385     obj/notifyCutoffs$(O): ./notifyCutoffs.F90 \
386     obj/definitions_module$(O) \
387     obj/atype_module$(O) \
388     obj/calc_LJ_FF$(O) \
389     obj/calc_eam$(O) \
390     obj/calc_dipole_dipole$(O) \
391     obj/calc_reaction_field$(O) \
392     obj/do_Forces$(O)
393    
394     obj/wrappers$(O): ./wrappers.F90 \
395     obj/definitions_module$(O) \
396     obj/atype_module$(O) \
397     obj/simulation_module$(O) \
398     obj/calc_sticky_pair$(O) \
399     obj/calc_gb$(O) \
400     obj/do_Forces$(O) \
401     obj/notifyCutoffs$(O)
402    
403 mmeineke 891 obj/timing$(O): ./timing.F90 \
404     obj/do_Forces$(O)
405 gezelter 747
406    
407    
408     #MPI dependencies:
409    
410     MPIobj/definitions_module$(O): ./definitions_module.F90
411    
412     MPIobj/vector_class$(O): ./vector_class.F90
413    
414     MPIobj/status_module$(O): ./status_module.F90
415    
416 chuckv 858 MPIobj/oopseMPI_module$(O): ./oopseMPI_module.F90
417 gezelter 747
418 chuckv 858 MPIobj/mpiSimulation_module$(O): ./mpiSimulation_module.F90 \
419     MPIobj/oopseMPI_module$(O)
420    
421 gezelter 747 MPIobj/force_globals$(O): ./force_globals.F90 \
422     MPIobj/mpiSimulation_module$(O) \
423     MPIobj/definitions_module$(O)
424    
425     MPIobj/neighborLists$(O): ./neighborLists.F90 \
426     MPIobj/definitions_module$(O) \
427     MPIobj/mpiSimulation_module$(O)
428    
429     MPIobj/calc_sticky_pair$(O): ./calc_sticky_pair.F90 \
430     MPIobj/definitions_module$(O) \
431     MPIobj/simulation_module$(O) \
432     MPIobj/mpiSimulation_module$(O) \
433     MPIobj/force_globals$(O)
434    
435     MPIobj/calc_gb$(O): ./calc_gb.F90 \
436     MPIobj/definitions_module$(O) \
437     MPIobj/simulation_module$(O) \
438     MPIobj/mpiSimulation_module$(O) \
439     MPIobj/force_globals$(O)
440    
441     MPIobj/calc_eam$(O): ./calc_eam.F90 \
442     MPIobj/definitions_module$(O) \
443     MPIobj/atype_module$(O) \
444     MPIobj/simulation_module$(O) \
445     MPIobj/mpiSimulation_module$(O) \
446     MPIobj/vector_class$(O) \
447     MPIobj/force_globals$(O) \
448     MPIobj/status_module$(O)
449    
450     MPIobj/atype_module$(O): ./atype_module.F90 \
451     MPIobj/definitions_module$(O) \
452     MPIobj/vector_class$(O)
453    
454     MPIobj/simulation_module$(O): ./simulation_module.F90 \
455     MPIobj/definitions_module$(O) \
456     MPIobj/atype_module$(O) \
457     MPIobj/vector_class$(O) \
458     MPIobj/force_globals$(O) \
459     MPIobj/mpiSimulation_module$(O) \
460     MPIobj/atype_module$(O) \
461     MPIobj/neighborLists$(O)
462    
463     MPIobj/calc_LJ_FF$(O): ./calc_LJ_FF.F90 \
464     MPIobj/definitions_module$(O) \
465     MPIobj/atype_module$(O) \
466     MPIobj/simulation_module$(O) \
467     MPIobj/mpiSimulation_module$(O) \
468     MPIobj/atype_module$(O) \
469     MPIobj/vector_class$(O) \
470     MPIobj/force_globals$(O)
471    
472     MPIobj/calc_reaction_field$(O): ./calc_reaction_field.F90 \
473     MPIobj/definitions_module$(O) \
474     MPIobj/atype_module$(O) \
475     MPIobj/simulation_module$(O) \
476     MPIobj/mpiSimulation_module$(O) \
477     MPIobj/vector_class$(O) \
478     MPIobj/atype_module$(O) \
479     MPIobj/force_globals$(O)
480    
481     MPIobj/calc_dipole_dipole$(O): ./calc_dipole_dipole.F90 \
482     MPIobj/definitions_module$(O) \
483     MPIobj/atype_module$(O) \
484     MPIobj/simulation_module$(O) \
485     MPIobj/mpiSimulation_module$(O) \
486     MPIobj/force_globals$(O) \
487     MPIobj/vector_class$(O)
488    
489 gezelter 940 MPIobj/calc_charge_charge$(O): ./calc_charge_charge.F90 \
490     MPIobj/definitions_module$(O) \
491     MPIobj/atype_module$(O) \
492     MPIobj/simulation_module$(O) \
493     MPIobj/mpiSimulation_module$(O) \
494     MPIobj/force_globals$(O) \
495     MPIobj/vector_class$(O)
496    
497 gezelter 747 MPIobj/do_Forces$(O): ./do_Forces.F90 \
498     MPIobj/definitions_module$(O) \
499     MPIobj/mpiSimulation_module$(O) \
500     MPIobj/atype_module$(O) \
501     MPIobj/simulation_module$(O) \
502     MPIobj/neighborLists$(O) \
503     MPIobj/calc_LJ_FF$(O) \
504     MPIobj/calc_sticky_pair$(O) \
505     MPIobj/calc_dipole_dipole$(O) \
506     MPIobj/calc_reaction_field$(O) \
507     MPIobj/calc_gb$(O) \
508     MPIobj/force_globals$(O) \
509     MPIobj/vector_class$(O)
510    
511     MPIobj/notifyCutoffs$(O): ./notifyCutoffs.F90 \
512     MPIobj/definitions_module$(O) \
513     MPIobj/atype_module$(O) \
514     MPIobj/calc_LJ_FF$(O) \
515     MPIobj/calc_eam$(O) \
516     MPIobj/calc_dipole_dipole$(O) \
517     MPIobj/calc_reaction_field$(O) \
518     MPIobj/do_Forces$(O)
519    
520     MPIobj/wrappers$(O): ./wrappers.F90 \
521     MPIobj/definitions_module$(O) \
522     MPIobj/mpiSimulation_module$(O) \
523     MPIobj/atype_module$(O) \
524     MPIobj/simulation_module$(O) \
525     MPIobj/calc_sticky_pair$(O) \
526     MPIobj/calc_gb$(O) \
527     MPIobj/do_Forces$(O) \
528     MPIobj/notifyCutoffs$(O)
529    
530 mmeineke 891 MPIobj/timing$(O): ./timing.F90 \
531     MPIobj/do_Forces$(O) \
532     MPIobj/mpiSimulation_module$(O)