34 |
|
|
35 |
CC = gcc |
CC = gcc |
36 |
CXX = g++ |
CXX = g++ |
37 |
|
ifeq ($(GCC4),1) |
38 |
|
F77 = gfortran |
39 |
|
else |
40 |
F77 = g77 |
F77 = g77 |
41 |
|
endif |
42 |
AR = ar |
AR = ar |
43 |
AS = as |
AS = as |
44 |
CXXLD = g++ |
CXXLD = g++ |
59 |
|
|
60 |
#CFLAGS += -Wall |
#CFLAGS += -Wall |
61 |
CFLAGS += -Wall -shared |
CFLAGS += -Wall -shared |
62 |
FFLAGS += -O0 |
FFLAGS += -O0 |
63 |
LDFLAGS += |
LDFLAGS += |
64 |
|
|
65 |
#------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------ |
103 |
|
|
104 |
|
|
105 |
$(OBJDIR)/.%.d: %.f |
$(OBJDIR)/.%.d: %.f |
106 |
|
ifeq ($(verbose),) |
107 |
|
@if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
108 |
|
if [ ! -d $(OBJDIR)/$$(/usr/bin/dirname $<) ]; then mkdir -p $(OBJDIR)/$$(/usr/bin/dirname $<) $(OBJDIR)/.$$(/usr/bin/dirname $<) ;fi; \ |
109 |
|
# echo "generating depend infos for $< into $@"; \ |
110 |
|
$(F77) -M $(FFLAGS) $< 2>/dev/null\ |
111 |
|
| sed -e 's%$*.o%$(OBJDIR)/$*.o%g' > $(OBJDIR)/.$*.d |
112 |
|
else |
113 |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
114 |
if [ ! -d $(OBJDIR)/$$(/usr/bin/dirname $<) ]; then mkdir -p $(OBJDIR)/$$(/usr/bin/dirname $<) $(OBJDIR)/.$$(/usr/bin/dirname $<) ;fi; \ |
if [ ! -d $(OBJDIR)/$$(/usr/bin/dirname $<) ]; then mkdir -p $(OBJDIR)/$$(/usr/bin/dirname $<) $(OBJDIR)/.$$(/usr/bin/dirname $<) ;fi; \ |
115 |
echo "generating depend infos for $< into $@"; \ |
echo "generating depend infos for $< into $@"; \ |
116 |
$(F77) -M $(FFLAGS) $< 2>/dev/null\ |
$(F77) -M $(FFLAGS) $< 2>/dev/null\ |
117 |
| sed -e 's%$*.o%$(OBJDIR)/$*.o%g' > $(OBJDIR)/.$*.d |
| sed -e 's%$*.o%$(OBJDIR)/$*.o%g' > $(OBJDIR)/.$*.d |
118 |
|
endif |
119 |
|
|
120 |
$(OBJDIR)/.%.d: %.for |
$(OBJDIR)/.%.d: %.for |
121 |
|
ifeq ($(verbose),) |
122 |
|
@if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
123 |
|
if [ ! -d $(OBJDIR)/$$(/usr/bin/dirname $<) ]; then mkdir -p $(OBJDIR)/$$(/usr/bin/dirname $<) $(OBJDIR)/.$$(/usr/bin/dirname $<) ;fi; \ |
124 |
|
# echo "generating depend infos for $< into $@"; \ |
125 |
|
$(F77) -M $(FFLAGS) $< 2>/dev/null\ |
126 |
|
| sed -e 's%$*.o%$(OBJDIR)/$*.o%g' > $(OBJDIR)/.$*.d |
127 |
|
else |
128 |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
129 |
if [ ! -d $(OBJDIR)/$$(/usr/bin/dirname $<) ]; then mkdir -p $(OBJDIR)/$$(/usr/bin/dirname $<) $(OBJDIR)/.$$(/usr/bin/dirname $<) ;fi; \ |
if [ ! -d $(OBJDIR)/$$(/usr/bin/dirname $<) ]; then mkdir -p $(OBJDIR)/$$(/usr/bin/dirname $<) $(OBJDIR)/.$$(/usr/bin/dirname $<) ;fi; \ |
130 |
echo "generating depend infos for $< into $@"; \ |
echo "generating depend infos for $< into $@"; \ |
131 |
$(F77) -M $(FFLAGS) $< 2>/dev/null\ |
$(F77) -M $(FFLAGS) $< 2>/dev/null\ |
132 |
| sed -e 's%$*.o%$(OBJDIR)/$*.o%g' > $(OBJDIR)/.$*.d |
| sed -e 's%$*.o%$(OBJDIR)/$*.o%g' > $(OBJDIR)/.$*.d |
133 |
|
endif |
134 |
|
|
135 |
$(OBJDIR)/.%.d: %.c |
$(OBJDIR)/.%.d: %.c |
136 |
|
ifeq ($(verbose),) |
137 |
|
@if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
138 |
|
if [ ! -d $(OBJDIR)/$$(/usr/bin/dirname $<) ]; then mkdir -p $(OBJDIR)/$$(/usr/bin/dirname $<) $(OBJDIR)/.$$(/usr/bin/dirname $<) ;fi; \ |
139 |
|
# echo "generating depend infos for $< into $@"; \ |
140 |
|
$(CC) -M $(CFLAGS) $< 2>/dev/null\ |
141 |
|
| sed -e 's%$*.o%$(OBJDIR)/$*.o%g' > $(OBJDIR)/.$*.d |
142 |
|
else |
143 |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
144 |
if [ ! -d $(OBJDIR)/$$(/usr/bin/dirname $<) ]; then mkdir -p $(OBJDIR)/$$(/usr/bin/dirname $<) $(OBJDIR)/.$$(/usr/bin/dirname $<) ;fi; \ |
if [ ! -d $(OBJDIR)/$$(/usr/bin/dirname $<) ]; then mkdir -p $(OBJDIR)/$$(/usr/bin/dirname $<) $(OBJDIR)/.$$(/usr/bin/dirname $<) ;fi; \ |
145 |
echo "generating depend infos for $< into $@"; \ |
echo "generating depend infos for $< into $@"; \ |
146 |
$(CC) -M $(CFLAGS) $< 2>/dev/null\ |
$(CC) -M $(CFLAGS) $< 2>/dev/null\ |
147 |
| sed -e 's%$*.o%$(OBJDIR)/$*.o%g' > $(OBJDIR)/.$*.d |
| sed -e 's%$*.o%$(OBJDIR)/$*.o%g' > $(OBJDIR)/.$*.d |
148 |
|
endif |
149 |
|
|
150 |
$(OBJDIR)/.%.d: %.cpp |
$(OBJDIR)/.%.d: %.cpp |
151 |
|
ifeq ($(verbose),) |
152 |
|
@if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
153 |
|
if [ ! -d $(OBJDIR)/$$(/usr/bin/dirname $<) ]; then mkdir -p $(OBJDIR)/$$(/usr/bin/dirname $<) $(OBJDIR)/.$$(/usr/bin/dirname $<) ;fi; \ |
154 |
|
# echo "generating depend infos for $< into $@"; \ |
155 |
|
$(CXX) -M $(CFLAGS) $< 2>/dev/null\ |
156 |
|
| sed -e 's%$*.o%$(OBJDIR)/$*.o%g' > $(OBJDIR)/.$*.d |
157 |
|
else |
158 |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
159 |
if [ ! -d $(OBJDIR)/$$(/usr/bin/dirname $<) ]; then mkdir -p $(OBJDIR)/$$(/usr/bin/dirname $<) $(OBJDIR)/.$$(/usr/bin/dirname $<) ;fi; \ |
if [ ! -d $(OBJDIR)/$$(/usr/bin/dirname $<) ]; then mkdir -p $(OBJDIR)/$$(/usr/bin/dirname $<) $(OBJDIR)/.$$(/usr/bin/dirname $<) ;fi; \ |
160 |
echo "generating depend infos for $< into $@"; \ |
echo "generating depend infos for $< into $@"; \ |
161 |
$(CXX) -M $(CFLAGS) $< 2>/dev/null\ |
$(CXX) -M $(CFLAGS) $< 2>/dev/null\ |
162 |
| sed -e 's%$*.o%$(OBJDIR)/$*.o%g' > $(OBJDIR)/.$*.d |
| sed -e 's%$*.o%$(OBJDIR)/$*.o%g' > $(OBJDIR)/.$*.d |
163 |
|
endif |
164 |
|
|
165 |
$(OBJDIR)/%.o: %.for |
$(OBJDIR)/%.o: %.for |
166 |
|
ifeq ($(verbose),) |
167 |
|
@if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
168 |
|
$(F77) -c $(FFLAGS) -o $@ $< |
169 |
|
else |
170 |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
171 |
$(F77) -c $(FFLAGS) -o $@ $< |
$(F77) -c $(FFLAGS) -o $@ $< |
172 |
|
endif |
173 |
|
|
174 |
$(OBJDIR)/%.o: %.f |
$(OBJDIR)/%.o: %.f |
175 |
|
ifeq ($(verbose),) |
176 |
|
@if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
177 |
|
$(F77) -c $(FFLAGS) -o $@ $< |
178 |
|
else |
179 |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
180 |
$(F77) -c $(FFLAGS) -o $@ $< |
$(F77) -c $(FFLAGS) -o $@ $< |
181 |
|
endif |
182 |
|
|
183 |
$(OBJDIR)/%.o: %.c |
$(OBJDIR)/%.o: %.c |
184 |
|
ifeq ($(verbose),) |
185 |
|
@if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
186 |
|
$(CC) -c $(CFLAGS) -o $@ $< |
187 |
|
else |
188 |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
189 |
$(CC) -c $(CFLAGS) -o $@ $< |
$(CC) -c $(CFLAGS) -o $@ $< |
190 |
|
endif |
191 |
|
|
192 |
$(OBJDIR)/%.o: %.cpp |
$(OBJDIR)/%.o: %.cpp |
193 |
|
ifeq ($(verbose),) |
194 |
|
@if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
195 |
|
$(CXX) -c $(CFLAGS) -o $@ $< |
196 |
|
else |
197 |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi; \ |
198 |
$(CXX) -c $(CFLAGS) -o $@ $< |
$(CXX) -c $(CFLAGS) -o $@ $< |
199 |
|
endif |
200 |
|
|
201 |
#------------------------------------------------------------------------------ |
#------------------------------------------------------------------------------ |
202 |
# General directory structure, includes, objects |
# General directory structure, includes, objects |