File: Makefile.am

package info (click to toggle)
netcdf 1%3A4.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 116,236 kB
  • sloc: ansic: 281,201; sh: 14,777; cpp: 6,000; yacc: 2,612; makefile: 2,025; lex: 1,218; javascript: 280; xml: 173; awk: 2
file content (61 lines) | stat: -rw-r--r-- 1,478 bytes parent folder | download | duplicates (2)
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
# WARNING: this is not the libxml2 library
# It comes from https://github.com/recp/xml

# Copyright 2009, UCAR/Unidata
# See the COPYRIGHT file for more information.

# Use automake or CMake for building under nix
# Use CMake for building under windows

# Get AM_CPPFLAGS and AM_LDFLAGS

include $(top_srcdir)/lib_flags.am

EXTRA_DIST = CMakeLists.txt license.txt

# True if DAP4 and/or NCZARR are enabled
if NETCDF_ENABLE_XML2

if NETCDF_ENABLE_LIBXML2
AM_CPPFLAGS += ${XML2FLAGS}
endif

# This is our output. The ZARR convenience library.
noinst_LTLIBRARIES = libncxml.la
libncxml_la_LIBADD =
libncxml_la_LDFLAGS =

if NETCDF_ENABLE_LIBXML2
libncxml_la_SOURCES = ncxml_xml2.c
else
AM_CXXFLAGS = -std=c++11
libncxml_la_SOURCES = ncxml_tinyxml2.cpp tinyxml2.cpp tinyxml2.h
endif



# Download and massage the tinyxml2 source
REPO = https://github.com/leethomason/tinyxml2.git
tinyxml2::
	rm -fr ./tinyxml2 ./license.txt
	git clone --depth=1 ${REPO}
	cat tinyxml2/LICENSE.txt > ./license.txt
	tr -d '\r' < tinyxml2/tinyxml2.h > tinyxml2.h
	cat tinyxml2/tinyxml2.cpp \
	| sed -e 's/__BORLANDC__/__APPLE__/' \
	| sed -e 's/ptrdiff_t/long/g' \
	| sed -e '/^static[ ]*FILE[*][ ]*callfopen(/i\
\#if 0' \
	| sed -e '/^void[ ]*XMLDocument::DeleteNode(/i\
\#endif /*0*/\
' \
	| sed -e '/^XMLError[ ]*XMLDocument::LoadFile([ ]*const[ ]*char[*]/i\
\#if 0' \
	| sed -e '/^XMLError[ ]*XMLDocument::Parse(/i\
\#endif /*0*/\
' \
	| tr -d '\r' \
	| cat > ./tinyxml2.cpp
	rm -fr tinyxml2

endif