summaryrefslogtreecommitdiffstats
path: root/examples/Makefile.am
blob: a661cf6f6db395bb4d84f44d5ee8307418585b6d (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
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
#
# Copyright by The HDF Group.
# 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://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have
# access to either file, you may request a copy from help@hdfgroup.org.
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
##
#
# HDF5 Library Examples Makefile(.in)
#

include $(top_srcdir)/config/commence.am

if BUILD_PARALLEL_CONDITIONAL
  EXAMPLE_PROG_PARA = ph5example
endif

if BUILD_EFF_CONDITIONAL
  ##INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/test
  ##LDADD = $(LIBH5TEST) $(LIBHDF5)  $(MYAXE_LIBS) $(MYDAOS_POSIX_LIBS) $(MYPLFS_LIBS) $(MYIOD_LIBS)
  EXAMPLE_PROG_EFF = h5ff_server h5ff_client_ref\
                h5ff_client_map h5ff_client_multiple_cont h5ff_client_obj \
                h5ff_client_dset h5ff_client_attr h5ff_client_links h5ff_client_view \
                h5ff_client_vds h5ff_client_vl_data h5ff_python_exec \
                h5ff_client_analysis h5ff_client_evict_deltas h5ff_client_prefetch \
                h5ff_client_M6.2_demo h5ff_client_M7.2-pep_demo \
                h5ff_client_timings h5ff_client_time_datasets h5ff_client_adv_analysis
endif

if BUILD_INDEXING_CONDITIONAL
  EXAMPLE_PROG_INDEXING = h5ff_client_index
endif

INSTALL_SCRIPT_FILES = run-c-ex.sh run_ff_tests.sh
INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh
INSTALL_TOP_FILES = README

# Example programs.
# Don't tell automake about them, because if it knew they were programs,
# it would try to compile them instead of using the h5cc script.
# Use the boilerplate in config/examples.am instead.
EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \
           h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \
           h5_crtatt h5_crtgrp h5_crtdat \
           h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \
           h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg \
           h5_vol_external_log_native \
           h5_vds h5_vds-exc \
           h5_vds-exclim h5_vds-eiger h5_vds-simpleIO h5_vds-percival \
           h5_vds-percival-unlim h5_vds-percival-unlim-maxmin
TEST_SCRIPT=testh5cc.sh 
TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES)

# Install files
# List all file that should be installed in examples directory
INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c   \
          h5_crtgrpd.c h5_subset.c h5_cmprss.c h5_rdwt.c h5_crtgrpar.c \
          h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \
          h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \
          h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c   \
          h5_ref2reg.c h5_shared_mesg.c ph5example.c \
          h5_vol_external_log_native.c \
	  h5_vds.c h5_vds-exc.c \
          h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c h5_vds-percival.c \
          h5_vds-percival-unlim.c h5_vds-percival-unlim-maxmin.c

if BUILD_EFF_CONDITIONAL
INSTALL_FILES += h5ff_client_adv_analysis.c h5ff_client_evict_deltas.c \
        h5ff_client_M7.2-pep_demo.c h5ff_client_prefetch.c h5ff_client_vds.c \
        h5ff_client_analysis.c h5ff_client_index.c h5ff_client_map.c \
        h5ff_client_ref.c h5ff_client_view.c \
        h5ff_client_attr.c h5ff_client_index_inr.c h5ff_client_multiple_cont.c \
        h5ff_client_time_datasets.c h5ff_client_vl_data.c h5ff_client_do.c \
        h5ff_client_links.c h5ff_client_obj.c h5ff_client_timings.c h5ff_python_exec.c \
       h5ff_client_dset.c h5ff_client_M6.2_demo.c h5ff_client_old_api.c h5ff_client_trans.c h5ff_server.c
endif

# How to build examples, using installed version of h5cc
if BUILD_PARALLEL_CONDITIONAL
$(EXTRA_PROG): $(H5CC_PP)
	$(H5CC_PP) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c;
else
$(EXTRA_PROG): $(H5CC)
	$(H5CC) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c;
endif


# Some examples depend on files created by other examples.
h5_read.chkexe_: h5_write.chkexe_
h5_chunk_read.chkexe_: h5_extend_write.chkexe_
h5_crtgrpd.chkexe_: h5_crtgrpar.chkexe_
# h5_rdwt and h5_crtatt both modify the same file created by
# h5_crtdat. Serialize them.
h5_rdwt.chkexe_: h5_crtdat.chkexe_
h5_crtatt.chkexe_: h5_rdwt.chkexe_

# The external link examples demonstrate how to use paths; they need
# directories to be created to do this.
EXTLINK_DIRS=red blue u2w

$(EXTLINK_DIRS):
	echo $(mkdir_p) $@
	$(mkdir_p) $@

CHECK_CLEANFILES+=$(EXTLINK_DIRS)

# Example directory
# Note: no '/' after DESTDIR.  Explanation in commence.am
EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/c
EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples

