added as_02_internal.h to the Makefile sources for as02 tools.
[asdcplib.git] / src / Makefile.am
1 ## Makefile.am -- Process this file with automake to produce Makefile.in
2 #
3 # $Id$
4 # Copyright (c) 2007-2011 John Hurst. All rights reserved.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
8 # are met:
9 # 1. Redistributions of source code must retain the above copyright
10 #    notice, this list of conditions and the following disclaimer.
11 # 2. Redistributions in binary form must reproduce the above copyright
12 #    notice, this list of conditions and the following disclaimer in the
13 #    documentation and/or other materials provided with the distribution.
14 # 3. The name of the author may not be used to endorse or promote products
15 #    derived from this software without specific prior written permission.
16 #
17 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28 # Allow for configure's changes to this makefile
29 AM_CPPFLAGS =
30 AM_LDFLAGS =
31
32 if OPENBSD_HOST
33 AM_CPPFLAGS += -I/var/local/include -I/usr/local/include
34 AM_LDFLAGS += -L./.libs -L/var/local/lib -L/usr/local/lib
35 endif
36
37 if ENABLE_RANDOM_UUID
38 AM_CPPFLAGS += -DCONFIG_RANDOM_UUID
39 endif
40
41 # list of all the header files that should be installed
42 include_HEADERS = KM_error.h KM_fileio.h KM_log.h KM_memio.h KM_mutex.h \
43                 KM_platform.h KM_prng.h KM_util.h KM_tai.h KM_xml.h AS_DCP.h AS_02.h
44 if DEV_HEADERS
45 include_HEADERS += S12MTimecode.h MDD.h Metadata.h KLV.h MXFTypes.h MXF.h Wav.h \
46                 PCMParserList.h
47 nodist_include_HEADERS = TimedText_Transform.h
48 endif
49
50
51 # list of the libraries to build and install
52 lib_LTLIBRARIES = libkumu.la libasdcp.la libas02.la
53
54 # sources for kumu library
55 libkumu_la_SOURCES = KM_error.h KM_fileio.cpp KM_fileio.h KM_log.cpp KM_log.h \
56                 KM_memio.h KM_mutex.h KM_platform.h KM_prng.cpp KM_prng.h KM_util.cpp \
57                 KM_util.h KM_xml.cpp KM_xml.h KM_tai.h KM_tai.cpp
58
59 # linker flags (*not* including libraries to link against) for a library
60 libkumu_la_LDFLAGS = -release @VERSION@
61
62
63 # sources for asdcp library that don't get added to a distribution
64 nodist_libasdcp_la_SOURCES = Metadata_h.tt2 Metadata_cpp.tt2 \
65                 mxfgen.pl MXF_def.pl ullist.pl ULList.xml dict.xml DMS_Crypto.xml
66 # sources for asdcp library
67 libasdcp_la_SOURCES = MPEG2_Parser.cpp MPEG.cpp JP2K_Codestream_Parser.cpp \
68                 JP2K_Sequence_Parser.cpp JP2K.cpp PCM_Parser.cpp Wav.cpp \
69                 TimedText_Parser.cpp KLV.cpp Dict.cpp MXFTypes.cpp MXF.cpp \
70                 Index.cpp Metadata.cpp AS_DCP.cpp AS_DCP_MXF.cpp AS_DCP_AES.cpp \
71                 h__Reader.cpp h__Writer.cpp AS_DCP_MPEG2.cpp AS_DCP_JP2K.cpp \
72                 AS_DCP_PCM.cpp AS_DCP_TimedText.cpp PCMParserList.cpp \
73                 Wav.h WavFileWriter.h MXF.h Metadata.h \
74                 JP2K.h AS_DCP.h AS_DCP_internal.h KLV.h MPEG.h MXFTypes.h MDD.h \
75                 PCMParserList.h S12MTimecode.h MDD.cpp
76 if DEV_HEADERS
77 nodist_libasdcp_la_SOURCES += TimedText_Transform.h TimedText_Transform.cpp
78 endif
79 libasdcp_la_LDFLAGS = -release @VERSION@
80 # additional libraries to link against for a library
81 libasdcp_la_LIBADD = libkumu.la
82 libasdcp_la_CPPFLAGS = -DASDCP_PLATFORM=\"@host@\"
83
84
85 # sources for as-02 library
86 libas02_la_SOURCES      = \
87                 AS_02.h AS_02_MXF.cpp AS_02_JP2K.cpp AS_02_PCM.cpp h__02_Reader.cpp h__02_Writer.cpp AS_02_internal.h
88 libas02_la_LDFLAGS = -release @VERSION@
89 libas02_la_LIBADD = libasdcp.la libkumu.la
90 libas02_la_CPPFLAGS = -DASDCP_PLATFORM=\"@host@\"
91
92
93 # Python extension
94 if PYTHON_USE
95 lib_LTLIBRARIES += libpyasdcp.la
96
97 nodist_libpyasdcp_la_SOURCES = \
98         kumu_python.cpp \
99         kumu_python.h \
100         asdcp_python.cpp \
101         asdcp_python.h \
102         asdcp_python_descriptor.cpp \
103         asdcp_python_misc.cpp \
104         asdcp_python_writerinfo.h \
105         asdcp_wrappers.h \
106         asdcp_python_mxf.cpp \
107         asdcp_python_mxf_text.cpp \
108         asdcp_python_mxf_metadata.cpp
109
110
111 libpyasdcp_la_CPPFLAGS = @PYTHON_CPPFLAGS@
112 libpyasdcp_la_LDFLAGS = @PYTHON_LSPEC@  -release @VERSION@
113 libpyasdcp_la_LIBADD = libkumu.la libasdcp.la
114
115 pyexecdir = @PYTHON_EXECDIR@
116 pyexec_includedir = $(PYTHON_PREFIX)/include/python$(PYTHON_SHORTVERSION)
117 nodist_pyexec_include_HEADERS = kumu_python.h asdcp_python.h asdcp_wrappers.h
118 pyexec_LTLIBRARIES = kumu.la asdcp.la
119
120 nodist_kumu_la_SOURCES = pykumu.cpp kumu_python.h
121 kumu_la_CPPFLAGS = @PYTHON_CPPFLAGS@
122 kumu_la_LDFLAGS = @PYTHON_LSPEC@ -avoid-version -module
123 kumu_la_LIBADD = libpyasdcp.la
124
125 nodist_asdcp_la_SOURCES = pyasdcp.cpp kumu_python.h asdcp_python.h asdcp_wrappers.h
126 asdcp_la_CPPFLAGS = @PYTHON_CPPFLAGS@
127 asdcp_la_LDFLAGS = @PYTHON_LSPEC@ -avoid-version -module
128 asdcp_la_LIBADD = libpyasdcp.la
129 endif
130
131 # list of programs to be built and installed
132 bin_PROGRAMS = \
133         asdcp-wrap asdcp-unwrap asdcp-util asdcp-info asdcp-test \
134         as-02-wrap as-02-unwrap \
135         j2c-test blackwave klvwalk wavesplit \
136         kmfilegen kmrandgen kmuuidgen
137
138 # sources and linkage for CLI utilities
139 asdcp_test_SOURCES = asdcp-test.cpp
140 asdcp_test_LDADD = libasdcp.la
141
142 as_02_wrap_SOURCES = as-02-wrap.cpp
143 as_02_wrap_LDADD = libas02.la
144
145 as_02_unwrap_SOURCES = as-02-unwrap.cpp
146 as_02_unwrap_LDADD = libas02.la
147
148 asdcp_wrap_SOURCES = asdcp-wrap.cpp
149 asdcp_wrap_LDADD = libasdcp.la
150
151 asdcp_unwrap_SOURCES = asdcp-unwrap.cpp
152 asdcp_unwrap_LDADD = libasdcp.la
153
154 asdcp_util_SOURCES = asdcp-util.cpp
155 asdcp_util_LDADD = libasdcp.la
156
157 asdcp_info_SOURCES = asdcp-info.cpp
158 asdcp_info_LDADD = libasdcp.la
159
160 kmfilegen_SOURCES = kmfilegen.cpp
161 kmfilegen_LDADD = libkumu.la
162
163 kmrandgen_SOURCES = kmrandgen.cpp
164 kmrandgen_LDADD = libkumu.la
165
166 kmuuidgen_SOURCES = kmuuidgen.cpp
167 kmuuidgen_LDADD = libkumu.la
168
169 blackwave_SOURCES = blackwave.cpp
170 blackwave_LDADD = libasdcp.la
171
172 klvwalk_SOURCES = klvwalk.cpp
173 klvwalk_LDADD = libasdcp.la
174
175 wavesplit_SOURCES = wavesplit.cpp
176 wavesplit_LDADD = libasdcp.la
177
178 j2c_test_SOURCES = j2c-test.cpp
179 j2c_test_LDADD = libasdcp.la
180
181 # list of programs that need to be compiled for use in test suite
182 check_PROGRAMS = asdcp-mem-test path-test \
183         fips-186-rng-test asdcp-version
184 if DEV_HEADERS
185 check_PROGRAMS += tt-xform
186 endif
187
188 # sources for a test program
189 # list of libraries to link against for a test program
190 asdcp_mem_test_SOURCES = asdcp-mem-test.cpp
191 asdcp_mem_test_LDADD = libasdcp.la
192
193 path_test_SOURCES = path-test.cpp
194 path_test_LDADD = libkumu.la
195
196 fips_186_rng_test_SOURCES = fips-186-rng-test.cpp
197 fips_186_rng_test_LDADD = libasdcp.la
198
199 asdcp_version_SOURCES = asdcp-version.cpp
200 asdcp_version_LDADD = libkumu.la
201
202 if DEV_HEADERS
203 nodist_tt_xform_SOURCES = tt-xform.cpp
204 tt_xform_LDADD = libasdcp.la
205 endif
206
207
208 # list of test scripts to execute during "make check"
209 TESTS = rng-tst.sh gen-tst.sh \
210         jp2k-tst.sh jp2k-crypt-tst.sh jp2k-stereo-tst.sh jp2k-stereo-crypt-tst.sh \
211         wav-tst.sh wav-crypt-tst.sh mpeg-tst.sh mpeg-crypt-tst.sh
212
213 # environment variables to pass to above tests
214 TESTS_ENVIRONMENT = BUILD_DIR="." TEST_FILES=../tests TEST_FILE_PREFIX=DCPd1-M1 \
215         CRYPT_KEY=70e0de21c98fbd455ad5b8042edb41a6 CRYPT_KEY_B=aa2d05475d568cd52cb3415e65cba76f \
216         JP2K_PREFIX=MM_2k_XYZ_
217
218 # files to include in the distribution that automake doesn't automatically include
219 EXTRA_DIST = fips-186-test-harness.pl $(TESTS)
220 if !FREEDIST
221 if DEV_HEADERS
222 EXTRA_DIST += $(nodist_libasdcp_la_SOURCES) $(nodist_tt_xform_SOURCES)
223 endif
224 if PYTHON_USE
225 EXTRA_DIST += $(nodist_pyexec_include_HEADERS) $(nodist_libpyasdcp_la_SOURCES) $(nodist_kumu_la_SOURCES) $(nodist_asdcp_la_SOURCES)
226 endif
227 endif
228
229 # source files that are themselves built
230 BUILT_SOURCES = Metadata.h Metadata.cpp MDD.h MDD.cpp
231 # files to be removed with "make maintainer-clean"
232 MAINTAINERCLEANFILES = Metadata.h Metadata.cpp MDD.h MDD.cpp
233
234 # build commands for built sources
235 # dependencies: $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml
236 MDD.h:
237         $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml > MDD.h
238 # dependencies: $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml
239 MDD.cpp:
240         $(srcdir)/ullist.pl -s $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml > MDD.cpp
241 # dependencies: $(srcdir)/Metadata_h.tt2 $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl
242 Metadata.h:
243         $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl $(srcdir)/Metadata_h.tt2 > Metadata.h
244 # dependencies:  Metadata.h $(srcdir)/Metadata_cpp.tt2
245 Metadata.cpp:
246         $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl $(srcdir)/Metadata_cpp.tt2 > Metadata.cpp
247
248 #
249 #
250 #