From 33427f1663dc35bb34eb6dfdd82388da618d020c Mon Sep 17 00:00:00 2001 From: Thulinma Date: Sun, 5 Jan 2014 11:57:25 +0100 Subject: [PATCH] Changed buildsystems from automake to plain make. --- .gitignore | 10 +++++--- AUTHORS | 1 - ChangeLog | 7 ------ Makefile | 62 ++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 5 ---- NEWS | 7 ------ README | 42 +++++++++++++++++++++++++------ configure.ac | 52 -------------------------------------- createhooks.sh | 7 +++--- lib/Makefile.am | 52 -------------------------------------- lib/mist-1.0.pc.in | 10 -------- 11 files changed, 106 insertions(+), 149 deletions(-) delete mode 100644 AUTHORS delete mode 100644 ChangeLog create mode 100644 Makefile delete mode 100644 Makefile.am delete mode 100644 NEWS delete mode 100644 configure.ac delete mode 100644 lib/Makefile.am delete mode 100644 lib/mist-1.0.pc.in diff --git a/.gitignore b/.gitignore index 0b3b45e43..e7bec9386 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,16 @@ #ignore object files and nonsense like that -*.[oa] -*.la -*.lo +*.o +*.orig +*.bak *~ .deps -Makefile Makefile.in version.m4 docs nbproject autom4te.cache +/libmist.so +/libmist.a /configure /config.* /aclocal.m4 @@ -27,3 +28,4 @@ libtool *.json *.pc *.swp + diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index a74a17f14..000000000 --- a/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -All code so far was written by DDVTECH employees. diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index f1ad0c0f3..000000000 --- a/ChangeLog +++ /dev/null @@ -1,7 +0,0 @@ -This is a build from the Mistserver git repository located at: -https://github.com/DDVTECH/DMS - -For a full changelog please see the repository history. - -The version of this build can be found in the version.m4 file and -is a valid checkout point for the above mentioned repository. diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..3cf260f23 --- /dev/null +++ b/Makefile @@ -0,0 +1,62 @@ +prefix = /usr +exec_prefix = $(prefix) +includedir = $(prefix)/include +libdir = $(exec_prefix)/lib + +PACKAGE_VERSION := $(shell git describe --tags 2> /dev/null || cat VERSION 2> /dev/null || echo "Unknown") +DEBUG = 4 + +ifeq ($(PACKAGE_VERSION),Unknown) + $(warning Version is unknown - consider creating a VERSION file or fixing your git setup.) +endif + +CPPFLAGS = -Wall -g -O2 -fPIC -DDEBUG="$(DEBUG)" -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" + +LDLIBS = -lcrypto + + +.DEFAULT_GOAL := all + +all: libmist.so libmist.a + +DOXYGEN := $(shell doxygen -v 2> /dev/null) +ifdef DOXYGEN +all: docs +else +$(warning Doxygen not installed - not building source documentation.) +endif + +objects := $(patsubst %.cpp,%.o,$(wildcard lib/*.cpp)) + + +libmist.so: $(objects) + $(CXX) -shared -o $@ $(LDLIBS) $^ + +libmist.a: $(objects) + $(AR) -rcs $@ $^ + +docs: lib/*.h lib/*.cpp Doxyfile + doxygen ./Doxyfile > /dev/null + +clean: + rm -f lib/*.o libmist.so libmist.a + rm -rf ./docs + +install: libmist.so libmist.a lib/*.h + mkdir -p $(DESTDIR)$(includedir)/mist + install lib/*.h $(DESTDIR)$(includedir)/mist/ + install libmist.so $(DESTDIR)$(libdir)/libmist.so + install libmist.a $(DESTDIR)$(libdir)/libmist.a + $(POST_INSTALL) + ldconfig + +uninstall: + rm -f $(DESTDIR)$(includedir)/mist/*.h + rmdir $(DESTDIR)$(includedir)/mist + rm -f $(DESTDIR)$(libdir)/libmist.so + rm -f $(DESTDIR)$(libdir)/libmist.a + +.PHONY: clean uninstall + + + diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index ef0897d43..000000000 --- a/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -SUBDIRS=lib -EXTRA_DIST=VERSION -docs: - doxygen ./Doxyfile > /dev/null -.PHONY: docs diff --git a/NEWS b/NEWS deleted file mode 100644 index f1ad0c0f3..000000000 --- a/NEWS +++ /dev/null @@ -1,7 +0,0 @@ -This is a build from the Mistserver git repository located at: -https://github.com/DDVTECH/DMS - -For a full changelog please see the repository history. - -The version of this build can be found in the version.m4 file and -is a valid checkout point for the above mentioned repository. diff --git a/README b/README index 60358b64e..485e9e4dd 100644 --- a/README +++ b/README @@ -1,9 +1,37 @@ -For full documentation as well as background information, visit our wiki at: -http://wiki.mistserver.com/ + _________________________________________________ +| Mist Libraries | +| Copyright 2010-2014 DDVTech BV, The Netherlands | +| | +| Licensed under the aGPLv3 license | +| See COPYING file for full license | +|_________________________________________________| -Code contributions and bug reports are welcomed through: -https://github.com/DDVTECH/libmist -The following configure options are possible: ---enable-verbose = Compiles the libraries in verbose mode, printing a lot more information to the screen than normally. ---disable-verbose = The opposite of above (default). +The latest version of this code can always be found at: + https://github.com/DDVTECH/mistlib + +For full documentation/changelogs/etc visit our wiki at: + http://wiki.mistserver.com/ + +Code contributions and bug reports are welcomed! Please submit at: + https://github.com/DDVTECH/mistlib + +To install using default options, simply run: + make && sudo make install + +Dependencies: + openssl + +The makefile will listen to the following variables: + DEBUG Sets the debug message level. 4 is the default (and recommended setting for development), 0 is quiet, 10 is insanely high. + PACKAGE_VERSION Overrides the library version number string. You shouldn't need to use this, normally. + prefix Prefix to install files to. Defaults to /usr + exec_prefix Prefix to install object code and binaries to. Defaults to $(prefix) + includedir Directory to install headers to. Defaults to $(prefix)/include + libdir Directory to install libraries to. Defaults to $(exec_prefix)/lib + DESTDIR Global prefix that will be put in front of any and all other file paths. + CPPFLAGS Flags for compiling object files. Defaults to -Wall -g -O2 -fPIC -DDEBUG="$(DEBUG)" -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" + LDLIBS Libraries to include. Defaults to -lcrypto + +Use "make var1=val1 var2=val2" to set these. For example: + make install DEBUG=0 prefix=/usr/local diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 6103353a1..000000000 --- a/configure.ac +++ /dev/null @@ -1,52 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ([2.60]) -AC_INIT([libmist], - m4_esyscmd([git rev-parse 2>/dev/null&&git describe --tags > VERSION;tr -d '\n' < VERSION]), - [contact@ddvtech.com]) -AC_CONFIG_SRCDIR([lib/dtsc.cpp]) -# foreign: no need for NEWS or INSTALL files -AM_INIT_AUTOMAKE([foreign]) -LT_INIT - -# Checks for programs. -AC_PROG_CXX -AC_PROG_CC - -# Checks for libraries. -AC_DEFINE(_GNU_SOURCE) -PKG_CHECK_MODULES(DEPS, openssl) - -# Checks for header files. -AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/socket.h sys/time.h unistd.h]) - - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_C_INLINE -AC_TYPE_INT32_T -AC_TYPE_PID_T -AC_TYPE_SIZE_T -AC_TYPE_UINT32_T -AC_TYPE_UINT64_T -AC_TYPE_UINT8_T - -# Checks for library functions. -AC_FUNC_FORK -AC_FUNC_MALLOC -AC_FUNC_REALLOC -AC_CHECK_FUNCS([dup2 gettimeofday memset mkdir socket strerror]) - -AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=], [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt], [CLOCK_LIB=])]) -AC_SUBST([CLOCK_LIB]) - -# Fix chars to unsigned -AC_SUBST([global_CFLAGS], [-funsigned-char]) - -#allow verbose mode compiles -AC_ARG_ENABLE([verbose], AC_HELP_STRING([--enable-verbose], [Compile with verbose messages]), - AC_DEFINE([DEBUG], [4])) - -AC_CONFIG_FILES([Makefile lib/Makefile lib/mist-1.0.pc]) -AC_OUTPUT diff --git a/createhooks.sh b/createhooks.sh index 346bbe6a5..c1c90b049 100755 --- a/createhooks.sh +++ b/createhooks.sh @@ -1,10 +1,9 @@ #!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -echo -e "#!/bin/bash\n[ -f configure ] && touch configure\n[ -f configure.ac ] && touch configure.ac" > $DIR/.git/hooks/post-commit -echo -e "#!/bin/bash\n[ -f configure ] && touch configure\n[ -f configure.ac ] && touch configure.ac" > $DIR/.git/hooks/post-checkout -echo -e "#!/bin/bash\n[ -f configure ] && touch configure\n[ -f configure.ac ] && touch configure.ac" > $DIR/.git/hooks/post-merge +echo -e "#!/bin/bash\nmake clean" > $DIR/.git/hooks/post-commit +echo -e "#!/bin/bash\nmake clean" > $DIR/.git/hooks/post-checkout +echo -e "#!/bin/bash\nmake clean" > $DIR/.git/hooks/post-merge chmod +x $DIR/.git/hooks/post-commit chmod +x $DIR/.git/hooks/post-checkout chmod +x $DIR/.git/hooks/post-merge echo "Done! The version number should now auto-update whenever you commit or checkout." - diff --git a/lib/Makefile.am b/lib/Makefile.am deleted file mode 100644 index aaef3331f..000000000 --- a/lib/Makefile.am +++ /dev/null @@ -1,52 +0,0 @@ -lib_LTLIBRARIES=libmist-1.0.la -libmist_1_0_la_SOURCES=amf.h amf.cpp -libmist_1_0_la_SOURCES+=auth.h auth.cpp -libmist_1_0_la_SOURCES+=base64.h base64.cpp -libmist_1_0_la_SOURCES+=config.h config.cpp -libmist_1_0_la_SOURCES+=dtsc.h dtsc.cpp dtscmeta.cpp -libmist_1_0_la_SOURCES+=flv_tag.h flv_tag.cpp -libmist_1_0_la_SOURCES+=http_parser.h http_parser.cpp -libmist_1_0_la_SOURCES+=json.h json.cpp -libmist_1_0_la_SOURCES+=procs.h procs.cpp -libmist_1_0_la_SOURCES+=rtmpchunks.h rtmpchunks.cpp -libmist_1_0_la_SOURCES+=socket.h socket.cpp -libmist_1_0_la_SOURCES+=mp4.h mp4.cpp mp4_conv.cpp -libmist_1_0_la_SOURCES+=ftp.h ftp.cpp -libmist_1_0_la_SOURCES+=filesystem.h filesystem.cpp -libmist_1_0_la_SOURCES+=stream.h stream.cpp -libmist_1_0_la_SOURCES+=timing.h timing.cpp -libmist_1_0_la_SOURCES+=ts_packet.cpp ts_packet.h -libmist_1_0_la_SOURCES+=converter.cpp converter.h -libmist_1_0_la_SOURCES+=ogg.h ogg.cpp -libmist_1_0_la_SOURCES+=theora.cpp theora.h -libmist_1_0_la_SOURCES+=vorbis.cpp vorbis.h -libmist_1_0_la_LDFLAGS = -version-info 5:1:2 -libmist_1_0_la_CPPFLAGS=$(DEPS_CFLAGS) $(global_CFLAGS) -libmist_1_0_la_LIBADD=$(DEPS_LIBS) $(CLOCK_LIB) - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = mist-1.0.pc - -library_includedir=$(includedir)/mist-1.0/mist -library_include_HEADERS = amf.h -library_include_HEADERS +=auth.h -library_include_HEADERS +=base64.h -library_include_HEADERS +=config.h -library_include_HEADERS +=dtsc.h -library_include_HEADERS +=flv_tag.h -library_include_HEADERS +=http_parser.h -library_include_HEADERS +=json.h -library_include_HEADERS +=procs.h -library_include_HEADERS +=rtmpchunks.h -library_include_HEADERS +=socket.h -library_include_HEADERS +=mp4.h -library_include_HEADERS +=ftp.h -library_include_HEADERS +=filesystem.h -library_include_HEADERS +=stream.h -library_include_HEADERS +=timing.h -library_include_HEADERS +=nal.h -library_include_HEADERS +=ts_packet.h -library_include_HEADERS +=converter.h -library_include_HEADERS +=ogg.h -library_include_HEADERS +=theora.h -library_include_HEADERS +=vorbis.h diff --git a/lib/mist-1.0.pc.in b/lib/mist-1.0.pc.in deleted file mode 100644 index dbbd603f9..000000000 --- a/lib/mist-1.0.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: Mist -Description: Mist Streaming Media Library -Version: @PACKAGE_VERSION@ -Libs: -L${libdir} -lmist-1.0 -Cflags: -I${includedir}/mist-1.0 -I${libdir}/mist-1.0/include