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