File: Makefile.in

package info (click to toggle)
lam 6.3.2-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 11,560 kB
  • ctags: 10,207
  • sloc: ansic: 86,520; cpp: 10,304; sh: 4,243; makefile: 3,509; perl: 362; fortran: 187; csh: 19
file content (270 lines) | stat: -rw-r--r-- 7,800 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
##
# Copyright 1998-1999, University of Notre Dame.
# Authors: Jeffrey M. Squyres, Kinis L. Meyer, with M. D. McNally 
#          and Andrew Lumsdaine
#
# This file is part of the Notre Dame LAM implementation of MPI.
#
# You should have received a copy of the License Agreement for the
# Notre Dame LAM implementation of MPI along with the software; see
# the file LICENSE.  If not, contact Office of Research, University of
# Notre Dame, Notre Dame, IN 46556.
#
# Permission to modify the code and to distribute modified code is
# granted, provided the text of this NOTICE is retained, a notice that
# the code was modified is included with the above COPYRIGHT NOTICE and
# with the COPYRIGHT NOTICE in the LICENSE file, and that the LICENSE
# file is distributed with the modified code.
#
# LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
# By way of example, but not limitation, Licensor MAKES NO
# REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
# PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
# OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
# OR OTHER RIGHTS.
#
# Additional copyrights may follow.
#
##
##	Ohio Trollius
##	Copyright 1997 The Ohio State University
##
##	$Id: Makefile.in,v 6.41 1999/11/11 21:19:41 jsquyres Exp $
##
##	Function:	- grand-daddy LAM make
##

DEPTH   = .

##
## global configuration
##
include $(DEPTH)/config.mk

SUBDIR	= share/h lib/otb-$(OARCH) tools-$(OARCH) otb-$(OARCH) schema man help
TAGDIRS	= ./share ./lib/otb ./otb ./tools

default: install

all: dirs
	@for i in $(SUBDIR); do \
		(cd $$i; echo $$i: ; PATH=$${PATH}:$(OBDIR) $(MAKE) all) \
			|| exit 1; \
	done

install: lam-install @ROMIO_INSTALL@ @MPI2CPP_INSTALL@ lam-done

clean: lam-clean @ROMIO_CLEAN@ @MPI2CPP_CLEAN@

distclean: lam-distclean 

examples: lam-examples @ROMIO_EXAMPLES@ @MPI2CPP_EXAMPLES@

lam-install: dirs .depend
	@echo
	@echo "Compiling LAM/MPI $(LAM_VERSION)"
	@echo
	@ if test -d $(LAMHOME)/h -a ! -h $(LAMHOME)/h ; then \
	  mv $(LAMHOME)/h $(LAMHOME)/h.old; \
	  echo "*** WARNING: Moved old LAM \"h\" directory to \"h.old\""; \
	fi
	@ if test ! -d $(LAMHOME)/h -a ! -h $(LAMHOME)/h ; then \
		(cd $(LAMHOME) ; ln -s include h ) ; \
	fi
	@for i in $(SUBDIR); do \
		(cd $$i; echo $$i: ; PATH=$${PATH}:$(OBDIR) ; \
			$(MAKE) install) || exit 1; \
	done

lam-done:
	@echo
	@echo "Installation of LAM $(LAM_VERSION) is complete"
	@echo

lam-clean: dirs
	@for i in $(SUBDIR) examples; do \
		(cd $$i; echo $$i: ; $(MAKE) clean) || exit 1; \
	done

lam-distclean: clean
	rm -rf config.cache config.log config.status Makefile \
		share/h/rpi.shm.h share/h/rpi.tcp.h \
		share/h/lam_config.h config.mk \
		tools/hcc/mpicc tools/hcc/hcp tools/hf77/mpif77 \
		examples/Makefile examples/config-defs \
		config/depend
	find . -name Makefile.bak > makfiles
	rm -f `cat makfiles`
	rm -f makfiles
	rm -f Makefile

lam-squeakyclean:
	rm -rf otb-$(OARCH) tools-$(OARCH) lib/otb-$(OARCH)
	find . -name Depends > depfiles
	rm -f .depend `cat depfiles`
	rm -f depfiles

lam-examples:
	@ (cd examples; echo examples: ; make )


# Be sure to set LAMHOME properly so that hcc/hcp/hf77 use the right
# libraries/include files (to avoid conflicts if the user may already
# have a LAM installed, and already have LAMHOME set somewhere else).

# Before you ask, yes, the final "cat" on the ROMIO_TEMP line is
# necessary.  If it is not there and grep does not find '-g' in
# $(CFLAGS), grep will return 1, which will cause "make" to bail.  But
# apparently only the *last* command's return code will be returned to
# make.  Cat will always return 0, which means that "make" won't bail.
# Really weird.

# Another bug in ROMIO -- we have to go set the unix permissions on
# directories under $LAMHOME/include to be 755 again.  ROMIO does a
# chmod 644 $LAMHOME/include/* -- ick!  The ROMOI authors have been
# notified of this.  13 June 1999/JMS.

