File: Makefile.in

package info (click to toggle)
lam 6.5.6-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 15,464 kB
  • ctags: 11,670
  • sloc: ansic: 101,210; cpp: 12,146; sh: 10,821; makefile: 4,050; fortran: 218
file content (955 lines) | stat: -rw-r--r-- 30,935 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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
# Makefile.in generated automatically by automake 1.4 from Makefile.am

# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

# -*- makefile -*-
#
# $Id: Makefile.am,v 6.39.2.6 2001/10/11 00:31:35 jsquyres Exp $
#
# This file is part of the LAM/MPI software package from the
# University of Notre Dame.
#
# See the LICENSE file in the top-level directory for Copyright notices.
#


# -*- makefile -*-
#
# Contains the "depend" target so that we can generate dependencies
# correctly.  Subdirectory-spanning part stolen from an
# automake-generated Makefile.
#
# This beast just got too complicated for a Makefile stub, so I turned
# it into a standalone script.  MUCH easier that way, so that we don't
# have to fight Makefile quoting rules, at least.
#
# We must explicitly add -I$(top_builddir)/share/include, because
# that's where <lam_config.h> will be.
#


SHELL = @SHELL@

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@

bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include

DESTDIR =

pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@

top_builddir = .

ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@

NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AS = @AS@
CC = @CC@
CFLAGS = @CFLAGS@
CLEANFILES = @CLEANFILES@
CP = @CP@
CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
DLLTOOL = @DLLTOOL@
EXTRA_MPICC_FLAGS = @EXTRA_MPICC_FLAGS@
EXTRA_MPICPP_FLAGS = @EXTRA_MPICPP_FLAGS@
EXTRA_MPIF77_FLAGS = @EXTRA_MPIF77_FLAGS@
F77 = @F77@
F77_BUILD_DIR = @F77_BUILD_DIR@
F77_LTPLIB = @F77_LTPLIB@
FFLAGS = @FFLAGS@
FPI_EXAMPLE = @FPI_EXAMPLE@
GM_API_VERSION = @GM_API_VERSION@
IMPID_DIR = @IMPID_DIR@
IMPI_DIR = @IMPI_DIR@
IMPI_LIB = @IMPI_LIB@
IMPI_OBJS = @IMPI_OBJS@
IMPI_SERVER = @IMPI_SERVER@
INSTALL_HOME = @INSTALL_HOME@
LAM_ALPHA_VERSION = @LAM_ALPHA_VERSION@
LAM_BETA_VERSION = @LAM_BETA_VERSION@
LAM_CXX_TEMPLATE_REPOSITORY = @LAM_CXX_TEMPLATE_REPOSITORY@
LAM_DEPDIRS = @LAM_DEPDIRS@
LAM_MAJOR_VERSION = @LAM_MAJOR_VERSION@
LAM_MINOR_VERSION = @LAM_MINOR_VERSION@
LAM_RELEASE_VERSION = @LAM_RELEASE_VERSION@
LAM_RPI_REAL_CFLAGS = @LAM_RPI_REAL_CFLAGS@
LAM_RPI_REAL_LDFLAGS = @LAM_RPI_REAL_LDFLAGS@
LAM_VERSION = @LAM_VERSION@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAKEDEPEND = @MAKEDEPEND@
MAKEINFO = @MAKEINFO@
MPI2CPP_BUILD_TARGET = @MPI2CPP_BUILD_TARGET@
MPI2CPP_CONFIGURE_EXFLAGS = @MPI2CPP_CONFIGURE_EXFLAGS@
MPI2CPP_EXAMPLES = @MPI2CPP_EXAMPLES@
MPI2CPP_INSTALL_TARGET = @MPI2CPP_INSTALL_TARGET@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
RM = @RM@
ROMIO_BUILD_TARGET = @ROMIO_BUILD_TARGET@
ROMIO_EXAMPLES = @ROMIO_EXAMPLES@
ROMIO_FLAGS = @ROMIO_FLAGS@
ROMIO_INSTALL_TARGET = @ROMIO_INSTALL_TARGET@
ROMIO_NOF77 = @ROMIO_NOF77@
ROMIO_USER_FLAGS = @ROMIO_USER_FLAGS@
RPIFLAGS = @RPIFLAGS@
RPILIB = @RPILIB@
RPILIBMASK = @RPILIBMASK@
RPISYSLIBS = @RPISYSLIBS@
RPI_LIBS = @RPI_LIBS@
RPI_SUBDIRS = @RPI_SUBDIRS@
RSH0 = @RSH0@
SED = @SED@
SHELL_CMD = @SHELL_CMD@
SYSLIBS = @SYSLIBS@
THREADCFLAGS = @THREADCFLAGS@
THREADCXXFLAGS = @THREADCXXFLAGS@
THREADCXXLDFLAGS = @THREADCXXLDFLAGS@
THREADLDFLAGS = @THREADLDFLAGS@
TRIVIALF_EXAMPLE = @TRIVIALF_EXAMPLE@
USER_CXXLDFLAGS = @USER_CXXLDFLAGS@
USER_LDFLAGS = @USER_LDFLAGS@
VERSION = @VERSION@
VIA_DEVICE = @VIA_DEVICE@
WAVE1D_EXAMPLE = @WAVE1D_EXAMPLE@
rpi = @rpi@

