File: Makefile.am

package info (click to toggle)
lam 7.1.4-8
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 56,404 kB
  • sloc: ansic: 156,541; sh: 9,991; cpp: 7,699; makefile: 5,621; perl: 488; fortran: 260; asm: 83
file content (131 lines) | stat: -rw-r--r-- 4,795 bytes parent folder | download | duplicates (7)
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
# -*- makefile -*-
#
# Copyright (c) 2001-2004 The Trustees of Indiana University.  
#                         All rights reserved.
# Copyright (c) 1998-2001 University of Notre Dame. 
#                         All rights reserved.
# Copyright (c) 1994-1998 The Ohio State University.  
#                         All rights reserved.
# 
# This file is part of the LAM/MPI software package.  For license
# information, see the LICENSE file in the top level directory of the
# LAM/MPI source distribution.
#
# $Id: Makefile.am,v 1.24 2004/01/12 22:26:25 pkambadu Exp $
#

include $(top_srcdir)/config/Makefile.options

base			= $(top_builddir)/share
liblam			= $(base)/liblam/liblam.la
libs			= $(liblam)
bootdir			= $(base)/boot
incdirs			= -I$(bootdir)

# This is ugly, but we need it so that people can change things at
# "make" time (e.g., "make sysconfdir=/foo/bar all") as documented in
# autoconf.

AM_CPPFLAGS		= \
			-DLAM_PREFIX="\"$(prefix)\"" \
			-DLAM_INCDIR="\"$(includedir)\"" \
			-DLAM_LIBDIR="\"$(libdir)\""

bin_PROGRAMS		= mpicc mpic++ mpif77

# We unfortunately can't make a library for the common sources because
# making a library of C++ sources is not standardized.  :-( We also
# can't just list the same .cc files in multiple targets, because some
# C++ compilers will actually compile them multiple times (i.e., once
# for each target).  This results in a timestamp for wrap.o being
# later than already-finished targets (e.g., when wrap.o may end up
# with a timestamp before mpif77, but after mpicc).  So we have to sym
# link the common sources to unique names for each wrapper compiler
# and let them effectively be compiled once for each wrapper.

EXTRA_DIST		= wrap.cc wrap_engine.cc

mpicc_SOURCES		= mpicc.cc wrap_cc.cc wrap_engine_cc.cc
mpicc_LDADD		= $(libs) $(LIBLAM_EXTRA_LIBS)
mpicc_LDFLAGS		= $(LIBLAM_EXTRA_LDFLAGS)
mpicc_DEPENDENCIES	= $(libs)

mpic___SOURCES		= mpicxx.cc wrap_cxx.cc wrap_engine_cxx.cc
mpic___LDADD		= $(libs) $(LIBLAM_EXTRA_LIBS)
mpic___LDFLAGS		= $(LIBLAM_EXTRA_LDFLAGS)
mpic___DEPENDENCIES	= $(libs)

mpif77_SOURCES		= mpif77.cc wrap_f77.cc wrap_engine_f77.cc
mpif77_LDADD		= $(libs) $(LIBLAM_EXTRA_LIBS)
mpif77_LDFLAGS		= $(LIBLAM_EXTRA_LDFLAGS)
mpif77_DEPENDENCIES	= $(libs)

# Make the sym links

wrap_cc.cc:
	$(LN_S) $(top_srcdir)/tools/wrappers/wrap.cc wrap_cc.cc
wrap_engine_cc.cc:
	$(LN_S) $(top_srcdir)/tools/wrappers/wrap_engine.cc wrap_engine_cc.cc
wrap_cxx.cc:
	$(LN_S) $(top_srcdir)/tools/wrappers/wrap.cc wrap_cxx.cc
wrap_engine_cxx.cc:
	$(LN_S) $(top_srcdir)/tools/wrappers/wrap_engine.cc wrap_engine_cxx.cc
wrap_f77.cc:
	$(LN_S) $(top_srcdir)/tools/wrappers/wrap.cc wrap_f77.cc
wrap_engine_f77.cc:
	$(LN_S) $(top_srcdir)/tools/wrappers/wrap_engine.cc wrap_engine_f77.cc

# Since this is C++ and we use templates (the STL), also ditch the
# template repository directory

clean-local:
	test -z "$(LAM_CXX_TEMPLATE_REPOSITORY)" || $(RM) -rf $(LAM_CXX_TEMPLATE_REPOSITORY)
	rm -f wrap_cc.cc wrap_engine_cc.cc
	rm -f wrap_cxx.cc wrap_engine_cxx.cc
	rm -f wrap_f77.cc wrap_engine_f77.cc


# Per bug 476, the "wipe" command is now "lamwipe".  So that we don't
# break backwards compatability, we provide sym link names to the old
# names (i.e., lamwipe -> wipe).  However, we provide a
# --disable-deprecated-executable-names option that will disable this
# behavior.  Someday, we'll change the default and the option will
# become --enable-deprecated-executable-names.

if WANT_DEPRECATED_EXECUTABLE_NAMES
if CASE_SENSITIVE_FS
install-exec-hook:
	(cd $(DESTDIR)$(bindir); rm -f hcc$(EXEEXT); $(LN_S) mpicc$(EXEEXT) hcc$(EXEEXT))
	(cd $(DESTDIR)$(bindir); rm -f hcp$(EXEEXT); $(LN_S) mpiCC$(EXEEXT) hcp$(EXEEXT))
	(cd $(DESTDIR)$(bindir); rm -f hf77$(EXEEXT); $(LN_S) mpif77$(EXEEXT) hf77$(EXEEXT))
	(cd $(DESTDIR)$(bindir); rm -f mpiCC$(EXEEXT); $(LN_S) mpic++$(EXEEXT) mpiCC$(EXEEXT))
else
install-exec-hook:
	(cd $(DESTDIR)$(bindir); rm -f hcc$(EXEEXT); $(LN_S) mpicc$(EXEEXT) hcc$(EXEEXT))
	(cd $(DESTDIR)$(bindir); rm -f hcp$(EXEEXT); $(LN_S) mpic++$(EXEEXT) hcp$(EXEEXT))
	(cd $(DESTDIR)$(bindir); rm -f hf77$(EXEEXT); $(LN_S) mpif77$(EXEEXT) hf77$(EXEEXT))
endif

#
# mpiCC might be a symlink we created, so be nice....
#
if CASE_SENSITIVE_FS
uninstall-local:
	rm -f $(DESTDIR)$(bindir)/hcc$(EXEEXT) \
		$(DESTDIR)$(bindir)/hcp$(EXEEXT) \
		$(DESTDIR)$(bindir)/hf77$(EXEEXT) \
		$(DESTDIR)$(bindir)/mpiCC$(EXEEXT)
else
uninstall-local:
	rm -f $(DESTDIR)$(bindir)/hcc$(EXEEXT) \
		$(DESTDIR)$(bindir)/hcp$(EXEEXT) \
		$(DESTDIR)$(bindir)/hf77$(EXEEXT)
endif
#
# If deprecated names are not enabled, then we still need the install-eec-hook 
# and uninstall-local targets. Else "make install" fails. So, we are adding dummy
# install-exec-hook and uninstall-local targets
else
install-exec-hook:
uninstall-local:
endif