romio-install:
	@ echo
	@ echo "Compiling ROMIO support"
	@ echo
	@ (cd romio ; \
	 LAMHCC="$(CC)" ; \
	 LAMF77="$(FC)" ; \
	 LAMHOME="$(LAMHOME)" ; \
	 ROMIO_DEBUG="" ; \
	 ROMIO_TEMP="`echo '$(CFLAGS)' | grep '\-g' | cat`" ; \
	 if test "$$ROMIO_TEMP" != ""; then \
		 ROMIO_DEBUG="-debug" ; \
	 fi ; \
	 export LAMHCC LAMF77 LAMHOME ; \
	 TROLLIUSHOME=bogus ; \
	 unset TROLLIUSHOME ; \
	 rm -f config.cache ; \
	 ./configure \
		--prefix=$(LAMHOME) \
		-mpi=lam \
		-cc="$(OBDIR)/hcc" \
		-fc="$(OBDIR)/hf77" \
		$$ROMIO_DEBUG \
		-cflags="$(CFLAGS)" \
		-fflags="$(FFLAGS) @ROMIO_FLAGS@" \
		@ROMIO_NOF77@ \
		-mpilib=$(OLDIR)/libmpi.a \
	 ; \
	 make ; \
	 make install PREFIX=$(LAMHOME); \
	 umask=`umask` ; \
	 mask=`expr 777 - $$umask` ; \
	 if test "$mask" = "777" ; then \
		mask="755"; \
	 fi ; \
	 find $(LAMHOME)/include -type d -exec chmod $$mask {} \; ; \
	)
	@ ( ROMARCH=`romio/util/tarch`; \
	 mv $(OLDIR)/$$ROMARCH/libmpio.a $(OLDIR) ; \
	 $(RM) -r $(OLDIR)/$$ROMARCH ; \
	)

romio-clean:
	@ ( cd romio; echo "romio:" ; if test -f Makefile ; then make cleanall; fi )

romio-examples: @ROMIO_FAKE_F77@
	@ ( cd romio/test; make )

# There is a bug in ROMIO's configure/Makefile such that even if you
# configure ROMIO with -nof77, it will still try to compile the
# Fortran examples if you invoke "make" in the romio/test directory.
# Hence, this workaround: create "executables" so that "make" will
# think that they are done, and skip the fortran examples.  The ROMIO
# authors have been notified of this bug.  13 Jun 1999/JMS.
romio-fake-f77:
	touch romio/test/fperf.o romio/test/fcoll_test.o romio/test/fmisc.o
	echo ":" > romio/test/fperf 
	echo 'echo "Sorry, LAM was not built with Fortran support."' >> romio/test/fperf
	echo 'echo "Therefore, this ROMIO example could not be built."' >> romio/test/fperf
	echo 'exit 1' >> romio/test/fperf
	cp romio/test/fperf romio/test/fcoll_test
	cp romio/test/fperf romio/test/fmisc
	chmod +x romio/test/fperf romio/test/fcoll_test romio/test/fmisc

# Be sure to set LAMHOME properly so that hcc/hcp/hf77 use the right
# libraries/include files (to avoid conflicts if the user may already
# have a LAM installed, and already have LAMHOME set somewhere else).
mpi2c++-install:
	@ echo
	@ echo "Compiling MPI 2 C++ bindings support"
	@ echo
	@ (cd mpi2c++ ; \
	 LAMHCP="$(CXX) -DLAM_BUILDING=1" ; \
	 LAMHOME="$(LAMHOME)" ; \
	 export LAMHCP LAMHOME ; \
	 TROLLIUSHOME=bogus ; \
	 unset TROLLIUSHOME; \
	 rm -f config.cache src/libmpi++.a; \
	 ./configure \
		--prefix=$(LAMHOME) \
		--with-lam=$(LAMHOME) \
		--with-libopt="$(CXXFLAGS)" \
		--with-examopt="$(CXXFLAGS)" \
		--with-testopt="$(CXXFLAGS)" \
	 ; \
	 make lib ; \
	 make install; \
	)

mpi2c++-clean:
	@ ( cd mpi2c++; echo "mpi2c++:" ; if test -f Makefile ; then make distclean; fi )

mpi2c++-examples:
	@ ( cd mpi2c++; make examples )


profile: dirs
	cd lib/otb-$(OARCH)/pmpi; $(MAKE) install

dirs:	$(LAMHOME) otb-$(OARCH)

$(LAMHOME):
	mkdir -p $(LAMHOME)

otb-$(OARCH):
	sh config/buildtree $(OARCH)
	cd share/h; $(MAKE) depend

depend: dirs .depend

.depend:
	@for i in $(SUBDIR); do \
		(cd $$i; echo $$i: ; $(MAKE) depend) || exit 1; \
	done
	@echo > .depend

tags:
	etags --typedefs --defines \
	`find $(TAGDIRS) \( -name CVS -prune \) -o \( -name \*.c \) -print` \
	`find $(TAGDIRS) \( -name CVS -prune \) -o \( -name \*.cc \) -print` \
	`find $(TAGDIRS) \( -name CVS -prune \) -o \( -name \*.h \) -print` \
	`find . -name Makefile -type f -print`

cscope:
	@find $(TAGDIRS) \( -name CVS -prune \) -o \( -name \*.c \) -print \
		> cscope.files
	@find $(TAGDIRS) \( -name CVS -prune \) -o \( -name \*.h \) -print \
		>> cscope.files
	cscope -b

dist:
	csh -f ./config/distscript.csh

dist64:
	csh -f ./config/distscript.csh 64

rpm:
	sh ./config/buildrpm.sh

rpm64:
	sh ./config/buildrpm.sh 64

rpmsign:
	sh ./config/signrpm.sh