AUTOMAKE_OPTIONS = foreign dist-tarZ no-dependencies

SUBDIRS = share otb tools etc man
DIST_SUBDIRS = $(SUBDIRS) examples config

EXTRA_DIST = HISTORY INSTALL 			  LICENSE README RELEASE_NOTES 			  VERSION Makefile.depend


# 'cause this is just so annoying!!!  This may not work anywhere
# outside nd.edu.  :-)

TAR = gtar

# This file is only here so that the "tags" target will work properly.
# Without *something* in either SOURCES or HEADERS, the tags target
# won't work nicely.  Ugh.  Hopefully this will be fixed in automake
# 1.5!

noinst_HEADERS = acconfig.h
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/./config/mkinstalldirs
CONFIG_HEADER = ./share/include/lam_config.h
CONFIG_CLEAN_FILES = 
HEADERS =  $(noinst_HEADERS)

DIST_COMMON =  README INSTALL Makefile.am Makefile.in acconfig.h \
acinclude.m4 aclocal.m4 configure configure.in \
share/include/lam_config.h.in share/include/stamp-h.in


DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)

GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/Makefile.depend
	cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile

Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
	cd $(top_builddir) \
	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

$(ACLOCAL_M4):  configure.in  acinclude.m4
	cd $(srcdir) && $(ACLOCAL)

config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
	cd $(srcdir) && $(AUTOCONF)

share/include/lam_config.h: share/include/stamp-h
	@if test ! -f $@; then \
		rm -f share/include/stamp-h; \
		$(MAKE) share/include/stamp-h; \
	else :; fi
share/include/stamp-h: $(srcdir)/share/include/lam_config.h.in $(top_builddir)/config.status
	cd $(top_builddir) \
	  && CONFIG_FILES= CONFIG_HEADERS=share/include/lam_config.h \
	     $(SHELL) ./config.status
	@echo timestamp > share/include/stamp-h 2> /dev/null
$(srcdir)/share/include/lam_config.h.in: $(srcdir)/share/include/stamp-h.in
	@if test ! -f $@; then \
		rm -f $(srcdir)/share/include/stamp-h.in; \
		$(MAKE) $(srcdir)/share/include/stamp-h.in; \
	else :; fi
$(srcdir)/share/include/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
	cd $(top_srcdir) && $(AUTOHEADER)
	@echo timestamp > $(srcdir)/share/include/stamp-h.in 2> /dev/null

mostlyclean-hdr:

clean-hdr:

distclean-hdr:
	-rm -f share/include/lam_config.h

maintainer-clean-hdr:

# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
#     (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.

@SET_MAKE@

all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive  \
check-recursive installcheck-recursive info-recursive dvi-recursive:
	@set fnord $(MAKEFLAGS); amf=$$2; \
	dot_seen=no; \
	target=`echo $@ | sed s/-recursive//`; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  echo "Making $$target in $$subdir"; \
	  if test "$$subdir" = "."; then \
	    dot_seen=yes; \
	    local_target="$$target-am"; \
	  else \
	    local_target="$$target"; \
	  fi; \
	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
	done; \
	if test "$$dot_seen" = "no"; then \
	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
	fi; test -z "$$fail"

mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
	@set fnord $(MAKEFLAGS); amf=$$2; \
	dot_seen=no; \
	rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
	  rev="$$subdir $$rev"; \
	  test "$$subdir" = "." && dot_seen=yes; \
	done; \
	test "$$dot_seen" = "no" && rev=". $$rev"; \
	target=`echo $@ | sed s/-recursive//`; \
	for subdir in $$rev; do \
	  echo "Making $$target in $$subdir"; \
	  if test "$$subdir" = "."; then \
	    local_target="$$target-am"; \
	  else \
	    local_target="$$target"; \
	  fi; \
	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
	done && test -z "$$fail"
tags-recursive:
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
	done

tags: TAGS

ID: $(HEADERS) $(SOURCES) $(LISP)
	list='$(SOURCES) $(HEADERS)'; \
	unique=`for i in $$list; do echo $$i; done | \
	  awk '    { files[$$0] = 1; } \
	       END { for (i in files) print i; }'`; \
	here=`pwd` && cd $(srcdir) \
	  && mkid -f$$here/ID $$unique $(LISP)

TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
	tags=; \
	here=`pwd`; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
   if test "$$subdir" = .; then :; else \
	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
   fi; \
	done; \
	list='$(SOURCES) $(HEADERS)'; \
	unique=`for i in $$list; do echo $$i; done | \
	  awk '    { files[$$0] = 1; } \
	       END { for (i in files) print i; }'`; \
	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)

mostlyclean-tags:

clean-tags:

distclean-tags:
	-rm -f TAGS ID

maintainer-clean-tags:

distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)

# This target untars the dist file and tries a VPATH configuration.  Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
	-rm -rf $(distdir)
	GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
	mkdir $(distdir)/=build
	mkdir $(distdir)/=inst
	dc_install_base=`cd $(distdir)/=inst && pwd`; \
	cd $(distdir)/=build \
	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
	  && $(MAKE) $(AM_MAKEFLAGS) \
	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
	  && $(MAKE) $(AM_MAKEFLAGS) check \
	  && $(MAKE) $(AM_MAKEFLAGS) install \
	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
	  && $(MAKE) $(AM_MAKEFLAGS) dist
	-rm -rf $(distdir)
	@banner="$(distdir).tar.gz is ready for distribution"; \
	dashes=`echo "$$banner" | sed s/./=/g`; \
	echo "$$dashes"; \
	echo "$$banner"; \
	echo "$$dashes"
dist: distdir
	-chmod -R a+r $(distdir)
	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
	-rm -rf $(distdir)
dist-tarZ: distdir
	-chmod -R a+r $(distdir)
	$(TAR) chf - $(distdir) | compress -c > $(distdir).tar.Z
	-rm -rf $(distdir)
dist-all: distdir
	-chmod -R a+r $(distdir)
	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
	$(TAR) chf - $(distdir) | compress -c > $(distdir).tar.Z
	-rm -rf $(distdir)
distdir: $(DISTFILES)
	-rm -rf $(distdir)
	mkdir $(distdir)
	-chmod 777 $(distdir)
	@for file in $(DISTFILES); do \
	  d=$(srcdir); \
	  if test -d $$d/$$file; then \
	    cp -pr $$/$$file $(distdir)/$$file; \
	  else \
	    test -f $(distdir)/$$file \
	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
	    || cp -p $$d/$$file $(distdir)/$$file || :; \
	  fi; \
	done
	for subdir in $(DIST_SUBDIRS); do \
	  if test "$$subdir" = .; then :; else \
	    test -d $(distdir)/$$subdir \
	    || mkdir $(distdir)/$$subdir \
	    || exit 1; \
	    chmod 777 $(distdir)/$$subdir; \
	    (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
	      || exit 1; \
	  fi; \
	done
	$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
info-am:
info: info-recursive
dvi-am:
dvi: dvi-recursive
check-am: all-am
check: check-recursive
installcheck-am:
installcheck: installcheck-recursive
install-exec-am: install-exec-local
	@$(NORMAL_INSTALL)
	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-exec: install-exec-recursive

install-data-am:
install-data: install-data-recursive

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-recursive
uninstall-am: uninstall-local
uninstall: uninstall-recursive
all-am: Makefile $(HEADERS) all-local
all-redirect: all-recursive
install-strip:
	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
installdirs-am:


mostlyclean-generic:

clean-generic:
	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)

distclean-generic:
	-rm -f Makefile $(CONFIG_CLEAN_FILES)
	-rm -f config.cache config.log stamp-h stamp-h[0-9]*

