Forgot to commit this.
[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 asdcp_python_misc.cpp \
40  asdcp_python_reader.cpp asdcp_python_writer.cpp asdcp_wrappers.h \
41  kumu_python.cpp kumu_python.h
42 libpyasdcp_la_CPPFLAGS = @PYTHON_CPPFLAGS@
43 libpyasdcp_la_LDFLAGS = @PYTHON_LSPEC@
44 libpyasdcp_la_LIBADD = libkumu.la libasdcp.la
45 pyexecdir = @PYTHON_EXECDIR@
46 #pyexec_includedir = $(PYTHON_PREFIX)/include
47 pyexec_LTLIBRARIES = kumu.la asdcp.la
48 nodist_kumu_la_SOURCES = pykumu.cpp kumu_python.h
49 kumu_la_CPPFLAGS = @PYTHON_CPPFLAGS@
50 kumu_la_LDFLAGS = @PYTHON_LSPEC@ -avoid-version -module
51 kumu_la_LIBADD = libpyasdcp.la
52
53 nodist_asdcp_la_SOURCES = pyasdcp.cpp asdcp_python.h
54 asdcp_la_CPPFLAGS = @PYTHON_CPPFLAGS@
55 asdcp_la_LDFLAGS = @PYTHON_LSPEC@ -avoid-version -module
56 asdcp_la_LIBADD = libpyasdcp.la
57 #pyexec_include_HEADERS = kumu_python.h asdcp_python.h
58 endif
59
60 # list of programs to be built and installed
61 bin_PROGRAMS = asdcp-test blackwave klvwalk kmfilegen kmrandgen \
62  kmuuidgen wavesplit
63
64 # sources for a program
65 asdcp_test_SOURCES = asdcp-test.cpp
66 # list of libraries to link against for a program
67 asdcp_test_LDADD = libasdcp.la
68 kmfilegen_SOURCES = kmfilegen.cpp
69 kmfilegen_LDADD = libasdcp.la
70 kmrandgen_SOURCES = kmrandgen.cpp
71 kmrandgen_LDADD = libasdcp.la
72 kmuuidgen_SOURCES = kmuuidgen.cpp
73 kmuuidgen_LDADD = libasdcp.la
74 blackwave_SOURCES = blackwave.cpp
75 blackwave_LDADD = libasdcp.la
76 klvwalk_SOURCES = klvwalk.cpp
77 klvwalk_LDADD = libasdcp.la
78 wavesplit_SOURCES = wavesplit.cpp
79 wavesplit_LDADD = libasdcp.la
80
81 # list of programs that need to be compiled for use in test suite
82 check_PROGRAMS = asdcp-mem-test path-test jp2k-test S429-5-cgi \
83         fips-186-rng-test asdcp-version
84
85 # sources for a test program
86 asdcp_mem_test_SOURCES = asdcp-mem-test.cpp
87 # list of libraries to link against for a test program
88 asdcp_mem_test_LDADD = libasdcp.la
89 path_test_SOURCES = path-test.cpp
90 path_test_LDADD = libkumu.la
91 jp2k_test_SOURCES = jp2k-test.cpp
92 jp2k_test_LDADD = libasdcp.la
93 S429_5_cgi_SOURCES = S429-5-cgi.cpp
94 S429_5_cgi_LDADD = libasdcp.la
95 fips_186_rng_test_SOURCES = fips-186-rng-test.cpp
96 fips_186_rng_test_LDADD = libasdcp.la
97 asdcp_version_SOURCES = asdcp-version.cpp
98 asdcp_version_LDADD = libkumu.la
99
100
101 # list of test scripts to execute during "make check"
102 TESTS = rng-tst.sh gen-tst.sh \
103         jp2k-tst.sh jp2k-crypt-tst.sh jp2k-stereo-tst.sh jp2k-stereo-crypt-tst.sh \
104         wav-tst.sh wav-crypt-tst.sh mpeg-tst.sh mpeg-crypt-tst.sh
105 # environment variables to pass to above tests
106 TESTS_ENVIRONMENT = BUILD_DIR="." TEST_FILES=../tests TEST_FILE_PREFIX=DCPd1-M1 \
107         CRYPT_KEY=70e0de21c98fbd455ad5b8042edb41a6 CRYPT_KEY_B=aa2d05475d568cd52cb3415e65cba76f \
108         JP2K_PREFIX=MM_2k_XYZ_
109
110 # files to include in the distribution that automake doesn't automatically include
111 EXTRA_DIST = fips-186-test-harness.pl $(TESTS)
112
113
114 # source files that are themselves built
115 BUILT_SOURCES = Metadata.h Metadata.cpp MDD.h MDD.cpp
116 # files to be removed with "make maintainer-clean"
117 MAINTAINERCLEANFILES = Metadata.h Metadata.cpp MDD.h MDD.cpp
118
119 # build commands for built sources
120 # dependencies: $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml
121 MDD.h:
122         $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml > MDD.h
123 # dependencies: $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml
124 MDD.cpp:
125         $(srcdir)/ullist.pl -s $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml > MDD.cpp
126 # dependencies: $(srcdir)/Metadata_h.tt2 $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl
127 Metadata.h:
128         $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl $(srcdir)/Metadata_h.tt2 > Metadata.h
129 # dependencies:  Metadata.h $(srcdir)/Metadata_cpp.tt2
130 Metadata.cpp:
131         $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl $(srcdir)/Metadata_cpp.tt2 > Metadata.cpp
132
133 extraHDRS_INSTALL = $(INSTALL_HEADER)
134 install-extra: $(extra_HDRS)
135         @$(NORMAL_INSTALL)
136         test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
137         @list='$(extra_HDRS)'; for p in $$list; do \
138                 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
139                 f=$(am__strip_dir) \
140                 echo " $(extraHDRS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
141                 $(extraHDRS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
142         done