Makefile.am 4.56 KB
Newer Older
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1
2
## Process this file with automake to produce Makefile.in
#
3
EXTRA_DIST = cdilib.c mo_cdi.f90
4
5
6
7
8
9

if ENABLE_CDI_LIB
  lib_LTLIBRARIES = libcdi.la
  include_HEADERS = cdi.h cdi.inc
else
  noinst_LTLIBRARIES = libcdi.la
Uwe Schulzweida's avatar
Uwe Schulzweida committed
10
endif
11

12
AM_CFLAGS = $(PPM_CORE_CFLAGS) $(YAXT_CFLAGS)
13
14

libcdi_la_SOURCES = 	 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
15
	basetime.c     	 \
16
	basetime.h	 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
17
18
	binary.c	 \
	binary.h	 \
19
20
21
	calendar.c 	 \
	calendar.h	 \
	cdf.c            \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
22
	cdf.h	 	 \
23
	cdf_int.c	 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
24
	cdf_int.h	 \
25
26
27
28
29
30
31
32
	cdi.h	 	 \
	cdi_error.c      \
	cdi_limits.h	 \
	cdi_util.c       \
	cdiFortran.c     \
	cfortran.h       \
	cgribex.h	 \
	cgribexlib.c  	 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
33
	datetime.h	 \
34
	dmemory.c      	 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
35
	dmemory.h	 \
36
37
	cksum.c		\
	cksum.h		\
38
39
	cdi_cksum.c	\
	cdi_cksum.h	\
40
41
	pio_util.c							\
	pio_util.h							\
Uwe Schulzweida's avatar
Uwe Schulzweida committed
42
	dtypes.h	 \
43
	error.c        	 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
44
45
	error.h	 	 \
	extra.h	 	 \
46
47
	extralib.c       \
	file.c         	 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
48
	file.h	 	 \
49
50
51
	gaussgrid.c      \
	gaussgrid.h	 \
	gribapi.c  	 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
52
	gribapi.h	 \
53
	grid.c           \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
54
	grid.h	 	 \
55
56
57
	ieg.h	 	 \
	ieglib.c         \
	institution.c  	 \
58
	institution.h  	 \
59
	model.c        	 \
60
	model.h        	 \
61
	namespace.c      \
62
	namespace.h      \
63
64
	serialize.h	\
	serialize.c	\
65
66
	resource_handle.c\
	resource_handle.h\
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
	service.h	 \
	servicelib.c     \
	stream_cdf.c     \
	stream_cdf.h	 \
	stream_cgribex.c \
	stream_cgribex.h \
	stream_ext.c     \
	stream_ext.h	 \
	stream_grb.c     \
	stream_grb.h     \
	stream_gribapi.c \
	stream_gribapi.h \
	stream_history.c \
	stream_ieg.c     \
	stream_ieg.h	 \
82
83
	cdi_int.c        \
	cdi_int.h	 \
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
	stream_record.c  \
	stream_srv.c     \
	stream_srv.h	 \
	stream_var.c     \
	swap.h	 	 \
	table.c        	 \
	table.h	 	 \
	tablepar.h	 \
	taxis.c          \
	taxis.h	         \
	timebase.c 	 \
	timebase.h	 \
	tsteps.c         \
	util.c         	 \
	varscan.c      	 \
	varscan.h        \
	version.c      	 \
	vlist.c 	 \
	vlist.h	         \
	vlist_att.c 	 \
104
	vlist_att.h 	 \
105
	vlist_var.c 	 \
106
	vlist_var.h	 \
107
	zaxis.c		 \
108
	zaxis.h		 \
109
        stream.c         \
110
        swap.c
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
if USE_MPI
if ENABLE_CDI_LIB
lib_LTLIBRARIES += libcdipio.la
include_HEADERS += cdipio.h cdipio.inc
else
noinst_LTLIBRARIES += libcdipio.la
endif
endif

libcdipio_la_SOURCES =							\
	cdipio.h							\
	cdipioFortran.c							\
	cfortran.h							\
	pio.c								\
	pio.h								\
	pio_comm.c							\
	pio_comm.h							\
	pio_dbuffer.c							\
	pio_impl.h							\
	pio_interface.c							\
	pio_interface.h							\
	pio_mpinonb.c							\
	pio_record_send.c						\
	pio_posixasynch.c						\
	pio_posixfpguardsendrecv.c					\
	pio_posixnonb.c							\
	pio_list_set.c							\
	resource_unpack.h						\
	resource_unpack.c						\
	pio_rpc.h							\
	pio_client.c							\
	pio_client.h							\
	pio_server.c							\
	pio_server.h							\
	pio_serialize.h							\
	pio_serialize.c							\
	pio_cdf_int.c							\
	pio_cdf_int.h