# List dependencies for each program.  Normally, automake would take
# care of this for us, but if we tell automake about the programs it
# will try to build them with the normal C compiler, not h5cc.  This is
# an inelegant way of solving the problem.
# All programs share the same build rule and a dependency on the main hdf5
# library above.
h5_chunk_read: $(srcdir)/h5_chunk_read.c
h5_compound: $(srcdir)/h5_compound.c
h5_crtgrpd: $(srcdir)/h5_crtgrpd.c
h5_subset: $(srcdir)/h5_subset.c
h5_cmprss: $(srcdir)/h5_cmprss.c
h5_rdwt: $(srcdir)/h5_rdwt.c
h5_crtgrpar: $(srcdir)/h5_crtgrpar.c
h5_extend: $(srcdir)/h5_extend.c
h5_crtatt: $(srcdir)/h5_crtatt.c
h5_crtgrp: $(srcdir)/h5_crtgrp.c
h5_crtdat: $(srcdir)/h5_crtdat.c
h5_extend_write: $(srcdir)/h5_extend_write.c
h5_group: $(srcdir)/h5_group.c
h5_write: $(srcdir)/h5_write.c
h5_read: $(srcdir)/h5_read.c
h5_select: $(srcdir)/h5_select.c
h5_attribute: $(srcdir)/h5_attribute.c
h5_mount: $(srcdir)/h5_mount.c
h5_reference: $(srcdir)/h5_reference.c
h5_ref2reg: $(srcdir)/h5_ref2reg.c
h5_drivers: $(srcdir)/h5_drivers.c
ph5example: $(srcdir)/ph5example.c
h5_dtransform: $(srcdir)/h5_dtransform.c
h5_extlink: $(srcdir)/h5_extlink.c $(EXTLINK_DIRS)
h5_elink_unix2win: $(srcdir)/h5_elink_unix2win.c $(EXTLINK_DIRS)
h5_shared_mesg: $(srcdir)/h5_shared_mesg.c
h5_vol_external_log_native: $(srcdir)/h5_vol_external_log_native.c
h5_vds: $(srcdir)/h5_vds.c
h5_vds-exc: $(srcdir)/h5_vds-exc.c
h5_vds-exclim: $(srcdir)/h5_vds-exclim.c
h5_vds-eiger: $(srcdir)/h5_vds-eiger.c
h5_vds-simpleIO: $(srcdir)/h5_vds-simpleIO.c
h5_vds-percival: $(srcdir)/h5_vds-percival.c
h5_vds-percival-unlim: $(srcdir)/h5_vds-percival-unlim.c
h5_vds-percival-unlim-maxmin: $(srcdir)/h5_vds-percival-unlim-maxmin.c
if BUILD_EFF_CONDITIONAL
h5ff_client_adv_analysis: $(srcdir)/h5ff_client_adv_analysis.c
h5ff_client_evict_deltas: $(srcdir)/h5ff_client_evict_deltas.c
h5ff_client_M7.2-pep_demo: $(srcdir)/h5ff_client_M7.2-pep_demo.c
h5ff_client_prefetch: $(srcdir)/h5ff_client_prefetch.c
h5ff_client_vds: $(srcdir)/h5ff_client_vds.c
h5ff_client_analysis: $(srcdir)/h5ff_client_analysis.c
h5ff_client_index: $(srcdir)/h5ff_client_index.c
h5ff_client_map: $(srcdir)/h5ff_client_map.c
h5ff_client_ref: $(srcdir)/h5ff_client_ref.c
h5ff_client_view: $(srcdir)/h5ff_client_view.c
h5ff_client_attr: $(srcdir)/h5ff_client_attr.c
h5ff_client_index_inr: $(srcdir)/h5ff_client_index_inr.c
h5ff_client_multiple_cont: $(srcdir)/h5ff_client_multiple_cont.c
h5ff_client_time_datasets: $(srcdir)/h5ff_client_time_datasets.c
h5ff_client_vl_data: $(srcdir)/h5ff_client_vl_data.c
h5ff_client_do: $(srcdir)/h5ff_client_do.c
h5ff_client_links: $(srcdir)/h5ff_client_links.c
h5ff_client_obj: $(srcdir)/h5ff_client_obj.c
h5ff_client_timings: $(srcdir)/h5ff_client_timings.c
h5ff_python_exec: $(srcdir)/h5ff_python_exec.c
h5ff_client_dset: $(srcdir)/h5ff_client_dset.c
h5ff_client_M6.2_demo: $(srcdir)/h5ff_client_M6.2_demo.c
h5ff_client_old_api: $(srcdir)/h5ff_client_old_api.c
h5ff_client_trans: $(srcdir)/h5ff_client_trans.c
h5ff_server: $(srcdir)/h5ff_server.c
endif

if BUILD_SHARED_SZIP_CONDITIONAL
LD_LIBRARY_PATH=$(LL_PATH)
endif

include $(top_srcdir)/config/examples.am
include $(top_srcdir)/config/conclude.am