maintainer-clean-generic:
mostlyclean-am:  mostlyclean-hdr mostlyclean-tags mostlyclean-generic

mostlyclean: mostlyclean-recursive

clean-am:  clean-hdr clean-tags clean-generic mostlyclean-am clean-local

clean: clean-recursive

distclean-am:  distclean-hdr distclean-tags distclean-generic clean-am \
		distclean-local
	-rm -f libtool

distclean: distclean-recursive
	-rm -f config.status

maintainer-clean-am:  maintainer-clean-hdr maintainer-clean-tags \
		maintainer-clean-generic distclean-am
	@echo "This command is intended for maintainers to use;"
	@echo "it deletes files that may require special tools to rebuild."

maintainer-clean: maintainer-clean-recursive
	-rm -f config.status

.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
install-data-recursive uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
dvi-am dvi check check-am installcheck-am installcheck \
install-exec-local install-exec-am install-exec install-data-am \
install-data install-am install uninstall-local uninstall-am uninstall \
all-local all-redirect all-am all installdirs-am installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean


# For building all the examples

examples: lam-examples mpi2c++-examples romio-examples 
	@ $(MAKE) examples-done

examples-clean:
	@ echo "Making clean in examples"
	@ (cd examples; $(MAKE) clean)

examples-distclean:
	@ echo "Making distclean in examples"
	@ (cd examples; $(MAKE) distclean)

lam-examples:
	@ (cd examples; $(MAKE) all)

# Supplement various targets so that we can build ROMIO, MPI 2 C++
# bindings, and examples as well

all-local: $(MPI2CPP_BUILD_TARGET) $(ROMIO_BUILD_TARGET) 
	@ $(MAKE) all-done

install-exec-local: $(MPI2CPP_INSTALL_TARGET) $(ROMIO_INSTALL_TARGET)

clean-local: mpi2c++-clean romio-clean examples-clean
	@ rm -f .lam_built

distclean-local: mpi2c++-distclean romio-distclean examples-distclean

uninstall-local: mpi2c++-uninstall romio-uninstall

# 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 ROMIO authors have been
# notified of this.  13 June 1999/JMS.

# Automakeizm -- check to see if we already built ROMIO.  "make
# install" implicitly invokes "make all" first (in a roundabout way).

# VPATHizms -- check to see if the "romio" dir exists.  If it doesn't,
# make it.  Then we have to go find the configure file.  If it's not
# in the romio dir, check ../$(top_srcdir)/romio.  If it's not there,
# barf.  Set LAM_TOP_BUILDDIR and LAM_TOP_SRCDIR as appropriate (hcc
# uses these variables to reset -I and -L paths).  Also, ROMIO doesn't
# seem to be able to create its "test" directory properly (if it
# doesn't exist), so we have to make it.

# libtoolizms -- set the underlying LAMHCC and LAMHF77 to have libtool
# in them.  Even though ROMIO will not create any executables, and
# therefore strictly won't need libtool, during ROMIO's configure, it
# checks for libmpi, etc., and makes some dummy executables, and
# therefore does need libtool.  Ugh!!

# Arrgh -- we have to forcibly remove -I$(top_srcdir)/share/include
# form $(CFLAGS) because relative to romio/, that directory doesn't
# exist, because $(top_srcdir) is replaced *here* -- not in romio/.
# Hence $(top_srcdir) is replaced with ., and ./share/include doesn't
# exist relative to romio.  $#%@#%@#%#$!!!  So we have to sed it out
# of $(CFLAGS) and put it in a temporary environment variable and use
# that instead.

romio-all:
	@ echo "Making all in romio"
	@ (if test ! -f romio/.lam_built; then $(MAKE) romio-all-redirect; fi)

