ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-1.0/libmdtools/Makefile.in
Revision: 1419
Committed: Tue Jul 27 18:14:16 2004 UTC (19 years, 11 months ago) by gezelter
File size: 13735 byte(s)
Log Message:
BASS eradication project (part 3)

File Contents

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