ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/SHAPES/Makefile.in
Revision: 1247
Committed: Fri Jun 4 16:26:37 2004 UTC (21 years, 3 months ago) by gezelter
File size: 3288 byte(s)
Log Message:
Fixes

File Contents

# Content
1 #####################################################
2 # Makefile for SHAPES #
3 #####################################################
4 # You should not change anything here. #
5 #####################################################
6
7 # No make rules by default
8 .SUFFIXES : .c .cpp .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 # Location of the oopse home
23 SHAPES_HOME=@SHAPES_HOME@
24 VDW_PARAM_DIR=@SHAPES_HOME@/share/vdwFiles
25
26 # C compiler
27 CC=@CC@
28
29 # C++ compiler
30 CXX=@CXX@
31
32 # ar
33 AR=@AR@
34
35 # ranlib
36 RANLIB=@RANLIB@
37
38 # rm
39 RM=rm -f
40
41 # soft link
42 LN_S=@LN_S@
43
44 # BSD install
45 INSTALL=@INSTALL@
46 INSTALL_PROGRAM=@INSTALL_PROGRAM@
47 INSTALL_DATA=@INSTALL_DATA@
48 MKINSTALLDIRS=@MKINSTALLDIRS@
49
50 # CPP flags
51 CPPFLAGS=@CPPFLAGS@
52
53 # C flags
54 CFLAGS_C=@CFLAGS@
55
56 # C++ flags
57 CXXFLAGS_C=@CXXFLAGS@
58
59 # LDFLAGS
60 LDFLAGS=@LDFLAGS@
61
62 # First do compile-time flags:
63
64 DECLARE=-DVDW_PATH="$(VDW_PARAM_DIR)"
65
66 # include paths starting with "." are all relative to the SUBDIRS!!!
67
68 INCLUDES= -I..
69
70 CFLAGS=$(CFLAGS_C) $(INCLUDES) $(DECLARE)
71 CXXFLAGS=$(CXXFLAGS_C) $(INCLUDES) $(DECLARE)
72 DEPFLAGS=$(CFLAGS_C) -I.
73
74 SRC_DIR := ..
75
76 FORCER=forcer$(EXE)
77 LDADD=-lz
78
79 # Then do the compile rules:
80
81 obj/%.o: %.cpp
82 cd obj; $(CXX) $(CXXFLAGS) -c $(SRC_DIR)/$<
83
84 obj/%.o: %.c
85 cd obj; $(CC) $(CFLAGS) -c $(SRC_DIR)/$<
86
87 # Then list what we have to compile
88 #
89 C_FILES = \
90 $(DIR)/forcerCmd.c
91
92 CXX_FILES = \
93 $(DIR)/forcer.cpp \
94 $(DIR)/PDBReader.cpp \
95 $(DIR)/VDWAtom.cpp
96
97 VDW_FILES= \
98 amber99.vdw \
99 charmm27.vdw \
100 gaff.vdw \
101 LJ.vdw \
102 oplsaal.vdw
103
104 DIR:=.
105 C_SRCS := $(C_FILES)
106 CXX_SRCS := $(CXX_FILES)
107 SRCS := $(C_SRCS) $(CXX_SRCS)
108
109 DIR:=obj
110 C_OBJS := $(C_FILES:.c=.o)
111 CXX_OBJS := $(CXX_FILES:.cpp=.o)
112 OBJS := $(C_OBJS) $(CXX_OBJS)
113
114 SUBDIRS = obj
115
116 # Possible make targets:
117
118 all: forcer
119
120 forcer$(EXE) : $(OBJS)
121 $(CXX) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS) $(LDADD)
122
123 install : $(FORCER)
124 $(MKINSTALLDIRS) $(SHAPES_HOME)/bin
125 $(INSTALL_PROGRAM) -s $(FORCER) $(SHAPES_HOME)/bin/$(FORCER)
126 $(MKINSTALLDIRS) $(VDW_PARAM_DIR)
127 for i in $(VDW_FILES); do \
128 echo "Installing $$i in $(VDW_PARAM_DIR)\n"; \
129 $(INSTALL_DATA) $$i $(VDW_PARAM_DIR)/$$i; \
130 done
131
132
133 .PHONY : clean
134
135 clean : dummy
136 for i in $(LIBSUBDIRS); do \
137 (cd $$i; $(RM) *.o *.mod) || exit 1; \
138 done
139 $(RM) forcer *.o *.mod *~ Make.temp Make.ftemp
140
141 distclean : dummy
142 for i in $(LIBSUBDIRS); do \
143 (cd $$i; $(RM) *.o *.mod) || exit 1; \
144 done
145 $(RM) forcer *.o *.mod *~ Make.temp Make.ftemp
146
147 depend : Make.dep
148
149 Make.dep :
150 echo "Only C dependencies are made automagically!"
151 echo "# DO NOT DELETE THIS LINE - used by make depend" > Make.dep
152 $(CC) $(DEPFLAGS) -MM $(C_SRCS) \
153 | sed 's/\.o:/\$$(O)\ :/g' > Make.temp
154 $(CXX) $(DEPFLAGS) -MM $(CXX_SRCS) \
155 | sed 's/\.o:/\$$(O)\ :/g' >> Make.temp
156 cat Make.temp | sed 's/^[a-zA-Z0-9]/obj\/&/g' >> Make.dep
157 # cat Make.temp | sed 's/^[a-zA-Z0-9]/MPIobj\/&/g' >> Make.dep
158 $(RM) Make.ftemp Make.temp
159
160 install : dummy
161
162 links : dummy
163
164 tests : dummy
165
166 dummy :
167
168 include Make.dep