romio-all-redirect:
	@ echo
	@ echo "Compiling ROMIO support"
	@ echo
	@ (LAM_TOP_BUILDDIR="`pwd`"; \
	 LAM_TOP_SRCDIR="$$LAM_TOP_BUILDDIR"; \
	 if test ! -d romio; then \
	   mkdir -p romio/test; \
	 fi ; \
	 cd romio ; \
	 LAMHCC="$$LAM_TOP_BUILDDIR/libtool --quiet $(CC)" ; \
	 LAMF77="$$LAM_TOP_BUILDDIR/libtool --quiet $(FC)" ; \
	 LAMHOME="$(DESTDIR)$(prefix)" ; \
	 ROMIO_DEBUG="" ; \
	 ROMIO_TEMP="`echo '$(CFLAGS)' | grep '\-g' | cat`" ; \
	 if test "$$ROMIO_TEMP" != ""; then \
		 ROMIO_DEBUG="-debug" ; \
	 fi ; \
	 TOP_SRCDIR_ESC="`echo '$(top_srcdir)' | sed -e 's/\//\\\\\//g'`"; \
	 CFLAGS_ENV="`echo '$(CFLAGS)' | sed -e s/-I$$TOP_SRCDIR_ESC\\\/share\\\/include// | cat`" ; \
	 TROLLIUSHOME=bogus ; \
	 unset TROLLIUSHOME ; \
	 rm -f config.cache ; \
	 if test -x configure; then \
	   cdir="." ; \
	   cd ..; \
	   LAM_TOP_SRCDIR="`pwd`"; \
	   cd romio; \
	 elif test -x ../$(top_srcdir)/romio/configure; then \
	   cdir="../$(top_srcdir)/romio"; \
	   tmp="`pwd`"; \
	   cd ../$(top_srcdir); \
	   LAM_TOP_SRCDIR="`pwd`"; \
	   cd $$tmp; \
	 elif test -x $(top_srcdir)/romio/configure; then \
	   cdir="$(top_srcdir)/romio"; \
	   tmp="`pwd`"; \
	   cd $(top_srcdir); \
	   LAM_TOP_SRCDIR="`pwd`"; \
	   cd $$tmp; \
	 else \
	   echo "Error!  I can't find the configure for the ROMIO package.  :-(" ; \
	   exit 1; \
	 fi; \
	 export LAMHCC LAMF77 LAMHOME CFLAGS_ENV LAM_TOP_BUILDDIR LAM_TOP_SRCDIR; \
	 $$cdir/configure \
		--prefix=$(DESTDIR)$(prefix) \
		-mpi=lam \
		-mpiincdir="$$LAM_TOP_SRCDIR/share/include" \
		-cc="$$LAM_TOP_BUILDDIR/tools/hcc/hcc" \
		-fc="$$LAM_TOP_BUILDDIR/tools/hf77/hf77" \
		-mpiolib="$$LAM_TOP_BUILDDIR/romio/lib/liblammpio.a" \
		$$ROMIO_DEBUG \
		-cflags="-lam-building $$CFLAGS_ENV" \
		-fflags="-lam-building $(FFLAGS) @ROMIO_FLAGS@" \
		@ROMIO_NOF77@ \
		-make=$(MAKE) \
		-mpilib="$$LAM_TOP_BUILDDIR/share/libmpi.la" \
		@ROMIO_USER_FLAGS@ && \
	 $(MAKE) && touch .lam_built; \
	)

romio-install:
	@ echo "Making install in romio"
	@ if test ! -f romio/.lam_built ; then \
	    $(MAKE) romio-all && $(MAKE) romio-install-redirect ; \
	  else \
	    $(MAKE) romio-install-redirect; \
	  fi

romio-install-redirect:
	@ (if test -d romio; then \
	     cd romio ; \
	     if test -f Makefile; then \
	       ( $(MAKE) install PREFIX=$(DESTDIR)$(prefix) \
			DATADIR=$(DESTDIR)$(datadir) \
			LIBDIR=$(DESTDIR)$(libdir) \
			INCLUDEDIR=$(DESTDIR)$(includedir) \
			MANDIR=$(DESTDIR)$(mandir); ) \
	     fi ; \
	   fi)

romio-examples:
	@ echo "Making examples in romio"
	@ (if test -d romio; then \
	     cd romio; \
	     if test "`echo $(ROMIO_EXAMPLES)`" != "" -a -f Makefile; then \
		if test -f .lam_built ; then \
		    ( cd test; \
		      unset TROLLIUSHOME LAMHOME LAMHCP LAMHCC; \
		      $(MAKE) CC=mpicc F77=mpif77 LIBS= USER_CFLAGS="$(CFLAGS)" USER_FFLAGS="$(FFLAGS) $(ROMIO_FLAGS)" ) ; \
		else \
		    echo "*** Error: it does not appear that ROMIO was built yet." ; \
		    echo "*** I cannot tell if LAM was built yet or not, so I will abort." ; \
		    echo "*** Please build ROMIO the normal LAM build interface" ; \
		    echo "*** and then attempt to build the ROMIO again." ; \
		fi; \
	     fi; \
	   fi )

