summaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
blob: ff9165a4bf10c1a3fe025697271efffabfa436d0 (plain)
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
#
# Copyright by the Board of Trustees of the University of Illinois.
# All rights reserved.
#
# This file is part of HDF5.  The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the files COPYING and Copyright.html.  COPYING can be found at the root
# of the source code distribution tree; Copyright.html can be found at the
# root level of an installed copy of the electronic HDF5 document set and
# is linked from the top-level documents page.  It can also be found at
# http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html.  If you do not have
# access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
#
# HDF5 Library Makefile(.in)
#

include $(top_srcdir)/config/commence.am
include $(top_srcdir)/config/lt_vers.am


# How to build H5detect for number format detection.
# Use -g to force no optimization since many compilers (e.g., Intel) takes
# a long time to compile it with any optimization on.  H5detect is used
# to generate H5Tinit.c once. So, optimization is not critical.
noinst_PROGRAMS = H5detect
H5detect_CFLAGS = -g

# Our main target, the HDF5 library
lib_LTLIBRARIES=libhdf5.la

# Add libtool numbers to the HDF5 library (from config/lt_vers.am)
libhdf5_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE)

# H5Tinit.c is a generated file, and should be cleaned.
MOSTLYCLEANFILES=H5Tinit.c
# H5pubconf.h is generated by configure, and should be cleaned.
DISTCLEANFILES=H5pubconf.h

# library sources
libhdf5_la_SOURCES= H5.c H5dbg.c H5A.c H5AC.c H5B.c H5Bcache.c \
        H5B2.c H5B2cache.c H5B2dbg.c H5B2int.c H5B2stat.c H5B2test.c \
        H5C.c H5CS.c H5D.c H5Dcompact.c H5Dcontig.c \
        H5Defl.c H5Dio.c H5Distore.c H5Dmpio.c H5Doh.c H5Dselect.c H5Dtest.c \
        H5E.c H5F.c \
        H5Fdbg.c H5Fmount.c H5Fsfile.c H5Fsuper.c H5FD.c H5FDcore.c  \
        H5FDfamily.c H5FDlog.c H5FDmpi.c H5FDmpio.c   \
        H5FDmpiposix.c H5FDmulti.c H5FDsec2.c H5FDstdio.c           \
        H5FDstream.c H5FL.c H5FO.c H5FS.c H5FScache.c H5FSdbg.c H5FSsection.c \
        H5G.c H5Gdeprec.c H5Gent.c H5Glink.c H5Gloc.c H5Gname.c H5Gnode.c \
        H5Gobj.c H5Goh.c H5Gstab.c H5Gtest.c H5Gtraverse.c  \
        H5HF.c H5HFbtree2.c H5HFcache.c H5HFdbg.c H5HFdblock.c H5HFdtable.c \
        H5HFhdr.c H5HFhuge.c H5HFiblock.c H5HFiter.c H5HFint.c H5HFsection.c \
        H5HFspace.c H5HFstat.c H5HFtest.c \
        H5HG.c H5HGdbg.c H5HL.c H5HLdbg.c H5HP.c H5I.c H5MF.c H5MM.c \
        H5MP.c H5MPtest.c H5L.c H5Lexternal.c H5O.c H5Oattr.c H5Obogus.c H5Ocache.c \
        H5Ocont.c H5Odtype.c H5Oefl.c H5Ofill.c H5Oginfo.c H5Olayout.c \
        H5Olinfo.c H5Olink.c H5Omtime.c \
        H5Oname.c H5Onull.c H5Opline.c H5Osdspace.c H5Oshared.c H5Ostab.c     \
        H5P.c H5Pacpl.c H5Pdcpl.c H5Pdxpl.c H5Pfapl.c H5Pfcpl.c H5Pgcpl.c     \
        H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pstrcpl.c H5Ptest.c H5R.c H5RC.c  \
        H5RS.c H5S.c H5Sall.c H5Shyper.c H5Smpio.c H5Snone.c H5Spoint.c       \
        H5Sselect.c H5Stest.c \
        H5SL.c H5ST.c H5T.c H5Tarray.c H5Tbit.c H5Tcommit.c \
        H5Tcompound.c H5Tconv.c H5Tcset.c H5Tenum.c H5Tfields.c H5Tfixed.c    \
        H5Tfloat.c H5Tinit.c H5Tnative.c H5Toffset.c H5Toh.c H5Topaque.c \
        H5Torder.c \
        H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvlen.c H5TS.c H5V.c H5Z.c  \
        H5Zdeflate.c H5Zfletcher32.c H5Znbit.c H5Zshuffle.c H5Zszip.c  \
        H5Zscaleoffset.c H5Ztrans.c


# Public headers
include_HEADERS =H5public.h H5Apublic.h H5ACpublic.h \
        H5Cpublic.h H5Dpublic.h  \
        H5Epubgen.h H5Epublic.h H5Fpublic.h H5FDpublic.h H5FDcore.h H5FDfamily.h          \
        H5FDlog.h H5FDmpi.h H5FDmpio.h H5FDmpiposix.h              \
        H5FDmulti.h H5FDsec2.h  H5FDstdio.h H5FDstream.h \
        H5Gpublic.h  H5Ipublic.h H5Lpublic.h \
        H5MMpublic.h H5Opublic.h H5Ppublic.h H5Rpublic.h H5Spublic.h \
        H5Tpublic.h H5Zpublic.h H5pubconf.h hdf5.h H5api_adpt.h

# install libhdf5.settings in lib directory
settingsdir=$(libdir)
settings_DATA=libhdf5.settings

# Error header generation
#
# Actually, H5Einit.h, H5Eterm.h, H5Edefin.h and H5Epubgen.h all
# depend on H5err.txt, but the perl script generates them all, so just
# list one here.
$(top_srcdir)/src/H5Edefin.h: $(top_srcdir)/src/H5err.txt
	perl $(top_srcdir)/bin/make_err $>

# Number format detection
# The LD_LIBRARY_PATH setting is a klutch.
# Things should have been all set during H5detect making.
# Remove the generated .c file if errors occur unless HDF5_Make_Ignore
# is set to ignore the error.
H5Tinit.c: H5detect$(EXEEXT)
	LD_LIBRARY_PATH="$$LD_LIBRARY_PATH`echo $(LDFLAGS) |                  \
		sed -e 's/-L/:/g' -e 's/ //g'`"                               \
	$(RUNSERIAL) ./H5detect > H5Tinit.c  ||                               \
	    (test $$HDF5_Make_Ignore && echo "*** Error ignored") ||          \
	    ($(RM) $@ ; exit 1)

# Add TRACE macros to library source files.  This is done via the trace script
# in the hdf5/bin directory.  If the file contains HDF5 API macros, a "clean"
# version of the source file is saved with a tilde (~) after its name and
# tracing information is inserted.  trace should have no effect on files
# without HDF5 macros.
.PHONY: trace

trace: $(libhdf5_la_SOURCES)
	@for dep in $? dummy; do                                          \
	 if test $$dep != "dummy" -a -n "$(PERL)"; then                      \
	  case "$$dep" in                                                 \
	   *.c)                                                           \
	    $(TRACE) $$dep;                                               \
	    ;;                                                            \
	  esac;                                                           \
	 fi;                                                              \
	done

include $(top_srcdir)/config/conclude.am