Added atmos support and new ULs per SMPTE 429-2:2013 - see README for deets.
[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 = \
43         KM_error.h \
44         KM_fileio.h \
45         KM_log.h \
46         KM_memio.h \
47         KM_mutex.h \
48         KM_platform.h \
49         KM_prng.h \
50         KM_util.h \
51         KM_tai.h \
52         KM_xml.h \
53         AS_DCP.h
54
55 if DEV_HEADERS
56 include_HEADERS += \
57         S12MTimecode.h \
58         MDD.h \
59         Metadata.h \
60         KLV.h \
61         MXFTypes.h \
62         MXF.h \
63         Wav.h \
64         PCMParserList.h \
65         AtmosSyncChannel_Generator.h
66 nodist_include_HEADERS = TimedText_Transform.h
67 endif
68
69 # list of the libraries to build and install
70 lib_LTLIBRARIES = libkumu.la libasdcp.la
71
72 # sources for kumu library
73 libkumu_la_SOURCES = KM_error.h KM_fileio.cpp KM_fileio.h KM_log.cpp KM_log.h \
74                 KM_memio.h KM_mutex.h KM_platform.h KM_prng.cpp KM_prng.h KM_util.cpp \
75                 KM_util.h KM_xml.cpp KM_xml.h KM_tai.h KM_tai.cpp
76
77 # linker flags (*not* including libraries to link against) for a library
78 libkumu_la_LDFLAGS = -release @VERSION@
79
80
81 # sources for asdcp library that don't get added to a distribution
82 nodist_libasdcp_la_SOURCES = Metadata_h.tt2 Metadata_cpp.tt2 \
83                 mxfgen.pl MXF_def.pl ullist.pl ULList.xml dict.xml DMS_Crypto.xml
84 # sources for asdcp library
85 libasdcp_la_SOURCES = MPEG2_Parser.cpp MPEG.cpp JP2K_Codestream_Parser.cpp \
86                 JP2K_Sequence_Parser.cpp JP2K.cpp PCM_Parser.cpp Wav.cpp \
87                 TimedText_Parser.cpp KLV.cpp Dict.cpp MXFTypes.cpp MXF.cpp \
88                 Index.cpp Metadata.cpp AS_DCP.cpp AS_DCP_MXF.cpp AS_DCP_AES.cpp \
89                 h__Reader.cpp h__Writer.cpp AS_DCP_MPEG2.cpp AS_DCP_JP2K.cpp \
90                 AS_DCP_PCM.cpp AS_DCP_TimedText.cpp PCMParserList.cpp \
91                 Wav.h WavFileWriter.h MXF.h Metadata.h \
92                 JP2K.h AS_DCP.h AS_DCP_internal.h KLV.h MPEG.h MXFTypes.h MDD.h \
93                 PCMParserList.h S12MTimecode.h MDD.cpp \
94                 AS_DCP_ATMOS.cpp  AS_DCP_DCData.cpp AS_DCP_DCData_internal.h \
95                 DCData_ByteStream_Parser.cpp DCData_Sequence_Parser.cpp \
96                 AtmosSyncChannel_Generator.cpp AtmosSyncChannel_Generator.h \
97                 AtmosSyncChannel_Mixer.cpp AtmosSyncChannel_Mixer.h \
98                 PCMDataProviders.cpp PCMDataProviders.h \
99                 SyncEncoder.c SyncEncoder.h SyncCommon.h CRC16.c CRC16.h \
100                 UUIDInformation.c UUIDInformation.h
101
102
103 if DEV_HEADERS
104 nodist_libasdcp_la_SOURCES += TimedText_Transform.h TimedText_Transform.cpp
105 endif
106
107 libasdcp_la_LDFLAGS = -release @VERSION@
108 # additional libraries to link against for a library
109 libasdcp_la_LIBADD = libkumu.la
110 libasdcp_la_CPPFLAGS = -DASDCP_PLATFORM=\"@host@\"
111
112 # Python extension
113 if PYTHON_USE
114 lib_LTLIBRARIES += libpyasdcp.la
115
116 nodist_libpyasdcp_la_SOURCES = \
117         kumu_python.cpp \
118         kumu_python.h \
119         asdcp_python.cpp \
120         asdcp_python.h \
121         asdcp_python_descriptor.cpp \
122         asdcp_python_misc.cpp \
123         asdcp_python_writerinfo.h \
124         asdcp_wrappers.h \
125         asdcp_python_mxf.cpp \
126         asdcp_python_mxf.h \
127         asdcp_python_mxf_text.cpp \
128         asdcp_python_mxf_metadata.cpp
129
130
131 libpyasdcp_la_CPPFLAGS = @PYTHON_CPPFLAGS@
132 libpyasdcp_la_LDFLAGS = @PYTHON_LSPEC@  -release @VERSION@
133 libpyasdcp_la_LIBADD = libkumu.la libasdcp.la
134
135 pyexecdir = @PYTHON_EXECDIR@
136 pyexec_includedir = $(PYTHON_PREFIX)/include/python$(PYTHON_SHORTVERSION)
137 nodist_pyexec_include_HEADERS = kumu_python.h asdcp_python.h asdcp_wrappers.h
138 pyexec_LTLIBRARIES = kumu.la asdcp.la
139
140 nodist_kumu_la_SOURCES = pykumu.cpp kumu_python.h
141 kumu_la_CPPFLAGS = @PYTHON_CPPFLAGS@
142 kumu_la_LDFLAGS = @PYTHON_LSPEC@ -avoid-version -module
143 kumu_la_LIBADD = libpyasdcp.la
144
145 nodist_asdcp_la_SOURCES = pyasdcp.cpp kumu_python.h asdcp_python.h asdcp_wrappers.h
146 asdcp_la_CPPFLAGS = @PYTHON_CPPFLAGS@
147 asdcp_la_LDFLAGS = @PYTHON_LSPEC@ -avoid-version -module
148 asdcp_la_LIBADD = libpyasdcp.la
149 endif
150
151 # list of programs to be built and installed
152 bin_PROGRAMS = \
153         asdcp-wrap asdcp-unwrap asdcp-util asdcp-info asdcp-test \
154         j2c-test blackwave klvwalk wavesplit \
155         kmfilegen kmrandgen kmuuidgen
156
157 # sources and linkage for CLI utilities
158 asdcp_test_SOURCES = asdcp-test.cpp
159 asdcp_test_LDADD = libasdcp.la
160
161 asdcp_wrap_SOURCES = asdcp-wrap.cpp
162 asdcp_wrap_LDADD = libasdcp.la
163
164 asdcp_unwrap_SOURCES = asdcp-unwrap.cpp
165 asdcp_unwrap_LDADD = libasdcp.la
166
167 asdcp_util_SOURCES = asdcp-util.cpp
168 asdcp_util_LDADD = libasdcp.la
169
170 asdcp_info_SOURCES = asdcp-info.cpp
171 asdcp_info_LDADD = libasdcp.la
172
173 kmfilegen_SOURCES = kmfilegen.cpp
174 kmfilegen_LDADD = libkumu.la
175
176 kmrandgen_SOURCES = kmrandgen.cpp
177 kmrandgen_LDADD = libkumu.la
178
179 kmuuidgen_SOURCES = kmuuidgen.cpp
180 kmuuidgen_LDADD = libkumu.la
181
182 blackwave_SOURCES = blackwave.cpp
183 blackwave_LDADD = libasdcp.la
184
185 klvwalk_SOURCES = klvwalk.cpp
186 klvwalk_LDADD = libasdcp.la
187
188 wavesplit_SOURCES = wavesplit.cpp
189 wavesplit_LDADD = libasdcp.la
190
191 j2c_test_SOURCES = j2c-test.cpp
192 j2c_test_LDADD = libasdcp.la
193
194 # list of programs that need to be compiled for use in test suite
195 check_PROGRAMS = asdcp-mem-test path-test \
196         fips-186-rng-test asdcp-version
197 if DEV_HEADERS
198 check_PROGRAMS += tt-xform
199 endif
200
201 # sources for a test program
202 # list of libraries to link against for a test program
203 asdcp_mem_test_SOURCES = asdcp-mem-test.cpp
204 asdcp_mem_test_LDADD = libasdcp.la
205
206 path_test_SOURCES = path-test.cpp
207 path_test_LDADD = libkumu.la
208
209 fips_186_rng_test_SOURCES = fips-186-rng-test.cpp
210 fips_186_rng_test_LDADD = libasdcp.la
211
212 asdcp_version_SOURCES = asdcp-version.cpp
213 asdcp_version_LDADD = libkumu.la
214
215 if DEV_HEADERS
216 nodist_tt_xform_SOURCES = tt-xform.cpp
217 tt_xform_LDADD = libasdcp.la
218 endif
219
220
221 # list of test scripts to execute during "make check"
222 TESTS = rng-tst.sh gen-tst.sh \
223         jp2k-tst.sh jp2k-crypt-tst.sh jp2k-stereo-tst.sh jp2k-stereo-crypt-tst.sh \
224         wav-tst.sh wav-crypt-tst.sh mpeg-tst.sh mpeg-crypt-tst.sh
225
226 # environment variables to pass to above tests
227 TESTS_ENVIRONMENT = BUILD_DIR="." TEST_FILES=../tests TEST_FILE_PREFIX=DCPd1-M1 \
228         CRYPT_KEY=70e0de21c98fbd455ad5b8042edb41a6 CRYPT_KEY_B=aa2d05475d568cd52cb3415e65cba76f \
229         JP2K_PREFIX=MM_2k_XYZ_
230
231 # files to include in the distribution that automake doesn't automatically include
232 EXTRA_DIST = fips-186-test-harness.pl $(TESTS)
233 if !FREEDIST
234 if DEV_HEADERS
235 EXTRA_DIST += $(nodist_libasdcp_la_SOURCES) $(nodist_tt_xform_SOURCES)
236 endif
237 if PYTHON_USE
238 EXTRA_DIST += $(nodist_pyexec_include_HEADERS) $(nodist_libpyasdcp_la_SOURCES) $(nodist_kumu_la_SOURCES) $(nodist_asdcp_la_SOURCES)
239 endif
240 endif
241
242 # source files that are themselves built
243 BUILT_SOURCES = Metadata.h Metadata.cpp MDD.h MDD.cpp
244 # files to be removed with "make maintainer-clean"
245 MAINTAINERCLEANFILES = Metadata.h Metadata.cpp MDD.h MDD.cpp
246
247 # build commands for built sources
248 # dependencies: $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml
249 MDD.h:
250         $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml > MDD.h
251 # dependencies: $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml
252 MDD.cpp:
253         $(srcdir)/ullist.pl -s $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml > MDD.cpp
254 # dependencies: $(srcdir)/Metadata_h.tt2 $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl
255 Metadata.h:
256         $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl $(srcdir)/Metadata_h.tt2 > Metadata.h
257 # dependencies:  Metadata.h $(srcdir)/Metadata_cpp.tt2
258 Metadata.cpp:
259         $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl $(srcdir)/Metadata_cpp.tt2 > Metadata.cpp
260
261 #
262 #
263 #