romio-clean:
	@ echo "Making clean in romio"
	@ (if test -d romio; then \
	     cd romio; \
	     rm -f .lam_built; \
	     if test -f Makefile ; then \
		$(MAKE) clean; \
	     fi; \
	   fi )

romio-distclean:
	@ echo "Making distclean in romio"
	@ (if test -d romio; then \
	     cd romio; \
	     rm -f .lam_built; \
	     if test -f Makefile ; \
		then $(MAKE) cleanall; \
	     fi ; \
	   fi)

romio-uninstall:
	@ echo "Making uninstall in romio"
	@ if test -f romio/.lam_built ; then \
	    $(MAKE) romio-uninstall-redirect; \
	  fi

# This is just so ugly; it's painful.

romio-uninstall-redirect:
	@ ( cd romio; $(MAKE) uninstall PREFIX=$(DESTDIR)$(prefix) \
			DATADIR=$(DESTDIR)$(datadir) \
			LIBDIR=$(DESTDIR)$(libdir) \
			INCLUDEDIR=$(DESTDIR)$(includedir) \
			MANDIR=$(DESTDIR)$(mandir); )
	   if test -f $(DESTDIR)$(libdir)/liblammpio.a; then \
	     rm -f $(DESTDIR)$(libdir)/liblammpio.a; \
	   fi

# 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).

# Automakeizm -- check to see if we already built the bindings.  "make
# install" implicitly invokes "make all" first (in a roundabout way).

mpi2c++-all:
	@ echo "Making all in mpi2c++"
	@ rm -f tools/hcc/lamboot
	@ (if test ! -f mpi2c++/.lam_built; then \
		$(MAKE) mpi2c++-all-redirect; \
	   fi)

# Ick.  Because of the way MPI 2 C++'s configure.in works, it expects
# to find an installed LAM/MPI.  So it expects to find hcp/lamboot in
# the same directory (under the assumption that it's $prefix/bin).  So
# we have to sym link lamboot into tools/hcc during the build.  Ugh!
# We really should put a hook in MPI 2 C++ to make this better (a la
# ROMIO's hook for MPICH), but not right now...

# VPATHizms -- check to see if the "romio" dir exists.  If it doesn't,
# make it.  Then we have to go find the configure file.  If it's not
# in the romio dir, check ../$(top_srcdir)/romio.  If it's not there,
# barf.  Set LAM_TOP_BUILDDIR and LAM_TOP_SRCDIR as appropriate (hcc
# uses these variables to reset -I and -L paths).  

# libtoolizm -- very, very painful.  We must set libtool as the
# underlying LAMHCP because mpi2c++'s configure checks for the
# presence of libmpi, etc.  libtool does not understand C++ compilers
# or options, so an additional --mode switch must be insertted.  hcc
# had to be modified to look for libtool as the first arg in
# conjunction with building LAM and compiling C++ programs.  It will
# insert the right --mode switch, as appropriate.  It will also ditch
# the libtool arguments if it finds a -E, so that the *real*
# underlying compiler can act as a preprocessor.  Woof -- what a day.

# What sucks even worse is that CVS and the distscript.csh don't
# preserve timestamps properly, hence the automake-ized mpi2c++
# project tries to re-run aclocal and friends.  This is disasterous,
# because we don't have the maintainer tree here -- just the
# distribution tarball (e.g., acconfig.h is not shipped, so autoheader
# barfs).  So we have to do a really gross touch to get all the
# timestamps equal.  Don't laugh; it's the only thing that I can think
# to do.  :-(

