Debian Codegraph @

nemesis/Imakefile

raw
1 /*
2 * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
3 * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
4 * retains certain rights in this software.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
17 *
18 * * Neither the name of Sandia Corporation nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34 */
35 XCOMM $Id: Imakefile,v 1.15 2008/01/24 19:43:41 gdsjaar Exp $
36 XCOMM Imakefile for Nemesis libraries
37 /* Building Nemesis libraries for installation
38 * % accmkmf
39 * % make Makefiles
40 * % make all
41 * % make install
42 *
43 * Building Nemesis libraries for debugging
44 * % accmkmf
45 * % make Makefiles
46 * % make DEBUG=-g
47 *
48 */
49
50 #define IHaveSubdirs
51
52 #define PassDebugFlags "DEBUG=$(DEBUG)" \
53 "CDEBUGFLAGS=$(CDEBUGFLAGS)" \
54 "CXXDEBUGFLAGS=$(CXXDEBUGFLAGS)" \
55 "F90DEBUGFLAGS=$(F90DEBUGFLAGS)" \
56 "F77DEBUGFLAGS=$(F77DEBUGFLAGS)"
57
58 #define ExtraOptions "CCOPTIONS=$(CCOPTIONS)"
59
60 #ifndef BuildSharedExodusLibrary
61 #define BuildSharedExodusLibrary NO
62 #endif
63
64 #define DoNormalLib YES
65 #define DoSharedLib BuildSharedExodusLibrary
66 #define LibName nemesis
67 SOREV = 4
68 #define SoRev SOREV
69
70 #ifdef PARALLEL
71 CCOPTIONS = ParallelCCOptions
72 F77OPTIONS = ParallelF77Options
73 LIBDIR = $(PLIBDIR)
74 #endif
75
76 DEFINES = $(PICFLAGS)
77 SUBDIRS = forbind
78
79 INCLIST = ne_nemesisI.h ne_nemesisI_int.h
80
81 SRCS = nemesis_wrapper.c
82
83 OBJS = ${SRCS:.c=.o}
84
85 REQUIREDLIBS = -L$(SHLIBDIR) $(EXOIIV2C) $(NETCDF)
86 LIBS = $(NETCDF) $(EXOIIV2C)
87
88 #include <Library.tmpl>
89
90 #if Build64BitAccess == YES
91 AllTarget(libnemesis.a libnemIf.a libnemIf32.a)
92 #else
93 AllTarget(libnemesis.a libnemIf.a)
94 #endif
95
96 InstallIncludeList(makeincludes,$(INCLIST),$(INCDIR))
97 InstallIncludeList(install,$(INCLIST),$(INCDIR))
98
99 /* Directory for nemesis c library */
100 NormalLibraryTarget(nemesis,$(OBJS))
101
102 /* Directory for nemesis fortran wrappers */
103 NamedTargetSubdirs(libnemIf.a,forbind,"making nemIf ",PassDebugFlags ExtraOptions,libnemIf.a)
104
105 #if Build64BitAccess == YES
106 NamedTargetSubdirs(libnemIf32.a,forbind,"making nemIf32 ",PassDebugFlags ExtraOptions,libnemIf32.a)
107 #endif
108
109 InstallLibrary(nemesis,$(LIBDIR))
110 InstallLibraryAlias(nemesis,nemIc,$(LIBDIR))
111 InstallLibrary(nemIf,$(LIBDIR))
112
113 #if Build64BitAccess == YES
114 InstallLibrary(nemIf32,$(LIBDIR))
115 #endif
116
117 #if Parallel
118 InstallParallelLibrary(nemesis,$(PLIBDIR))
119 InstallParallelLibrary(nemIf,$(PLIBDIR))
120
121 #if Build64BitAccess == YES
122 InstallParallelLibrary(nemIf32,$(PLIBDIR))
123 #endif
124
125 #endif
126
127
128 CTESTLIBS = $(EXOIIV2C) $(NETCDF) -lm
129 FTESTLIBS = $(EXOIIV2FOR) $(EXOIIV2C) $(NETCDF) -lm
130
131 test: libnemesis.a libnemIf.a ne_ctest_wrap.c forbind/ne_ftest.F
132 $(CC) -c $(CFLAGS) ne_ctest_wrap.c
133 $(CC) $(LDOPTIONS) -o ne_ctest_wrap ne_ctest_wrap.o libnemesis.a $(LIBPATH) $(CTESTLIBS)
134 $(FC) -c $(FFLAGS) $(STD_DEFINES) -I./forbind forbind/ne_ftest.F
135 $(FC) $(LDOPTIONS) -o ne_ftest ne_ftest.o libnemIf.a $(LIBPATH) $(FTESTLIBS)
136
137 ExtraStuffToClean(ne_ctest_wrap ne_ftest ne_test.exoII ne_test.nemI)
138
139 $(OBJS): ne_nemesisI.h
140
141 DependTarget()
142 LibraryObjectRule()