1 | #
|
---|
2 | # Makefile
|
---|
3 | #
|
---|
4 | # Copyright (C) 1996 Limit Point Systems, Inc.
|
---|
5 | #
|
---|
6 | # Author: Curtis Janssen <cljanss@ca.sandia.gov>
|
---|
7 | # Maintainer: LPS
|
---|
8 | #
|
---|
9 | # This file is part of the SC Toolkit.
|
---|
10 | #
|
---|
11 | # The SC Toolkit is free software; you can redistribute it and/or modify
|
---|
12 | # it under the terms of the GNU Library General Public License as published by
|
---|
13 | # the Free Software Foundation; either version 2, or (at your option)
|
---|
14 | # any later version.
|
---|
15 | #
|
---|
16 | # The SC Toolkit is distributed in the hope that it will be useful,
|
---|
17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | # GNU Library General Public License for more details.
|
---|
20 | #
|
---|
21 | # You should have received a copy of the GNU Library General Public License
|
---|
22 | # along with the SC Toolkit; see the file COPYING.LIB. If not, write to
|
---|
23 | # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
24 | #
|
---|
25 | # The U.S. Government is granted a limited license as per AL 91-7.
|
---|
26 | #
|
---|
27 |
|
---|
28 | TOPDIR=../../../..
|
---|
29 | ifndef SRCDIR
|
---|
30 | SRCDIR=$(shell pwd)
|
---|
31 | endif
|
---|
32 | include $(SRCDIR)/$(TOPDIR)/lib/GlobalMakefile
|
---|
33 |
|
---|
34 | REQUIREDCXXSRC = mstate.cc \
|
---|
35 | message.cc messimpl.cc messproc.cc messint.cc \
|
---|
36 | reduce.cc topology.cc hcube.cc \
|
---|
37 | rnglock.cc memory.cc memmsg.cc pool.cc \
|
---|
38 | memamsg.cc memproc.cc \
|
---|
39 | pregtime.cc thread.cc memiter.cc memrdma.cc
|
---|
40 |
|
---|
41 | OPTIONALCXXSRC = messshm.cc messmpi.cc memshm.cc \
|
---|
42 | memmtmpi.cc
|
---|
43 |
|
---|
44 | CXXSRC := $(REQUIREDCXXSRC)
|
---|
45 |
|
---|
46 | ifeq ($(HAVE_SYSV_IPC),yes)
|
---|
47 | CXXSRC += messshm.cc memshm.cc globcnt.cc
|
---|
48 | endif
|
---|
49 |
|
---|
50 | ifeq ($(HAVE_MPI),yes)
|
---|
51 | CXXSRC += messmpi.cc memmtmpi.cc
|
---|
52 | endif
|
---|
53 | ifeq ($(HAVE_ARMCI),yes)
|
---|
54 | CXXSRC += memarmci.cc
|
---|
55 | endif
|
---|
56 | ifeq ($(HAVE_PTHREAD),yes)
|
---|
57 | CXXSRC += thpthd.cc
|
---|
58 | endif
|
---|
59 |
|
---|
60 | LIBOBJ = $(CXXSRC:%.cc=%.$(OBJSUF))
|
---|
61 |
|
---|
62 | BIN_OR_LIB = LIB
|
---|
63 | TARGET_TO_MAKE = libSCgroup
|
---|
64 |
|
---|
65 | TESTCXXSRC = pooltest.cc messtest.cc rnglocktest.cc thrtest.cc prttest.cc
|
---|
66 | DISTFILES = $(REQUIREDCXXSRC) $(OPTIONALCXXSRC) $(INC) \
|
---|
67 | Makefile LIBS.h $(TESTCXXSRC)
|
---|
68 |
|
---|
69 | TESTPROGS = pooltest messtest rnglocktest memtest
|
---|
70 |
|
---|
71 | DEPENDINCLUDE =
|
---|
72 |
|
---|
73 | default:: $(DEPENDINCLUDE)
|
---|
74 |
|
---|
75 | memtest.$(OBJSUF): memtest.cc
|
---|
76 | $(LTCOMP) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -DSRCDIR=\"$(SRCDIR)\" -c $<
|
---|
77 |
|
---|
78 | prttest: prttest.$(OBJSUF) \
|
---|
79 | libSCgroup.$(LIBSUF) \
|
---|
80 | libSCkeyval.$(LIBSUF) \
|
---|
81 | libSCmisc.$(LIBSUF) \
|
---|
82 | libSCstate.$(LIBSUF) \
|
---|
83 | libSCclass.$(LIBSUF) \
|
---|
84 | libSCcontainer.$(LIBSUF) \
|
---|
85 | libSCref.$(LIBSUF)
|
---|
86 | $(LTLINK) $(LD) $(LDFLAGS) -o prttest $^ $(SYSLIBS) $(LTLINKBINOPTS)
|
---|
87 |
|
---|
88 | memtest: memtest.$(OBJSUF) \
|
---|
89 | libSCgroup.$(LIBSUF) \
|
---|
90 | libSCkeyval.$(LIBSUF) \
|
---|
91 | libSCmisc.$(LIBSUF) \
|
---|
92 | libSCstate.$(LIBSUF) \
|
---|
93 | libSCclass.$(LIBSUF) \
|
---|
94 | libSCcontainer.$(LIBSUF) \
|
---|
95 | libSCref.$(LIBSUF)
|
---|
96 | $(LTLINK) $(LD) $(LDFLAGS) -o memtest $^ $(SYSLIBS) $(LTLINKBINOPTS)
|
---|
97 |
|
---|
98 | pooltest: pooltest.$(OBJSUF) \
|
---|
99 | libSCmisc.$(LIBSUF) \
|
---|
100 | libSCgroup.$(LIBSUF) \
|
---|
101 | libSCkeyval.$(LIBSUF) \
|
---|
102 | libSCstate.$(LIBSUF) \
|
---|
103 | libSCclass.$(LIBSUF) \
|
---|
104 | libSCcontainer.$(LIBSUF) \
|
---|
105 | libSCref.$(LIBSUF)
|
---|
106 | $(LTLINK) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o pooltest $^ $(SYSLIBS) $(LTLINKBINOPTS)
|
---|
107 |
|
---|
108 | rnglocktest: rnglocktest.$(OBJSUF) libSCmisc.$(LIBSUF) libSCgroup.$(LIBSUF)
|
---|
109 | $(LTLINK) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o rnglocktest $^ $(SYSLIBS) $(LTLINKBINOPTS)
|
---|
110 |
|
---|
111 | messtest.$(OBJSUF): messtest.cc
|
---|
112 | $(LTCOMP) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -DSRCDIR=\"$(SRCDIR)\" -c $<
|
---|
113 |
|
---|
114 | messtest: messtest.$(OBJSUF) \
|
---|
115 | libSCgroup.$(LIBSUF) \
|
---|
116 | libSCkeyval.$(LIBSUF) \
|
---|
117 | libSCmisc.$(LIBSUF) \
|
---|
118 | libSCstate.$(LIBSUF) \
|
---|
119 | libSCclass.$(LIBSUF) \
|
---|
120 | libSCcontainer.$(LIBSUF) \
|
---|
121 | libSCref.$(LIBSUF)
|
---|
122 | $(LTLINK) $(LD) $(LDFLAGS) -o messtest $^ $(SYSLIBS) $(LTLINKBINOPTS)
|
---|
123 |
|
---|
124 | thrtest.$(OBJSUF): thrtest.cc
|
---|
125 | $(LTCOMP) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -DSRCDIR=\"$(SRCDIR)\" -c $<
|
---|
126 |
|
---|
127 | thrtest: thrtest.$(OBJSUF) \
|
---|
128 | libSCgroup.$(LIBSUF) \
|
---|
129 | libSCkeyval.$(LIBSUF) \
|
---|
130 | libSCmisc.$(LIBSUF) \
|
---|
131 | libSCstate.$(LIBSUF) \
|
---|
132 | libSCclass.$(LIBSUF) \
|
---|
133 | libSCcontainer.$(LIBSUF) \
|
---|
134 | libSCref.$(LIBSUF)
|
---|
135 | $(LTLINK) $(LD) $(LDFLAGS) -o thrtest $^ $(SYSLIBS) $(LTLINKBINOPTS)
|
---|
136 |
|
---|
137 | include $(SRCDIR)/$(TOPDIR)/lib/GlobalRules
|
---|
138 |
|
---|
139 | $(TESTCXXSRC:%.cc=%.d) $(LIBOBJ:.$(OBJSUF)=.d): $(DEPENDINCLUDE)
|
---|
140 | ifneq ($(DODEPEND),no)
|
---|
141 | include $(TESTCXXSRC:%.cc=%.d) $(LIBOBJ:.$(OBJSUF)=.d)
|
---|
142 | endif
|
---|