ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/Makefile.in
Revision: 1031
Committed: Fri Feb 6 18:58:06 2004 UTC (20 years, 5 months ago) by tim
File size: 12695 byte(s)
Log Message:
Add some lines into global.cpp to make it work with energy minimization

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 chrisfen 999 $(DIR)/WATER.cpp \
182 gezelter 747 $(DIR)/SimInfo.cpp \
183     $(DIR)/SimSetup.cpp \
184     $(DIR)/StatWriter.cpp \
185     $(DIR)/Integrator.cpp \
186     $(DIR)/Thermo.cpp \
187     $(DIR)/GhostBend.cpp \
188     $(DIR)/Torsion.cpp \
189     $(DIR)/TorsionExtensions.cpp \
190     $(DIR)/DUFF.cpp \
191     $(DIR)/randomSPRNG.cpp \
192     $(DIR)/fortranWrappers.cpp \
193     $(DIR)/ForceFields.cpp \
194     $(DIR)/Molecule.cpp \
195 gezelter 761 $(DIR)/NPTf.cpp \
196     $(DIR)/NPTi.cpp \
197 mmeineke 812 $(DIR)/NPTxyz.cpp \
198 gezelter 761 $(DIR)/NVT.cpp \
199 gezelter 747 $(DIR)/SimState.cpp \
200     $(DIR)/ZConstraint.cpp \
201     $(DIR)/ZConsWriter.cpp \
202 mmeineke 887 $(DIR)/mdProfile.cpp \
203 gezelter 940 $(DIR)/GenericData.cpp \
204 tim 1031 $(DIR)/mpiSimulation.cpp \
205     $(DIR)/NLModel0.cpp \
206     $(DIR)/NLModel1.cpp \
207     $(DIR)/Constraint.cpp \
208     $(DIR)/SimpleBoundCons.cpp \
209     $(DIR)/LinearCons.cpp \
210     $(DIR)/NonlinearCons.cpp \
211     $(DIR)/ConstraintList.cpp \
212     $(DIR)/Minimizer1D.cpp \
213     $(DIR)/ConjugateMinimizer.cpp \
214     $(DIR)/Utility.cpp
215 gezelter 747
216     F90_FILES= \
217     $(DIR)/definitions_module.F90 \
218     $(DIR)/status_module.F90 \
219     $(DIR)/atype_module.F90 \
220     $(DIR)/calc_dipole_dipole.F90 \
221 gezelter 940 $(DIR)/calc_charge_charge.F90 \
222 gezelter 747 $(DIR)/calc_reaction_field.F90 \
223     $(DIR)/calc_LJ_FF.F90 \
224     $(DIR)/calc_eam.F90 \
225     $(DIR)/calc_sticky_pair.F90 \
226     $(DIR)/do_Forces.F90 \
227     $(DIR)/vector_class.F90 \
228     $(DIR)/simulation_module.F90 \
229     $(DIR)/wrappers.F90 \
230     $(DIR)/neighborLists.F90 \
231     $(DIR)/calc_gb.F90 \
232     $(DIR)/force_globals.F90 \
233     $(DIR)/mpiSimulation_module.F90 \
234 chuckv 858 $(DIR)/notifyCutoffs.F90 \
235 gezelter 940 $(DIR)/timing.F90 \
236     $(DIR)/oopseMPI_module.F90
237 gezelter 747
238     DIR:=.
239     C_SRCS := $(C_FILES)
240     CXX_SRCS := $(CXX_FILES)
241     F90_SRCS := $(F90_FILES)
242     SRCS := $(C_SRCS) $(CXX_SRCS) $(F90_SRCS)
243    
244     DIR:=obj
245     C_OBJS := $(C_FILES:.c=.o)
246     CXX_OBJS := $(CXX_FILES:.cpp=.o)
247     F90_OBJS := $(F90_FILES:.F90=.o)
248     OBJS := $(C_OBJS) $(CXX_OBJS) $(F90_OBJS)
249    
250     DIR:=MPIobj
251     C_MPIOBJS := $(C_FILES:.c=.o)
252     CXX_MPIOBJS := $(CXX_FILES:.cpp=.o)
253     F90_MPIOBJS := $(F90_FILES:.F90=.o)
254     MPIOBJS := $(C_MPIOBJS) $(CXX_MPIOBJS) $(F90_MPIOBJS)
255    
256     LIBSUBDIRS = \
257     obj \
258     MPIobj
259    
260     # Possible make targets:
261    
262     all: libmdtools.a libmdtools_MPI.a
263    
264     libmdtools.a: $(OBJS)
265     $(RM) $@
266     $(AR) cr $@ $(OBJS)
267     $(RANLIB) $@
268    
269     libmdtools_MPI.a: $(MPIOBJS)
270     $(RM) $@
271     $(AR) cr $@ $(MPIOBJS)
272     $(RANLIB) $@
273    
274     .PHONY : clean
275    
276     clean : dummy
277     for i in $(LIBSUBDIRS); do \
278     (cd $$i; $(RM) *.o *.mod) || exit 1; \
279     done
280     $(RM) libmdtools.a libmdtools_MPI.a *.o *.mod *~ Make.temp Make.ftemp
281    
282     distclean : dummy
283     for i in $(LIBSUBDIRS); do \
284     (cd $$i; $(RM) *.o *.mod) || exit 1; \
285     done
286     $(RM) libmdtools.a libmdtools_MPI.a *.o *.mod *~ Make.temp Make.ftemp
287    
288     depend : Make.dep
289    
290     Make.dep :
291     echo "Only C dependencies are made automagically!"
292     echo "# DO NOT DELETE THIS LINE - used by make depend" > Make.dep
293     $(CC) $(DEPFLAGS) -MM $(C_SRCS) \
294     | sed 's/\.o:/\$$(O)\ :/g' > Make.temp
295     $(CXX) $(DEPFLAGS) -MM $(CXX_SRCS) \
296     | sed 's/\.o:/\$$(O)\ :/g' >> Make.temp
297     cat Make.temp | sed 's/^[a-zA-Z0-9]/obj\/&/g' >> Make.dep
298     cat Make.temp | sed 's/^[a-zA-Z0-9]/MPIobj\/&/g' >> Make.dep
299     # ../scripts/sfmakedepend -I $(MPI_F90_MODS) -d obj -f ./Make.ftemp -h *.F90
300     # ../scripts/sfmakedepend -I $(MPI_F90_MODS) -d MPIobj -f ./Make.ftemp -h *.F90
301     # cat Make.ftemp | sed 's/\.o:/\$$(O)\ :/g' >> Make.dep
302     $(RM) Make.ftemp Make.temp
303    
304     install : dummy
305    
306     links : dummy
307    
308     tests : dummy
309    
310     dummy :
311    
312     include Make.dep
313    
314     obj/definitions_module$(O): ./definitions_module.F90
315    
316     obj/vector_class$(O): ./vector_class.F90
317    
318     obj/status_module$(O): ./status_module.F90
319    
320     obj/force_globals$(O): ./force_globals.F90 \
321     obj/definitions_module$(O)
322    
323     obj/neighborLists$(O): ./neighborLists.F90 \
324     obj/definitions_module$(O)
325    
326     obj/calc_sticky_pair$(O): ./calc_sticky_pair.F90 \
327     obj/definitions_module$(O) \
328     obj/simulation_module$(O) \
329     obj/force_globals$(O)
330    
331     obj/calc_eam$(O): ./calc_eam.F90 \
332     obj/definitions_module$(O) \
333     obj/atype_module$(O) \
334     obj/simulation_module$(O) \
335     obj/vector_class$(O) \
336     obj/force_globals$(O) \
337     obj/status_module$(O)
338    
339     obj/calc_gb$(O): ./calc_gb.F90 \
340     obj/definitions_module$(O) \
341     obj/simulation_module$(O) \
342     obj/force_globals$(O)
343    
344     obj/atype_module$(O): ./atype_module.F90 \
345     obj/definitions_module$(O) \
346     obj/vector_class$(O)
347    
348     obj/simulation_module$(O): ./simulation_module.F90 \
349     obj/definitions_module$(O) \
350     obj/vector_class$(O) \
351     obj/force_globals$(O) \
352     obj/atype_module$(O) \
353     obj/neighborLists$(O)
354    
355     obj/calc_LJ_FF$(O): ./calc_LJ_FF.F90 \
356     obj/definitions_module$(O) \
357     obj/atype_module$(O) \
358     obj/simulation_module$(O) \
359     obj/vector_class$(O) \
360     obj/force_globals$(O)
361    
362     obj/calc_reaction_field$(O): ./calc_reaction_field.F90 \
363     obj/definitions_module$(O) \
364     obj/vector_class$(O) \
365     obj/atype_module$(O) \
366     obj/simulation_module$(O) \
367     obj/force_globals$(O)
368    
369     obj/calc_dipole_dipole$(O): ./calc_dipole_dipole.F90 \
370     obj/definitions_module$(O) \
371     obj/atype_module$(O) \
372     obj/simulation_module$(O) \
373     obj/force_globals$(O) \
374     obj/vector_class$(O)
375    
376 gezelter 940 obj/calc_charge_charge$(O): ./calc_charge_charge.F90 \
377     obj/definitions_module$(O) \
378     obj/atype_module$(O) \
379     obj/simulation_module$(O) \
380     obj/force_globals$(O) \
381     obj/vector_class$(O)
382    
383 gezelter 747 obj/do_Forces$(O): ./do_Forces.F90 \
384     obj/definitions_module$(O) \
385     obj/atype_module$(O) \
386     obj/simulation_module$(O) \
387     obj/neighborLists$(O) \
388     obj/calc_LJ_FF$(O) \
389     obj/calc_sticky_pair$(O) \
390     obj/calc_dipole_dipole$(O) \
391     obj/calc_reaction_field$(O) \
392     obj/calc_gb$(O) \
393     obj/force_globals$(O) \
394     obj/vector_class$(O)
395    
396     obj/notifyCutoffs$(O): ./notifyCutoffs.F90 \
397     obj/definitions_module$(O) \
398     obj/atype_module$(O) \
399     obj/calc_LJ_FF$(O) \
400     obj/calc_eam$(O) \
401     obj/calc_dipole_dipole$(O) \
402     obj/calc_reaction_field$(O) \
403     obj/do_Forces$(O)
404    
405     obj/wrappers$(O): ./wrappers.F90 \
406     obj/definitions_module$(O) \
407     obj/atype_module$(O) \
408     obj/simulation_module$(O) \
409     obj/calc_sticky_pair$(O) \
410     obj/calc_gb$(O) \
411     obj/do_Forces$(O) \
412     obj/notifyCutoffs$(O)
413    
414 mmeineke 891 obj/timing$(O): ./timing.F90 \
415     obj/do_Forces$(O)
416 gezelter 747
417    
418    
419     #MPI dependencies:
420    
421     MPIobj/definitions_module$(O): ./definitions_module.F90
422    
423     MPIobj/vector_class$(O): ./vector_class.F90
424    
425     MPIobj/status_module$(O): ./status_module.F90
426    
427 chuckv 858 MPIobj/oopseMPI_module$(O): ./oopseMPI_module.F90
428 gezelter 747
429 chuckv 858 MPIobj/mpiSimulation_module$(O): ./mpiSimulation_module.F90 \
430     MPIobj/oopseMPI_module$(O)
431    
432 gezelter 747 MPIobj/force_globals$(O): ./force_globals.F90 \
433     MPIobj/mpiSimulation_module$(O) \
434     MPIobj/definitions_module$(O)
435    
436     MPIobj/neighborLists$(O): ./neighborLists.F90 \
437     MPIobj/definitions_module$(O) \
438     MPIobj/mpiSimulation_module$(O)
439    
440     MPIobj/calc_sticky_pair$(O): ./calc_sticky_pair.F90 \
441     MPIobj/definitions_module$(O) \
442     MPIobj/simulation_module$(O) \
443     MPIobj/mpiSimulation_module$(O) \
444     MPIobj/force_globals$(O)
445    
446     MPIobj/calc_gb$(O): ./calc_gb.F90 \
447     MPIobj/definitions_module$(O) \
448     MPIobj/simulation_module$(O) \
449     MPIobj/mpiSimulation_module$(O) \
450     MPIobj/force_globals$(O)
451    
452     MPIobj/calc_eam$(O): ./calc_eam.F90 \
453     MPIobj/definitions_module$(O) \
454     MPIobj/atype_module$(O) \
455     MPIobj/simulation_module$(O) \
456     MPIobj/mpiSimulation_module$(O) \
457     MPIobj/vector_class$(O) \
458     MPIobj/force_globals$(O) \
459     MPIobj/status_module$(O)
460    
461     MPIobj/atype_module$(O): ./atype_module.F90 \
462     MPIobj/definitions_module$(O) \
463     MPIobj/vector_class$(O)
464    
465     MPIobj/simulation_module$(O): ./simulation_module.F90 \
466     MPIobj/definitions_module$(O) \
467     MPIobj/atype_module$(O) \
468     MPIobj/vector_class$(O) \
469     MPIobj/force_globals$(O) \
470     MPIobj/mpiSimulation_module$(O) \
471     MPIobj/atype_module$(O) \
472     MPIobj/neighborLists$(O)
473    
474     MPIobj/calc_LJ_FF$(O): ./calc_LJ_FF.F90 \
475     MPIobj/definitions_module$(O) \
476     MPIobj/atype_module$(O) \
477     MPIobj/simulation_module$(O) \
478     MPIobj/mpiSimulation_module$(O) \
479     MPIobj/atype_module$(O) \
480     MPIobj/vector_class$(O) \
481     MPIobj/force_globals$(O)
482    
483     MPIobj/calc_reaction_field$(O): ./calc_reaction_field.F90 \
484     MPIobj/definitions_module$(O) \
485     MPIobj/atype_module$(O) \
486     MPIobj/simulation_module$(O) \
487     MPIobj/mpiSimulation_module$(O) \
488     MPIobj/vector_class$(O) \
489     MPIobj/atype_module$(O) \
490     MPIobj/force_globals$(O)
491    
492     MPIobj/calc_dipole_dipole$(O): ./calc_dipole_dipole.F90 \
493     MPIobj/definitions_module$(O) \
494     MPIobj/atype_module$(O) \
495     MPIobj/simulation_module$(O) \
496     MPIobj/mpiSimulation_module$(O) \
497     MPIobj/force_globals$(O) \
498     MPIobj/vector_class$(O)
499    
500 gezelter 940 MPIobj/calc_charge_charge$(O): ./calc_charge_charge.F90 \
501     MPIobj/definitions_module$(O) \
502     MPIobj/atype_module$(O) \
503     MPIobj/simulation_module$(O) \
504     MPIobj/mpiSimulation_module$(O) \
505     MPIobj/force_globals$(O) \
506     MPIobj/vector_class$(O)
507    
508 gezelter 747 MPIobj/do_Forces$(O): ./do_Forces.F90 \
509     MPIobj/definitions_module$(O) \
510     MPIobj/mpiSimulation_module$(O) \
511     MPIobj/atype_module$(O) \
512     MPIobj/simulation_module$(O) \
513     MPIobj/neighborLists$(O) \
514     MPIobj/calc_LJ_FF$(O) \
515     MPIobj/calc_sticky_pair$(O) \
516     MPIobj/calc_dipole_dipole$(O) \
517     MPIobj/calc_reaction_field$(O) \
518     MPIobj/calc_gb$(O) \
519     MPIobj/force_globals$(O) \
520     MPIobj/vector_class$(O)
521    
522     MPIobj/notifyCutoffs$(O): ./notifyCutoffs.F90 \
523     MPIobj/definitions_module$(O) \
524     MPIobj/atype_module$(O) \
525     MPIobj/calc_LJ_FF$(O) \
526     MPIobj/calc_eam$(O) \
527     MPIobj/calc_dipole_dipole$(O) \
528     MPIobj/calc_reaction_field$(O) \
529     MPIobj/do_Forces$(O)
530    
531     MPIobj/wrappers$(O): ./wrappers.F90 \
532     MPIobj/definitions_module$(O) \
533     MPIobj/mpiSimulation_module$(O) \
534     MPIobj/atype_module$(O) \
535     MPIobj/simulation_module$(O) \
536     MPIobj/calc_sticky_pair$(O) \
537     MPIobj/calc_gb$(O) \
538     MPIobj/do_Forces$(O) \
539     MPIobj/notifyCutoffs$(O)
540    
541 mmeineke 891 MPIobj/timing$(O): ./timing.F90 \
542     MPIobj/do_Forces$(O) \
543     MPIobj/mpiSimulation_module$(O)