mpi2c++-all-redirect: 
	@ echo
	@ echo "Compiling MPI 2 C++ bindings support"
	@ echo
	@ (LAM_TOP_BUILDDIR="`pwd`"; \
	 LAM_TOP_SRCDIR=$$LAM_TOP_BUILDDIR; \
	 if test ! -d mpi2c++; then mkdir mpi2c++; fi ; \
	 cd mpi2c++ ; \
	 LAMHCP="$$LAM_TOP_BUILDDIR/libtool --quiet $(CXX)" ; \
	 PATH="$$LAM_TOP_BUILDDIR/tools/hcc:$$PATH" ; \
	 CXXFLAGS="$(CXXFLAGS) $(USER_CXXFLAGS)"; \
	 LDFLAGS="$(LDFLAGS) $(USER_CXXLDFLAGS)"; \
	 LAMHOME=bogus ; \
	 TROLLIUSHOME=bogus ; \
	 unset LAMHOME TROLLIUSHOME; \
	 rm -f src/libmpi++.a; \
	 rm -f $$LAM_TOP_BUILDDIR/tools/hcc/lamboot ; \
	 $(LN_S) $$LAM_TOP_BUILDDIR/tools/lamboot/lamboot $$LAM_TOP_BUILDDIR/tools/hcc/lamboot; \
	 if test -x configure; then \
	   cdir="." ; \
	   cd ..; \
	   LAM_TOP_SRCDIR="`pwd`"; \
	   cd mpi2c++; \
	 elif test -x ../$(top_srcdir)/mpi2c++/configure; then \
	   cdir="../$(top_srcdir)/mpi2c++"; \
	   tmp="`pwd`"; \
	   cd ../$(top_srcdir); \
	   LAM_TOP_SRCDIR="`pwd`"; \
	   cd $$tmp; \
	 elif test -x $(top_srcdir)/mpi2c++/configure; then \
	   cdir="$(top_srcdir)/mpi2c++"; \
	   tmp="`pwd`"; \
	   cd $(top_srcdir); \
	   LAM_TOP_SRCDIR="`pwd`"; \
	   cd $$tmp; \
	 else \
	   echo "Error!  I can't find the configure for the MPI 2 C++ package.  :-(" ; \
	   exit 1; \
	 fi; \
	 MAKE="$(MAKE)"; \
	 export LAMHCP LAMHOME TROLLIUSHOME CXXFLAGS LDFLAGS LAM_TOP_BUILDDIR \
	    LAM_TOP_SRCDIR PATH MAKE ; \
	 $$cdir/configure \
		--prefix=$(DESTDIR)$(prefix) \
		--with-lam=$$LAM_TOP_BUILDDIR/tools/hcc \
		$(MPI2CPP_CONFIGURE_EXFLAGS) \
		--with-libopt= --with-examopt= \
		--with-lam-building && \
	 $(MAKE) all && touch .lam_built || rm -f $$LAM_TOP_BUILDDIR/tools/hcc/lamboot; \
	 rm -f $$LAM_TOP_BUILDDIR/tools/hcc/lamboot \
	)

mpi2c++-install:
	@ echo "Making install in mpi2c++"
	@ if test ! -f mpi2c++/.lam_built ; then \
	    $(MAKE) mpi2c++-all && $(MAKE) mpi2c++-install-redirect ; \
	  else \
	    $(MAKE) mpi2c++-install-redirect; \
	  fi

mpi2c++-install-redirect:
	@ (if test -d mpi2c++; then \
	     cd mpi2c++; \
	     if test -f Makefile ; then \
	       $(MAKE) install; \
	       mv $(DESTDIR)$(libdir)/libmpi++.a $(DESTDIR)$(libdir)/liblammpi++.a; \
	     fi; \
	   fi)

mpi2c++-examples:
	@ echo "Making examples in mpi2c++"
	@ (if test -d mpi2c++; then \
	     cd mpi2c++; \
	     if test "`echo $(MPI2CPP_EXAMPLES)`" != "" -a -f Makefile; then \
	       if test -f .lam_built ; then \
		    unset TROLLIUSHOME LAMHOME LAMHCC LAMHCP; \
		    $(MAKE) examples; \
	       else \
		    echo "*** Error: it does not appear that the MPI 2 C++ bindings were built yet." ; \
		    echo "*** I cannot tell if LAM was built yet or not, so I will abort." ; \
		    echo "*** Please build the MPI 2 C++ bindings through the normal LAM build interface" ; \
		    echo "*** and then attempt to build the MPI 2 C++ examples again." ; \
		    exit 1 ; \
	       fi; \
	    fi; \
	  fi)

mpi2c++-clean:
	@ echo "Making clean in mpi2c++"
	@ (if test -d mpi2c++; then \
	     cd mpi2c++; \
	     rm -f .lam_built; \
	     if test -f Makefile ; then \
	       $(MAKE) clean; \
	     fi; \
	   fi)

mpi2c++-distclean:
	@ echo "Making distclean in mpi2c++"
	@ (if test -d mpi2c++; then \
	     cd mpi2c++; \
	     rm -f .lam_built; \
	     if test -f Makefile ; then \
	       $(MAKE) distclean; \
	     fi; \
	  fi)