libcdipio_la_LIBADD    = libcdi.la $(PPM_CORE_LIBS) $(YAXT_LIBS)


154
#libcdi_la_CPPFLAGS  = @CPPFLAGS@
155
libcdi_la_LIBADD    =
Uwe Schulzweida's avatar
Uwe Schulzweida committed
156
#
157
158
#cdilib.c:
#	$(top_srcdir)/src/make_cdilib $(top_srcdir)/src
Uwe Schulzweida's avatar
Uwe Schulzweida committed
159
#
160
161
#cdilib.o: cdilib.c
#	$(COMPILE) -c $<
Uwe Schulzweida's avatar
Uwe Schulzweida committed
162

163
LOCALTARGETS  =
Deike Kleberg's avatar
Deike Kleberg committed
164
165
if ENABLE_CDI_LIB
LOCALTARGETS += pkgconfig/cdi.pc
166
167
168
if USE_MPI
LOCALTARGETS += pkgconfig/cdipio.pc
endif
Deike Kleberg's avatar
Deike Kleberg committed
169
170
endif

Uwe Schulzweida's avatar
Uwe Schulzweida committed
171
if CREATE_ISOC
172
LOCALTARGETS += mo_cdi.o mo_cdi.$(FCMODEXT)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
173
174
endif
#
175
176
mo_cdi.f90: $(top_srcdir)/src/cdi.h
	ruby $(top_srcdir)/interfaces/f2003/bindGen.rb $(top_srcdir)/src/cdi.h $@
Uwe Schulzweida's avatar
Uwe Schulzweida committed
177
178
#
mo_cdi.o: mo_cdi.f90
179
	$(FC) $(FCFLAGS) -c $(FCFLAGS_f90) $<
Uwe Schulzweida's avatar
Uwe Schulzweida committed
180
181
#
mo_cdi.$(FCMODEXT): mo_cdi.f90
182
	$(FC) $(FCFLAGS) -c $(FCFLAGS_f90) $<
183
184
185

pkgconfig/cdi.pc: pkgconfig/cdi.pc.in ../config.status
	(cd .. ; ./config.status src/pkgconfig/cdi.pc)
186
187
188

pkgconfig/cdipio.pc: pkgconfig/cdipio.pc.in ../config.status
	(cd .. ; ./config.status src/pkgconfig/cdipio.pc)
189
#
190
all-local: $(LOCALTARGETS)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
191
#
192
CLEANFILES  = `ls *~`
193
#CLEANFILES += cdilib.c
Uwe Schulzweida's avatar
Uwe Schulzweida committed
194
if CREATE_ISOC
195
CLEANFILES += $(top_builddir)/src/mo_cdi.$(FCMODEXT) $(top_builddir)/src/mo_cdi.o
Uwe Schulzweida's avatar
Uwe Schulzweida committed
196
endif
197

Deike Kleberg's avatar
Deike Kleberg committed
198
if ENABLE_CDI_LIB
199
PKGCONFIG_FILES = pkgconfig/cdi.pc
Deike Kleberg's avatar
Deike Kleberg committed
200
CLEANFILES += pkgconfig/cdi.pc
201
202
203
204
if USE_MPI
CLEANFILES += pkgconfig/cdipio.pc
PKGCONFIG_FILES += pkgconfig/cdipio.pc
endif
Deike Kleberg's avatar
Deike Kleberg committed
205

206
install-exec-local: $(PKGCONFIG_FILES)
207
	$(mkinstalldirs) "$(DESTDIR)$(libdir)/pkgconfig"
208
209
210
211
212
213
	@for pkgconfigfile in $(PKGCONFIG_FILES) ; do \
		echo $(install_sh_DATA) $$pkgconfigfile \
		"$(DESTDIR)$(libdir)/$$pkgconfigfile" ; \
		$(install_sh_DATA) $$pkgconfigfile \
		"$(DESTDIR)$(libdir)/$$pkgconfigfile" ; \
	done
214
215

uninstall-local:
216
217
218
219
220
	@for pkgconfigfile in $(PKGCONFIG_FILES) ; do \
		echo rm -f "$(DESTDIR)$(libdir)/$$pkgconfigfile" ; \
		rm -f "$(DESTDIR)$(libdir)/$$pkgconfigfile" ; \
	done
	-@rmdir "$(DESTDIR)$(libdir)/pkgconfig"
221

Deike Kleberg's avatar
Deike Kleberg committed
222
223
224
225
226
227
228
endif

install-exec-hook:
	-@rmdir "$(DESTDIR)$(libdir)"
install-data-hook:
	-@rmdir "$(DESTDIR)$(includedir)"