Add --enable-freedist option for configuration.
[asdcplib.git] / src / Makefile.am
1 ## Makefile.am -- Process this file with automake to produce Makefile.in
2
3 AM_CPPFLAGS = -I/var/local/include -I/usr/local/include
4 AM_LDFLAGS = -L/var/local/lib -L/usr/local/lib
5
6 # list of all the header files that should be installed
7 include_HEADERS = KM_error.h KM_fileio.h KM_log.h KM_memio.h KM_mutex.h \
8  KM_platform.h KM_prng.h KM_util.h KM_xml.h AS_DCP.h
9 extra_HDRS = S12MTimecode.h MDD.h Metadata.h KLV.h MXFTypes.h MXF.h Wav.h \
10  PCMParserList.h
11
12 # list of the libraries to build and install
13 lib_LTLIBRARIES = libkumu.la libasdcp.la
14 # sources for a library
15 libkumu_la_SOURCES = KM_error.h KM_fileio.cpp KM_fileio.h KM_log.cpp KM_log.h \
16  KM_memio.h KM_mutex.h KM_platform.h KM_prng.cpp KM_prng.h KM_util.cpp \
17  KM_util.h KM_xml.cpp KM_xml.h
18 # linker flags (*not* including libraries to link against) for a library
19 libkumu_la_LDFLAGS = -version-info 3:19:0
20 # sources for a library that don't get added to a distribution
21 nodist_libasdcp_la_SOURCES = Metadata_h.tt2 Metadata_cpp.tt2 \
22  mxfgen.pl MXF_def.pl ullist.pl ULList.xml dict.xml DMS_Crypto.xml
23 libasdcp_la_SOURCES = MPEG2_Parser.cpp MPEG.cpp JP2K_Codestream_Parser.cpp \
24  JP2K_Sequence_Parser.cpp JP2K.cpp PCM_Parser.cpp Wav.cpp \
25  TimedText_Parser.cpp KLV.cpp Dict.cpp MXFTypes.cpp MXF.cpp \
26  Index.cpp Metadata.cpp AS_DCP.cpp AS_DCP_MXF.cpp AS_DCP_AES.cpp \
27  h__Reader.cpp h__Writer.cpp AS_DCP_MPEG2.cpp AS_DCP_JP2K.cpp \
28  AS_DCP_PCM.cpp AS_DCP_TimedText.cpp PCMParserList.cpp \
29  Wav.h WavFileWriter.h MXF.h Metadata.h \
30  JP2K.h AS_DCP.h AS_DCP_internal.h KLV.h MPEG.h MXFTypes.h MDD.h \
31  PCMParserList.h S12MTimecode.h MDD.cpp
32 libasdcp_la_LDFLAGS = -version-info 3:19:0
33 # additional libraries to link against for a library
34 libasdcp_la_LIBADD = libkumu.la
35 libasdcp_la_CPPFLAGS=-DASDCP_PLATFORM=\"@host@\"
36 # Python extension
37 if PYTHON_USE
38 lib_LTLIBRARIES += libpyasdcp.la
39 nodist_libpyasdcp_la_SOURCES = asdcp_python.cpp asdcp_python.h \
40  asdcp_python_writerinfo.h asdcp_python_misc.cpp \
41  asdcp_python_reader.cpp asdcp_python_writer.cpp asdcp_wrappers.h \
42  kumu_python.cpp kumu_python.h
43 libpyasdcp_la_CPPFLAGS = @PYTHON_CPPFLAGS@
44 libpyasdcp_la_LDFLAGS = @PYTHON_LSPEC@
45 libpyasdcp_la_LIBADD = libkumu.la libasdcp.la
46 pyexecdir = @PYTHON_EXECDIR@
47 #pyexec_includedir = $(PYTHON_PREFIX)/include
48 pyexec_LTLIBRARIES = kumu.la asdcp.la
49 nodist_kumu_la_SOURCES = pykumu.cpp kumu_python.h
50 kumu_la_CPPFLAGS = @PYTHON_CPPFLAGS@
51 kumu_la_LDFLAGS = @PYTHON_LSPEC@ -avoid-version -module
52 kumu_la_LIBADD = libpyasdcp.la
53
54 nodist_asdcp_la_SOURCES = pyasdcp.cpp asdcp_python.h
55 asdcp_la_CPPFLAGS = @PYTHON_CPPFLAGS@
56 asdcp_la_LDFLAGS = @PYTHON_LSPEC@ -avoid-version -module
57 asdcp_la_LIBADD = libpyasdcp.la
58 #pyexec_include_HEADERS = kumu_python.h asdcp_python.h
59 endif
60
61 # list of programs to be built and installed
62 bin_PROGRAMS = asdcp-test blackwave klvwalk kmfilegen kmrandgen \
63  kmuuidgen wavesplit
64
65 # sources for a program
66 asdcp_test_SOURCES = asdcp-test.cpp
67 # list of libraries to link against for a program
68 asdcp_test_LDADD = libasdcp.la
69 kmfilegen_SOURCES = kmfilegen.cpp
70 kmfilegen_LDADD = libasdcp.la
71 kmrandgen_SOURCES = kmrandgen.cpp
72 kmrandgen_LDADD = libasdcp.la
73 kmuuidgen_SOURCES = kmuuidgen.cpp
74 kmuuidgen_LDADD = libasdcp.la
75 blackwave_SOURCES = blackwave.cpp
76 blackwave_LDADD = libasdcp.la
77 klvwalk_SOURCES = klvwalk.cpp
78 klvwalk_LDADD = libasdcp.la
79 wavesplit_SOURCES = wavesplit.cpp
80 wavesplit_LDADD = libasdcp.la
81
82 # list of programs that need to be compiled for use in test suite
83 check_PROGRAMS = asdcp-mem-test path-test jp2k-test S429-5-cgi \
84         fips-186-rng-test asdcp-version
85
86 # sources for a test program
87 asdcp_mem_test_SOURCES = asdcp-mem-test.cpp
88 # list of libraries to link against for a test program
89 asdcp_mem_test_LDADD = libasdcp.la
90 path_test_SOURCES = path-test.cpp
91 path_test_LDADD = libkumu.la
92 jp2k_test_SOURCES = jp2k-test.cpp
93 jp2k_test_LDADD = libasdcp.la
94 S429_5_cgi_SOURCES = S429-5-cgi.cpp
95 S429_5_cgi_LDADD = libasdcp.la
96 fips_186_rng_test_SOURCES = fips-186-rng-test.cpp
97 fips_186_rng_test_LDADD = libasdcp.la
98 asdcp_version_SOURCES = asdcp-version.cpp
99 asdcp_version_LDADD = libkumu.la
100
101
102 # list of test scripts to execute during "make check"
103 TESTS = rng-tst.sh gen-tst.sh \
104         jp2k-tst.sh jp2k-crypt-tst.sh jp2k-stereo-tst.sh jp2k-stereo-crypt-tst.sh \
105         wav-tst.sh wav-crypt-tst.sh mpeg-tst.sh mpeg-crypt-tst.sh
106 # environment variables to pass to above tests
107 TESTS_ENVIRONMENT = BUILD_DIR="." TEST_FILES=../tests TEST_FILE_PREFIX=DCPd1-M1 \
108         CRYPT_KEY=70e0de21c98fbd455ad5b8042edb41a6 CRYPT_KEY_B=aa2d05475d568cd52cb3415e65cba76f \
109         JP2K_PREFIX=MM_2k_XYZ_
110
111 # files to include in the distribution that automake doesn't automatically include
112 EXTRA_DIST = fips-186-test-harness.pl $(TESTS)
113 if PYTHON_USE
114 if !FREEDIST
115 EXTRA_DIST += $(nodist_libpyasdcp_la_SOURCES) $(nodist_kumu_la_SOURCES) $(nodist_asdcp_la_SOURCES)
116 endif
117 endif
118
119 # source files that are themselves built
120 BUILT_SOURCES = Metadata.h Metadata.cpp MDD.h MDD.cpp
121 # files to be removed with "make maintainer-clean"
122 MAINTAINERCLEANFILES = Metadata.h Metadata.cpp MDD.h MDD.cpp
123
124 # build commands for built sources
125 # dependencies: $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml
126 MDD.h:
127         $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml > MDD.h
128 # dependencies: $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml
129 MDD.cpp:
130         $(srcdir)/ullist.pl -s $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml > MDD.cpp
131 # dependencies: $(srcdir)/Metadata_h.tt2 $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl
132 Metadata.h:
133         $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl $(srcdir)/Metadata_h.tt2 > Metadata.h
134 # dependencies:  Metadata.h $(srcdir)/Metadata_cpp.tt2
135 Metadata.cpp:
136         $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl $(srcdir)/Metadata_cpp.tt2 > Metadata.cpp
137
138 extraHDRS_INSTALL = $(INSTALL_HEADER)
139 install-extra: $(extra_HDRS)
140         @$(NORMAL_INSTALL)
141         test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
142         @list='$(extra_HDRS)'; for p in $$list; do \
143                 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
144                 f=$(am__strip_dir) \
145                 echo " $(extraHDRS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
146                 $(extraHDRS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
147         done