mpi2c++-uninstall:
	@ echo "Making uninstall in mpi2c++"
	@ if test -f mpi2c++/.lam_built ; then \
	    $(MAKE) mpi2c++-uninstall-redirect; \
	  fi

mpi2c++-uninstall-redirect:
	@ (if test -d mpi2c++; then \
	     cd mpi2c++; $(MAKE) uninstall; \
	     if test -f $(DESTDIR)$(libdir)/liblammpi++.a; then \
	       rm -f $(DESTDIR)$(libdir)/liblammpi++.a; \
	     fi; \
	   fi)

#
# For printing friendly messages at the end :-)
#

examples-done:
	@echo
	@echo "==========================================================================="
	@echo
	@echo "The examples for LAM/MPI $(LAM_VERSION) have been built."
	@echo
	@echo "Look in the subdirectories of examples/ for each of"
	@echo "the example programs.  Each subdirectory has a README file"
	@echo "that explains how to run it, etc."
	@echo
	@echo "==========================================================================="

all-done: .lam_built
.lam_built:
	@ echo
	@ echo "==========================================================================="
	@ echo
	@ echo "LAM/MPI $(LAM_VERSION) has been built."
	@ echo
	@ echo "You now need to install it with \"make install\""
	@ echo
	@ echo "==========================================================================="
	@ touch .lam_built

install-exec-hook:
	@echo
	@echo "==========================================================================="
	@echo
	@echo "Installation of LAM/MPI $(LAM_VERSION) is complete."
	@echo
	@echo "Be sure to visit the LAM/MPI web page: http://www.lam-mpi.org/"
	@echo
	@echo "The FAQ and LAM mailing list archives (both accessable from the web page)"
	@echo "contain much information about getting started with LAM/MPI, as well as"
	@echo "solutions to common problems."
	@echo
	@echo "==========================================================================="
	@echo

#
# For making the distribution.  LAM maintainers only.  It won't work
# for you.  :-)
#
# Requires the "sowing" package from ftp://ftp.mcs.anl.gov/ to make
# the man pages.
#

dist-hook:
	csh -f config/distscript.csh $(DESTDIR)$(distdir)

#
# This is fairly fragile; don't interrupt it!
#

lamdist64:
	mv VERSION VERSION.save
	cp VERSION-6.4 VERSION
	p="`pwd`"; \
	lv="`sh config/get_lam_version $$p --full`"; \
	$(MAKE) VERSION="$$lv" dist
	rm -f VERSION
	mv VERSION.save VERSION

lamdist: dist
	@(mkdir /tmp/lam-dist.$$; \
	  chmod 700 /tmp/lam-dist.$$; \
	  p="`pwd`"; \
	  cd /tmp/lam-dist.$$; \
	  echo "*** Making lam-$(LAM_VERSION).tar.Z..."; \
	  cp $$p/lam-$(LAM_VERSION).tar.gz .; \
	  gunzip lam-$(LAM_VERSION).tar.gz; \
	  compress lam-$(LAM_VERSION).tar; \
	  mv lam-$(LAM_VERSION).tar.Z $$p; \
	  echo "*** Making lam-$(LAM_VERSION).tar.bz2..."; \
	  cp $$p/lam-$(LAM_VERSION).tar.gz .; \
	  gunzip lam-$(LAM_VERSION).tar.gz; \
	  bzip2 lam-$(LAM_VERSION).tar; \
	  mv lam-$(LAM_VERSION).tar.bz2 $$p; \
	  cd $p;\
	  rm -rf /tmp/lam-dist.$$; )

depend: $(SOURCEFILES)
	@ $(SH) $(top_srcdir)/config/run_makedepend "$(srcdir)" \
	  "$(MAKEDEPEND)" "$(DEPEND_SUFFIX)" \
	  "$(CFLAGS) $(INCLUDES) $(LAM_DEPDIRS) $(EXTRA_DEPFLAGS) -I$(top_builddir)/share/include" \
	  $(SOURCEFILES)
	@set fnord $(MAKEFLAGS); amf=$$2; \
	target=`echo $@ | sed s/-recursive//`; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  echo "Making $$target in $$subdir"; \
	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \
	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
	done; 

#
# No SOURCEFILES, but we do need the rule
#

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: