From a0a988c50fce047427b445d5e21d7354862e8e23 Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Fri, 26 Mar 2004 15:14:13 +0000 Subject: [PATCH] make install part 1 git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@248 d19143bc-622f-0410-bfdd-b5b2a6649095 --- Makefile | 2 + README | 119 ++++++---------------------------------- configure | 11 +++- src/albino/Makefile | 6 ++ src/framework/Makefile | 26 +++++++++- src/framework/config.h | 1 - src/humperdink/Makefile | 6 ++ src/inigo/Makefile | 6 ++ src/miracle/Makefile | 11 ++++ src/modules/Makefile | 15 +++++- src/modules/avformat/Makefile | 4 ++ src/modules/core/Makefile | 4 ++ src/modules/dv/Makefile | 4 ++ src/modules/fezzik/Makefile | 4 ++ src/modules/ffmpeg/Makefile | 4 ++ src/modules/gtk2/Makefile | 4 ++ src/modules/inigo/Makefile | 4 ++ src/modules/resample/Makefile | 4 ++ src/modules/sdl/Makefile | 4 ++ src/modules/vorbis/Makefile | 4 ++ src/modules/westley/Makefile | 4 ++ src/modules/xine/Makefile | 4 ++ src/tests/Makefile | 2 + src/valerie/Makefile | 16 ++++++ 24 files changed, 163 insertions(+), 106 deletions(-) diff --git a/Makefile b/Makefile index 36c1f12..37f3d8a 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +include config.mak + SUBDIRS = src/framework \ src/modules \ src/inigo \ diff --git a/README b/README index 5955a38..c431c02 100644 --- a/README +++ b/README @@ -1,57 +1,17 @@ README ------ - This document provides a description of the MLT project organisation. - - It provides *CRITICAL* architecture information, so please read carefully - if you plan to extend or use the MLT code base. - -Directories ------------ - - The directory heirarchy is defined as follows: - - + docs - Location of all documentation - + src - All project source is provided here - + framework - The mlt media framework - + modules - All services are defined here - + core - Independent MLT services - + dv - libdv dependent services - + ffmpeg - ffmpeg dependent services - + avformat - libavformat dependent services - + vorbis - vorbis dependenent services - + sdl - SDL dependent services - + resample - libresample dependent services - + gtk2 - pango and pixbuf dependent services - + xine - xine-derived services - + bluefish - Bluefish dependent services (*) - + mainconcept - mainconcept dependent services (*) - + inigo - A media playing test application - + valerie - Client API to access the server - + miracle - The server implementation - + humperdink - The evil demo - + albino - The simple but nice demo - + tests - Reserved for regression and unit tests - - Additional subdirectories may be nested below those shown and should be - documented in their parent. - - (*) Not posted to CVS due to licensing issues. + This document provides a quick reference for the minimal configuration, + build and installation of MLT. Configuration ------------- - Configuration is triggered from the top level directory via a - ./configure script. - - Each source bearing subdirectory shown above have their own configure - script which are called automatically from the top level. + Configuration is triggered by running: - Typically, new modules can be introduced without modification to the - configure script and arguments are accepted and passed through to all - subdirectories. + ./configure - Top level usage is: + Usage is: ./configure --help - report all configure options ./configure --prefix=[dir] - target install directory (default: /usr/local) @@ -64,8 +24,11 @@ Configuration Compilation ----------- - Makefiles are generated during configuration and these are based on - a per directory template which must be provided by the developer. + Once configured, it should be sufficient to run: + + make + + to compile the system. Testing ------- @@ -73,66 +36,20 @@ Testing To execute the mlt tools without installation, or to test a new version on a system with an already installed mlt version, you should run: - . setenv + . setenv - NB: This applies to your current shell only. + NB: This applies to your current shell only and it assumes a bash or + regular bourne shell is in use. Installation ------------ - * NOT IMPLEMENTED YET * - - The install is triggered by running make install or make install-strip - from the top level directory. - - The framework produces a single shared object which is installed in - $prefix/lib/ and public header files which are installed in - $prefix/include/mlt/framework. - - The client produces a single shared object which is installed in - $prefix/lib/ and public header which are installed in - $prefix/include/mlt/client. - - The server produces a single exectuable which is installed in - $prefix/bin/. This is linked against the framework shared object and - posix libs but not against any of the modules. - - The modules produce a shared object per module and update text files - containing a list of modules provided by this build. These are installed - in $prefix/share/mlt/. It is at the discretion of the module to install - additional support files. + The install is triggered by running: - To allow the development of external components, mlt-client-config and - mlt-framework-config scripts are generated and installed in $prefix/bin. - - After install, only those modules listed are usable by the server. No - module is loaded unless explicitly requested via server configuration - or usage. - - External modules are also placed in this $prefix/share/mlt, and the - installation of those must modify the text file accordingly before they - will be considered at runtime. - -Development ------------ - - All compilation in the project has {top-level-dir}/src on the include path. - All headers are included as: - - #include + make install - All external modules have {prefix}/include/mlt on the include path. All - headers should also be included as: - - #include - This allows migration of source between external and internal modules. - The configuration and Makefile template requirements will require - attention though. - -Summary -------- +More Information +---------------- - 1. The server will interact with public interfaces from the framework only; - 2. The modules must expose public framework interfaces only; - 3. All modules are dynamically loaded at runtime. + For more detailed information, please refer to docs/install.txt. diff --git a/configure b/configure index 4b39bfc..d4b21be 100755 --- a/configure +++ b/configure @@ -13,12 +13,19 @@ EOF for i in src/modules/* do - [ -d $i ] && echo " --disable-`basename $i`" + [ -d $i ] && [ "`basename $i`" != "CVS" ] && echo " --disable-`basename $i`" done echo } +function build_config +{ + echo VERSION=0.1.0 + echo prefix=$prefix + echo bindir=$prefix/bin +} + # Debug mode set +x @@ -37,7 +44,7 @@ do done # Show help if requested -[ $help = 1 ] && show_help +[ $help = 1 ] && show_help || build_config > config.mak # Iterate through each of the components for i in framework modules inigo valerie miracle humperdink diff --git a/src/albino/Makefile b/src/albino/Makefile index d294f57..d30c762 100644 --- a/src/albino/Makefile +++ b/src/albino/Makefile @@ -1,3 +1,5 @@ +include ../../config.mak + TARGET = albino OBJS = albino.o @@ -27,6 +29,10 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -d "$(bindir)" + install -c -s -m 755 $(TARGET) "$(bindir)" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/framework/Makefile b/src/framework/Makefile index 52174e3..b9f2c70 100644 --- a/src/framework/Makefile +++ b/src/framework/Makefile @@ -1,3 +1,4 @@ +include ../../config.mak TARGET = libmlt.so @@ -20,7 +21,7 @@ OBJS = mlt_frame.o \ SRCS := $(OBJS:.o=.c) -CFLAGS = -g -O3 -Wall -D_FILE_OFFSET_BITS=64 -pthread +CFLAGS = -g -O3 -Wall -D_FILE_OFFSET_BITS=64 -pthread -DPREFIX="\"$(prefix)\"" LDFLAGS = -lm -ldl -lpthread @@ -43,6 +44,29 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: + install -m 755 $(TARGET) $(prefix)/lib/libmlt.so + mkdir -p "$(prefix)/include/mlt/framework" + install -m 644 mlt_consumer.h \ + mlt_factory.h \ + mlt_filter.h \ + mlt.h \ + mlt_multitrack.h \ + mlt_pool.h \ + mlt_properties.h \ + mlt_repository.h \ + mlt_tractor.h \ + mlt_types.h \ + mlt_deque.h \ + mlt_field.h \ + mlt_frame.h \ + mlt_playlist.h \ + mlt_producer.h \ + mlt_property.h \ + mlt_service.h \ + mlt_transition.h \ + "$(prefix)/include/mlt/framework" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/framework/config.h b/src/framework/config.h index 7f5019f..c702697 100644 --- a/src/framework/config.h +++ b/src/framework/config.h @@ -3,7 +3,6 @@ #ifndef _MLT_CONFIG_H_ #define _MLT_CONFIG_H_ -#define PREFIX "/usr/local" #define PREFIX_DATA PREFIX "/share/mlt/modules" #endif diff --git a/src/humperdink/Makefile b/src/humperdink/Makefile index b8aba7a..7003d63 100644 --- a/src/humperdink/Makefile +++ b/src/humperdink/Makefile @@ -1,3 +1,5 @@ +include ../../config.mak + TARGET = humperdink OBJS = client.o \ @@ -29,6 +31,10 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -d "$(bindir)" + install -c -s -m 755 $(TARGET) "$(bindir)" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/inigo/Makefile b/src/inigo/Makefile index 6fac85d..0b67a31 100644 --- a/src/inigo/Makefile +++ b/src/inigo/Makefile @@ -1,3 +1,5 @@ +include ../../config.mak + TARGET = inigo OBJS = inigo.o \ @@ -28,6 +30,10 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -d "$(bindir)" + install -c -s -m 755 $(TARGET) "$(bindir)" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/miracle/Makefile b/src/miracle/Makefile index 445a812..f8f4340 100644 --- a/src/miracle/Makefile +++ b/src/miracle/Makefile @@ -1,3 +1,5 @@ +include ../../config.mak + TARGET = miracle APP_OBJS = miracle.o @@ -40,6 +42,15 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) libmiracle.so +install: all + install -d "$(bindir)" + install -c -s -m 755 $(TARGET) "$(bindir)" + install -m 755 libmiracle.so $(prefix)/lib/libmiracle.so + mkdir -p "$(prefix)/include/mlt/miracle" + install -m 644 \ + miracle_local.h \ + "$(prefix)/include/mlt/miracle" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/modules/Makefile b/src/modules/Makefile index ca2d852..73ac02d 100644 --- a/src/modules/Makefile +++ b/src/modules/Makefile @@ -1,6 +1,8 @@ +include ../../config.mak + include make.inc -all clean depend install: +all clean depend: list='$(SUBDIRS)'; \ for subdir in $$list; do \ if [ -f $$subdir/Makefile ] ; \ @@ -17,3 +19,14 @@ dist-clean: fi \ done +install: + mkdir -p "$(prefix)/share/mlt/modules" + install -m 644 producers.dat filters.dat transitions.dat consumers.dat "$(prefix)/share/mlt/modules" + list='$(SUBDIRS)'; \ + for subdir in $$list; do \ + if [ -f $$subdir/Makefile ] ; \ + then [ ! -f disable-$$subdir ] && $(MAKE) -C $$subdir $@; \ + fi \ + done; \ + /sbin/ldconfig + diff --git a/src/modules/avformat/Makefile b/src/modules/avformat/Makefile index e702047..66e57f8 100644 --- a/src/modules/avformat/Makefile +++ b/src/modules/avformat/Makefile @@ -1,3 +1,4 @@ +include ../../../config.mak TARGET = ../libmltavformat.so @@ -24,6 +25,9 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/modules/core/Makefile b/src/modules/core/Makefile index f37b981..12e2d61 100644 --- a/src/modules/core/Makefile +++ b/src/modules/core/Makefile @@ -1,3 +1,4 @@ +include ../../../config.mak TARGET = ../libmltcore.so @@ -44,6 +45,9 @@ dist-clean: clean clean: rm -f $(OBJS) $(ASM_OBJS) $(TARGET) +install: all + install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/modules/dv/Makefile b/src/modules/dv/Makefile index 4c0150a..493d2ac 100644 --- a/src/modules/dv/Makefile +++ b/src/modules/dv/Makefile @@ -1,3 +1,4 @@ +include ../../../config.mak TARGET = ../libmltdv.so @@ -25,6 +26,9 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/modules/fezzik/Makefile b/src/modules/fezzik/Makefile index b0e98f7..2fe5375 100644 --- a/src/modules/fezzik/Makefile +++ b/src/modules/fezzik/Makefile @@ -1,3 +1,4 @@ +include ../../../config.mak TARGET = ../libmltfezzik.so @@ -23,6 +24,9 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -m 644 ../fezzik.dict "$(prefix)/share/mlt/modules" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/modules/ffmpeg/Makefile b/src/modules/ffmpeg/Makefile index ce5e260..8e0e3ad 100644 --- a/src/modules/ffmpeg/Makefile +++ b/src/modules/ffmpeg/Makefile @@ -1,3 +1,4 @@ +include ../../../config.mak TARGET = ../libmltffmpeg.so @@ -24,6 +25,9 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/modules/gtk2/Makefile b/src/modules/gtk2/Makefile index 3e8cd62..77c4765 100644 --- a/src/modules/gtk2/Makefile +++ b/src/modules/gtk2/Makefile @@ -1,3 +1,4 @@ +include ../../../config.mak TARGET = ../libmltgtk2.so @@ -36,6 +37,9 @@ dist-clean: clean clean: rm -f $(OBJS) $(ASM_OBJS) $(TARGET) +install: all + install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/modules/inigo/Makefile b/src/modules/inigo/Makefile index bed91de..31c4955 100644 --- a/src/modules/inigo/Makefile +++ b/src/modules/inigo/Makefile @@ -1,3 +1,4 @@ +include ../../../config.mak TARGET = ../libmltinigo.so @@ -22,6 +23,9 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/modules/resample/Makefile b/src/modules/resample/Makefile index e70434c..83ffb3d 100644 --- a/src/modules/resample/Makefile +++ b/src/modules/resample/Makefile @@ -1,3 +1,4 @@ +include ../../../config.mak TARGET = ../libmltresample.so @@ -24,6 +25,9 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/modules/sdl/Makefile b/src/modules/sdl/Makefile index 9512936..1571a29 100644 --- a/src/modules/sdl/Makefile +++ b/src/modules/sdl/Makefile @@ -1,3 +1,4 @@ +include ../../../config.mak TARGET = ../libmltsdl.so @@ -24,6 +25,9 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/modules/vorbis/Makefile b/src/modules/vorbis/Makefile index 8b89411..fabf4d7 100644 --- a/src/modules/vorbis/Makefile +++ b/src/modules/vorbis/Makefile @@ -1,3 +1,4 @@ +include ../../../config.mak TARGET = ../libmltvorbis.so @@ -24,6 +25,9 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/modules/westley/Makefile b/src/modules/westley/Makefile index 871c9ac..b0a8d01 100644 --- a/src/modules/westley/Makefile +++ b/src/modules/westley/Makefile @@ -1,3 +1,4 @@ +include ../../../config.mak TARGET = ../libmltwestley.so @@ -25,6 +26,9 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/modules/xine/Makefile b/src/modules/xine/Makefile index a746708..9a96592 100644 --- a/src/modules/xine/Makefile +++ b/src/modules/xine/Makefile @@ -1,3 +1,4 @@ +include ../../../config.mak TARGET = ../libmltxine.so @@ -24,6 +25,9 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + ifneq ($(wildcard .depend),) include .depend endif diff --git a/src/tests/Makefile b/src/tests/Makefile index 8e680f1..92ef0eb 100644 --- a/src/tests/Makefile +++ b/src/tests/Makefile @@ -1,3 +1,5 @@ +include ../../config.mak + TARGET = dan charlie pango pixbuf dissolve luma CFLAGS = -O3 -I .. -Wall -rdynamic -pthread diff --git a/src/valerie/Makefile b/src/valerie/Makefile index 7322577..d7ff25c 100644 --- a/src/valerie/Makefile +++ b/src/valerie/Makefile @@ -1,3 +1,4 @@ +include ../../config.mak TARGET = libvalerie.so @@ -36,6 +37,21 @@ dist-clean: clean clean: rm -f $(OBJS) $(TARGET) +install: all + install -m 755 $(TARGET) $(prefix)/lib/libvalerie.so + mkdir -p "$(prefix)/include/mlt/valerie" + install -m 644 \ + valerie.h \ + valerie_notifier.h \ + valerie_parser.h \ + valerie_remote.h \ + valerie_response.h \ + valerie_socket.h \ + valerie_status.h \ + valerie_tokeniser.h \ + valerie_util.h \ + "$(prefix)/include/mlt/valerie" + ifneq ($(wildcard .depend),) include .depend endif -- 1.7.4.4