diff --git a/.gitignore b/.gitignore index b3ef86c..0a62324 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,18 @@ -*.[ao] +.deps/ +.libs/ +*.a +*.la +*.lo +*.o +*.pc +Makefile +Makefile.in +.dirstamp + +/aclocal.m4 +/autom4te.cache/ +/build-aux/ +/config.* +/configure +/libtool +/stamp-h1 diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..6ea41b8 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,37 @@ +# -*- Makefile -*- + +ACLOCAL_AMFLAGS = -I m4 + +AM_CPPFLAGS = -I${top_srcdir} +AM_CXXFLAGS = -Wall -Wextra -Wno-unknown-pragmas -Wshadow +if ENABLE_DEBUG +AM_CPPFLAGS += -DDEBUG +AM_CXXFLAGS += -g +endif + +lib_LTLIBRARIES = libebml.la +libebml_la_SOURCES = \ + src/Debug.cpp src/EbmlBinary.cpp src/EbmlContexts.cpp \ + src/EbmlCrc32.cpp src/EbmlDate.cpp src/EbmlDummy.cpp \ + src/EbmlElement.cpp src/EbmlFloat.cpp src/EbmlHead.cpp \ + src/EbmlMaster.cpp src/EbmlSInteger.cpp src/EbmlStream.cpp \ + src/EbmlString.cpp src/EbmlSubHead.cpp src/EbmlUInteger.cpp \ + src/EbmlUnicodeString.cpp src/EbmlVersion.cpp src/EbmlVoid.cpp \ + src/IOCallback.cpp src/MemIOCallback.cpp src/StdIOCallback.cpp +libebml_la_LDFLAGS = -version-info 4:0:0 -no-undefined + +nobase_include_HEADERS = \ + ebml/Debug.h ebml/EbmlBinary.h ebml/EbmlConfig.h ebml/EbmlContexts.h \ + ebml/EbmlCrc32.h ebml/EbmlDate.h ebml/EbmlDummy.h ebml/EbmlElement.h \ + ebml/EbmlEndian.h ebml/EbmlFloat.h ebml/EbmlHead.h ebml/EbmlId.h \ + ebml/EbmlMaster.h ebml/EbmlSInteger.h ebml/EbmlStream.h \ + ebml/EbmlString.h ebml/EbmlSubHead.h ebml/EbmlTypes.h \ + ebml/EbmlUInteger.h ebml/EbmlUnicodeString.h ebml/EbmlVersion.h \ + ebml/EbmlVoid.h ebml/IOCallback.h ebml/MemIOCallback.h \ + ebml/StdIOCallback.h \ + ebml/c/libebml_t.h + +pkgconfigdir = ${libdir}/pkgconfig +pkgconfig_DATA = libebml.pc + +${pkgconfig_DATA}: config.status diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..ecaaba9 --- /dev/null +++ b/configure.ac @@ -0,0 +1,13 @@ +AC_INIT([libebml], [1.3.0]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE([foreign subdir-objects tar-pax]) +AC_PROG_CXX +LT_INIT +AC_ARG_ENABLE([debug], + AS_HELP_STRING([--enable-debug], [Add -g -DDEBUG to compile flags]), + [enable_debug="$withval"], [enable_debug=no]) +AM_CONDITIONAL([ENABLE_DEBUG], [test "$enable_debug" = yes]) +AC_CONFIG_FILES([Makefile libebml.pc]) +AC_OUTPUT diff --git a/libebml.pc.in b/libebml.pc.in new file mode 100644 index 0000000..a6223bd --- /dev/null +++ b/libebml.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libebml +Description: Library for parsing EBML data structures +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lebml +Cflags: -I${includedir} diff --git a/m4/.gitignore b/m4/.gitignore new file mode 100644 index 0000000..64d9bbc --- /dev/null +++ b/m4/.gitignore @@ -0,0 +1,2 @@ +/libtool.m4 +/lt*.m4