2004-03-01 09:51:30 +00:00
|
|
|
# What are we dealing with?
|
|
|
|
PACKAGE = @PACKAGE@
|
|
|
|
VERSION = @VERSION@
|
|
|
|
|
|
|
|
@SET_MAKE@
|
|
|
|
SHELL = @SHELL@
|
|
|
|
|
|
|
|
# Where to?
|
|
|
|
srcdir = @srcdir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
|
|
|
bindir = @bindir@
|
|
|
|
sbindir = @sbindir@
|
|
|
|
libexecdir = @libexecdir@
|
2006-06-16 08:20:06 +00:00
|
|
|
datarootdir = @datarootdir@
|
2004-03-01 09:51:30 +00:00
|
|
|
datadir = @datadir@
|
|
|
|
sysconfdir = @sysconfdir@
|
|
|
|
sharedstatedir = @sharedstatedir@
|
|
|
|
localstatedir = @localstatedir@
|
|
|
|
libdir = @libdir@
|
|
|
|
infodir = @infodir@
|
|
|
|
mandir = @mandir@
|
|
|
|
man1dir = $(mandir)/man1
|
|
|
|
includedir = @includedir@
|
|
|
|
oldincludedir = /usr/include
|
|
|
|
pkgdatadir = $(datadir)/@PACKAGE@
|
|
|
|
pkglibdir = $(libdir)/@PACKAGE@
|
|
|
|
pkgincludedir = $(includedir)/@PACKAGE@
|
|
|
|
top_builddir = .
|
|
|
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
2004-07-18 15:06:33 +00:00
|
|
|
localedir = $(datadir)/locale
|
2004-03-01 09:51:30 +00:00
|
|
|
|
|
|
|
# Common programs
|
|
|
|
AR = @AR@
|
|
|
|
CC = @CC@
|
|
|
|
CPP = @CPP@
|
|
|
|
CXX = @CXX@
|
2009-07-30 18:13:58 +00:00
|
|
|
ETAGS = @ETAGS@
|
2006-11-28 17:58:30 +00:00
|
|
|
EXEEXT = @EXEEXT@
|
2009-08-10 19:20:11 +00:00
|
|
|
GREP = @GREP@
|
2006-11-28 17:58:30 +00:00
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
INSTALL_HEADER = $(INSTALL_DATA)
|
2004-03-01 09:51:30 +00:00
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
2006-11-28 17:58:30 +00:00
|
|
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
2004-03-01 09:51:30 +00:00
|
|
|
install_sh_DATA = $(install_sh) -c -m 644
|
|
|
|
install_sh_PROGRAM = $(install_sh) -c
|
|
|
|
install_sh_SCRIPT = $(install_sh) -c
|
2006-11-28 17:58:30 +00:00
|
|
|
LD = @LD@
|
|
|
|
MOC = @MOC@
|
|
|
|
OBJEXT = @OBJEXT@
|
|
|
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
|
|
|
RANLIB = @RANLIB@
|
2008-02-29 09:37:27 +00:00
|
|
|
STRIP = @STRIP@
|
2006-11-28 17:58:30 +00:00
|
|
|
UIC = @UIC@
|
2009-02-25 14:35:06 +00:00
|
|
|
WINDRES = @WINDRES@
|
2004-03-01 09:51:30 +00:00
|
|
|
|
|
|
|
# Variable stuff as set by configure
|
|
|
|
BZ2_LIBS = @BZ2_LIBS@
|
2008-08-30 12:45:54 +00:00
|
|
|
BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
|
|
|
|
BOOST_LDFLAGS = @BOOST_LDFLAGS@
|
|
|
|
BOOST_REGEX_LIB = @BOOST_REGEX_LIB@
|
2004-03-01 09:51:30 +00:00
|
|
|
DEBUG_CFLAGS = @DEBUG_CFLAGS@
|
2009-08-10 19:20:11 +00:00
|
|
|
DOCBOOK_MANPAGES_STYLESHEET = @DOCBOOK_MANPAGES_STYLESHEET@
|
|
|
|
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
2004-03-01 09:51:30 +00:00
|
|
|
EBML_CFLAGS = @EBML_CFLAGS@
|
|
|
|
EBML_LIBS = @EBML_LIBS@
|
|
|
|
EXPAT_CFLAGS = @EXPAT_CFLAGS@
|
|
|
|
EXPAT_LIBS = @EXPAT_LIBS@
|
|
|
|
EXTRA_CFLAGS = @EXTRA_CFLAGS@
|
|
|
|
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
|
2008-04-18 20:00:06 +00:00
|
|
|
LDFLAGS_RPATHS = @LDFLAGS_RPATHS@
|
2004-03-01 09:51:30 +00:00
|
|
|
FLAC_LIBS = @FLAC_LIBS@
|
|
|
|
ICONV_LIBS = @ICONV_LIBS@
|
2006-11-28 17:58:30 +00:00
|
|
|
LIBINTL_LIBS = @LIBINTL_LIBS@
|
2004-03-01 09:51:30 +00:00
|
|
|
LZO_LIBS = @LZO_LIBS@
|
2006-04-28 11:33:27 +00:00
|
|
|
MAGIC_LIBS = @MAGIC_LIBS@
|
2004-03-01 09:51:30 +00:00
|
|
|
MATROSKA_CFLAGS = @MATROSKA_CFLAGS@
|
|
|
|
MATROSKA_LIBS = @MATROSKA_LIBS@
|
|
|
|
MINGW_GUIAPP = @MINGW_GUIAPP@
|
|
|
|
MINGW_LIBS = @MINGW_LIBS@
|
2005-01-08 18:32:52 +00:00
|
|
|
MINGW = @MINGW@
|
2004-03-01 09:51:30 +00:00
|
|
|
OGG_LIBS = @OGG_LIBS@
|
2006-11-28 17:58:30 +00:00
|
|
|
OPTIMIZATION_CFLAGS = @OPTIMIZATION_CFLAGS@
|
|
|
|
PROFILING_CFLAGS = @PROFILING_CFLAGS@
|
|
|
|
PROFILING_LIBS = @PROFILING_LIBS@
|
|
|
|
QT_CFLAGS = @QT_CFLAGS@
|
|
|
|
QT_LIBS = @QT_LIBS@
|
|
|
|
USER_CPPFLAGS = @USER_CPPFLAGS@
|
|
|
|
USER_CXXFLAGS = @USER_CXXFLAGS@
|
|
|
|
USER_CFLAGS = @USER_CFLAGS@
|
|
|
|
USER_LDFLAGS = @USER_LDFLAGS@
|
2004-03-01 09:51:30 +00:00
|
|
|
VORBIS_LIBS = @VORBIS_LIBS@
|
2006-11-11 10:42:32 +00:00
|
|
|
WXWIDGETS_CFLAGS = @WXWIDGETS_CFLAGS@
|
|
|
|
WXWIDGETS_INCLUDES = @WXWIDGETS_INCLUDES@
|
|
|
|
WXWIDGETS_LIBS = @WXWIDGETS_LIBS@
|
2009-08-10 19:20:11 +00:00
|
|
|
XSLTPROC = @XSLTPROC@
|
|
|
|
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
|
|
|
XSLTPROC_WORKS = @XSLTPROC_WORKS@
|
2004-03-01 09:51:30 +00:00
|
|
|
ZLIB_LIBS = @ZLIB_LIBS@
|
|
|
|
|
2008-09-25 14:42:04 +00:00
|
|
|
WARNING_CFLAGS = -Wall -Wno-sign-compare -Wno-comment
|
2006-11-28 17:58:30 +00:00
|
|
|
|
2008-08-30 12:45:54 +00:00
|
|
|
CFLAGS = $(OPTIMIZATION_CFLAGS) $(WARNING_CFLAGS) \
|
|
|
|
-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
|
|
|
|
$(EXTRA_CFLAGS) $(DEBUG_CFLAGS) $(PROFILING_CFLAGS) $(MATROSKA_CFLAGS) $(EBML_CFLAGS) \
|
|
|
|
$(USER_CPPFLAGS) $(USER_CFLAGS)
|
|
|
|
CXXFLAGS = $(OPTIMIZATION_CFLAGS) $(WARNING_CFLAGS) \
|
|
|
|
-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
|
|
|
|
$(EXTRA_CFLAGS) $(DEBUG_CFLAGS) $(PROFILING_CFLAGS) $(MATROSKA_CFLAGS) $(EBML_CFLAGS) \
|
|
|
|
$(WXWIDGETS_CFLAGS) $(QT_CFLAGS) $(BOOST_CPPFLAGS) \
|
|
|
|
$(USER_CPPFLAGS) $(USER_CXXFLAGS)
|
2007-01-14 20:55:12 +00:00
|
|
|
CPPFLAGS = $(USER_CPPFLAGS) @CPPFLAGS@
|
2008-08-30 12:45:54 +00:00
|
|
|
LDFLAGS = $(EXTRA_LDFLAGS) $(PROFILING_LIBS) $(USER_LDFLAGS) $(LDFLAGS_RPATHS) $(BOOST_LDFLAGS)
|
2004-03-01 09:51:30 +00:00
|
|
|
|
|
|
|
CFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\"
|
|
|
|
CXXFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\"
|
2005-09-03 12:47:14 +00:00
|
|
|
CXXFLAGS += -DMTX_LOCALE_DIR=\"$(localedir)\" \
|
|
|
|
-DMTX_PKG_DATA_DIR=\"$(pkgdatadir)\"
|
2004-03-01 09:51:30 +00:00
|
|
|
|
|
|
|
# Which additional stuff to compile
|
2006-11-11 10:42:32 +00:00
|
|
|
USE_WXWIDGETS = @USE_WXWIDGETS@
|
2006-11-28 17:58:30 +00:00
|
|
|
USE_QT = @USE_QT@
|
2004-03-01 09:51:30 +00:00
|
|
|
|
|
|
|
AVILIB_INCLUDES = -Iavilib-0.6.10
|
|
|
|
AVILIB_LIBDIRS = -Lavilib-0.6.10
|
|
|
|
DEP_AVILIB = avilib-0.6.10/libavi.a
|
|
|
|
|
2004-11-14 12:41:02 +00:00
|
|
|
LIBMTXCOMMONDLL=@LIBMTXCOMMONDLL@
|
|
|
|
ifeq (1,$(LIBMTXCOMMONDLL))
|
|
|
|
LIBMTXCOMMONEXT = dll
|
|
|
|
CXXFLAGS_SRC_COMMON += -DMTX_DLL_EXPORT
|
|
|
|
CXXFLAGS_NO_SRC_COMMON += -DMTX_DLL
|
|
|
|
else
|
|
|
|
LIBMTXCOMMONEXT = a
|
|
|
|
endif
|
|
|
|
|
2005-01-08 18:32:52 +00:00
|
|
|
ifeq (1,$(MINGW))
|
2008-10-06 13:09:01 +00:00
|
|
|
mmg_RESOURCES = src/mmg/mmg-resources.rc
|
|
|
|
mkvmerge_RESOURCES = src/merge/resources.rc
|
|
|
|
mkvinfo_RESOURCES = src/info/resources.rc
|
|
|
|
mkvextract_RESOURCES = src/extract/resources.rc
|
2005-05-02 14:55:09 +00:00
|
|
|
LIBRPCRT = -lrpcrt4
|
2008-12-17 07:50:42 +00:00
|
|
|
LDFLAGS += -Wl,--enable-auto-import
|
2005-01-08 18:32:52 +00:00
|
|
|
endif
|
|
|
|
|
2004-11-14 12:41:02 +00:00
|
|
|
DEP_COMMON = src/common/libmtxcommon.$(LIBMTXCOMMONEXT)
|
2004-03-01 09:51:30 +00:00
|
|
|
DEP_EBMLCOMMON = src/common/libmtxebmlcommon.a
|
|
|
|
DEP_KAXCOMMON = src/common/libmtxkaxcommon.a
|
|
|
|
DEP_INPUT = src/input/libmtxinput.a
|
|
|
|
DEP_OUTPUT = src/output/libmtxoutput.a
|
2004-06-12 17:42:42 +00:00
|
|
|
DEP_AVI = $(DEP_AVILIB)
|
2004-03-17 22:04:03 +00:00
|
|
|
DEP_RMFF = librmff/librmff.a
|
2004-11-02 20:51:07 +00:00
|
|
|
DEP_MPEGPARSER = src/mpegparser/libmpegparser.a
|
2004-03-01 09:51:30 +00:00
|
|
|
COMPRESSION_LIBRARIES = $(LZO_LIBS) $(BZ2_LIBS)
|
|
|
|
|
2009-08-11 09:03:45 +00:00
|
|
|
APPLICATIONS = src/mkvmerge@EXEEXT@ src/mkvinfo@EXEEXT@ src/mkvextract@EXEEXT@ src/mkvpropedit@EXEEXT@
|
2009-08-16 11:26:29 +00:00
|
|
|
MANPAGES = doc/man/mkvmerge.1 doc/man/mkvinfo.1 doc/man/mkvextract.1 doc/man/mkvpropedit.1
|
2006-11-11 10:42:32 +00:00
|
|
|
ifeq (yes,$(USE_WXWIDGETS))
|
2004-11-14 12:41:02 +00:00
|
|
|
APPLICATIONS += src/mmg/mmg@EXEEXT@
|
2009-08-10 19:20:11 +00:00
|
|
|
MANPAGES += doc/man/mmg.1
|
2004-03-01 09:51:30 +00:00
|
|
|
endif
|
|
|
|
|
2004-07-18 15:06:33 +00:00
|
|
|
TRANSLATIONS = @TRANSLATIONS@
|
|
|
|
TRANSLATIONS_POS = @TRANSLATIONS_POS@
|
|
|
|
TRANSLATIONS_MOS = $(patsubst %.po,%.mo,$(TRANSLATIONS_POS))
|
2004-03-01 09:51:30 +00:00
|
|
|
|
2005-01-08 15:26:12 +00:00
|
|
|
HTMLHELPBOOKS = mkvmerge-gui-book
|
|
|
|
|
2008-09-17 15:26:02 +00:00
|
|
|
SYSTEM_INCLUDES = $(AVILIB_INCLUDES) \
|
2009-05-06 10:33:52 +00:00
|
|
|
-I. -Ilibrmff -Isrc
|
2008-09-17 15:26:02 +00:00
|
|
|
SYSTEM_LIBDIRS = $(AVILIB_LIBDIRS) \
|
|
|
|
-Llibrmff -Lsrc/common -Lsrc/input -Lsrc/output \
|
|
|
|
-Lsrc/mpegparser
|
|
|
|
|
|
|
|
RUNAR = $(AR) rcu
|
|
|
|
LINK = $(CXX) $(LDFLAGS) $(LIBDIRS) $(SYSTEM_LIBDIRS)
|
|
|
|
LINKSHARED = $(CXX) $(LDFLAGS) $(LIBDIRS) $(SYSTEM_LIBDIRS) \
|
|
|
|
-shared -Wl,--export-all
|
|
|
|
CXXCOMPILE = $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES)
|
|
|
|
CCOMPILE = $(CC) $(CFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES)
|
2009-02-25 14:35:06 +00:00
|
|
|
RCCOMPILE = $(WINDRES) $(WXWIDGETS_INCLUDES) -Isrc/mmg
|
2008-09-17 15:26:02 +00:00
|
|
|
|
|
|
|
ALL_SOURCES=$(wildcard avilib-0.6.10/*.c) $(wildcard avilib-0.6.10/*.cpp) \
|
|
|
|
$(wildcard librmff/*.c) \
|
|
|
|
$(wildcard src/*.cpp) $(wildcard src/input/*.cpp) \
|
|
|
|
$(wildcard src/output/*.cpp) $(wildcard src/common/*.cpp) \
|
2009-05-21 10:08:39 +00:00
|
|
|
$(wildcard src/common/*/*.cpp) \
|
|
|
|
$(wildcard src/mmg/*.cpp) $(wildcard src/mmg/*/*.cpp) \
|
2009-08-11 09:03:45 +00:00
|
|
|
$(wildcard src/extract/*.cpp) $(wildcard src/propedit/*.cpp) \
|
2008-12-12 16:06:48 +00:00
|
|
|
$(wildcard src/merge/*.cpp) $(wildcard src/info/*.cpp) \
|
2008-09-17 15:26:02 +00:00
|
|
|
$(wildcard src/mpegparser/*.cpp) \
|
|
|
|
$(patsubst %.ui,%.h,$(UIFILES))
|
|
|
|
|
2008-12-12 16:06:48 +00:00
|
|
|
ALL_HEADERS=$(wildcard avilib-0.6.10/*.h) $(wildcard librmff/*.h) \
|
|
|
|
$(wildcard src/*.h) $(wildcard src/input/*.h) \
|
|
|
|
$(wildcard src/output/*.h) $(wildcard src/common/*.h) \
|
2009-05-21 10:08:39 +00:00
|
|
|
$(wildcard src/mmg/*.h) $(wildcard src/mmg/*/*.h) \
|
2009-08-11 09:03:45 +00:00
|
|
|
$(wildcard src/extract/*.h) $(willdcard src/propedit/*.h) \
|
2008-12-12 16:06:48 +00:00
|
|
|
$(wildcard src/merge/*.h) $(wildcard src/info/*.h) \
|
2009-05-18 20:43:19 +00:00
|
|
|
$(wildcard src/mpegparser/*.h) $(wildcard src/common/*/*.h)
|
2008-12-12 16:06:48 +00:00
|
|
|
|
2008-09-17 15:26:02 +00:00
|
|
|
ifeq ($(V),1)
|
|
|
|
Q =
|
|
|
|
else
|
|
|
|
Q = @
|
|
|
|
endif
|
|
|
|
|
2008-10-31 23:20:19 +00:00
|
|
|
.DEFAULT_GOAL := all
|
|
|
|
|
2008-09-17 15:26:02 +00:00
|
|
|
ifeq (1,$(TOOLS))
|
|
|
|
include src/tools/Makefile
|
|
|
|
endif
|
|
|
|
|
2009-07-30 18:13:58 +00:00
|
|
|
# Only rebuild the TAGS file if one is already present by a previous
|
|
|
|
# call to "make tags". This is only useful for developers.
|
|
|
|
ifneq (,$(wildcard TAGS))
|
|
|
|
ifdef ETAGS
|
|
|
|
TAGSFILE = TAGS
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2009-08-10 19:20:11 +00:00
|
|
|
# Only rebuild the man pages if both xsltproc and the DocBook
|
|
|
|
# stylesheet have been found by configure.
|
|
|
|
ifeq ($(XSLTPROC_WORKS),yes)
|
|
|
|
MANPAGES_DEP = $(MANPAGES)
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(MANPAGES_DEP) $(TAGSFILE) $(APPLICATIONS) $(TRANSLATIONS_MOS) $(HTMLHELPBOOKS)
|
2004-07-18 15:06:33 +00:00
|
|
|
|
2005-09-03 12:47:14 +00:00
|
|
|
install: install-programs install-mans install-trans install-guide
|
2004-03-01 09:51:30 +00:00
|
|
|
|
|
|
|
install-programs: $(APPLICATIONS)
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
|
|
|
@list='$(APPLICATIONS)'; for p in $$list; do \
|
|
|
|
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
|
|
|
if test -f $$p ; then \
|
|
|
|
f=`echo "$$p1" | sed 's,^.*/,,;s/$$/$(EXEEXT)/'`; \
|
|
|
|
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
|
|
|
|
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
|
|
|
|
else :; fi; \
|
|
|
|
done
|
|
|
|
|
|
|
|
install-mans:
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(man1dir)
|
2005-09-03 12:47:14 +00:00
|
|
|
@for i in $(MANPAGES); do \
|
2004-03-01 09:51:30 +00:00
|
|
|
inst=`echo $$i | sed -e 's/^.*\///'`; \
|
|
|
|
echo " $(INSTALL_DATA) $$i $(DESTDIR)$(man1dir)/$$inst"; \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(man1dir)/$$inst; \
|
|
|
|
done
|
|
|
|
|
2004-07-18 15:06:33 +00:00
|
|
|
install-trans:
|
2005-09-03 12:47:14 +00:00
|
|
|
@for i in $(TRANSLATIONS); do \
|
|
|
|
echo "$(mkinstalldirs) $(DESTDIR)$(localedir)/$$i/LC_MESSAGES"; \
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(localedir)/$$i/LC_MESSAGES; \
|
|
|
|
echo "$(INSTALL_DATA) po/$$i.mo $(DESTDIR)$(localedir)/$$i/LC_MESSAGES/mkvtoolnix.mo"; \
|
|
|
|
$(INSTALL_DATA) po/$$i.mo $(DESTDIR)$(localedir)/$$i/LC_MESSAGES/mkvtoolnix.mo; \
|
|
|
|
done
|
|
|
|
|
|
|
|
install-guide:
|
2005-09-07 17:18:12 +00:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
|
2005-09-08 17:32:08 +00:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/images
|
2005-09-03 12:47:14 +00:00
|
|
|
@for i in doc/mkvmerge-gui.*; do \
|
2005-09-07 17:18:12 +00:00
|
|
|
echo " $(INSTALL_DATA) $$i $(DESTDIR)$(pkgdatadir)/"; \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdatadir)/; \
|
2005-09-03 12:47:14 +00:00
|
|
|
done
|
|
|
|
@for i in doc/images/*gif; do \
|
2005-09-08 17:32:08 +00:00
|
|
|
echo " $(INSTALL_DATA) $$i $(DESTDIR)$(pkgdatadir)/images/"; \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(pkgdatadir)/images/; \
|
2004-07-18 15:06:33 +00:00
|
|
|
done
|
|
|
|
|
2009-08-10 19:28:48 +00:00
|
|
|
manpages: $(MANPAGES)
|
|
|
|
|
2004-03-01 09:51:30 +00:00
|
|
|
# Some general rules
|
2004-11-14 12:41:02 +00:00
|
|
|
ifeq (1,$(LIBMTXCOMMONDLL))
|
|
|
|
%.o: %.cpp
|
|
|
|
@echo ' CXX ' $<
|
2009-08-10 19:20:11 +00:00
|
|
|
@if echo $@ | $(GREP) src.common > /dev/null 2>&1; then \
|
2004-11-14 12:41:02 +00:00
|
|
|
test x$(V) = "x1" && echo $(CXXCOMPILE) $(CXXFLAGS_SRC_COMMON) -c -o $@ $< ; \
|
2009-02-26 21:01:04 +00:00
|
|
|
$(CXXCOMPILE) $(CXXFLAGS_SRC_COMMON) -c -MMD -o $@ $< ; \
|
|
|
|
./handle_deps $@ $$? ; \
|
2004-11-14 12:41:02 +00:00
|
|
|
else \
|
|
|
|
test x$(V) = "x1" && echo $(CXXCOMPILE) $(CXXFLAGS_NO_SRC_COMMON) -c -o $@ $< ; \
|
2009-02-26 21:01:04 +00:00
|
|
|
$(CXXCOMPILE) $(CXXFLAGS_NO_SRC_COMMON)-MMD -c -o $@ $< ; \
|
|
|
|
./handle_deps $@ $$? ; \
|
2004-11-14 12:41:02 +00:00
|
|
|
fi
|
|
|
|
else
|
2004-03-01 09:51:30 +00:00
|
|
|
%.o: %.cpp
|
2004-07-18 15:06:33 +00:00
|
|
|
@echo ' CXX ' $<
|
2009-02-26 21:01:04 +00:00
|
|
|
$(Q)$(CXXCOMPILE) -MMD -c -o $@ $< ; ./handle_deps $@ $$?
|
2004-11-14 12:41:02 +00:00
|
|
|
endif
|
2004-03-01 09:51:30 +00:00
|
|
|
|
|
|
|
%.o: %.c
|
2004-07-18 15:06:33 +00:00
|
|
|
@echo ' CC ' $<
|
2009-02-26 21:01:04 +00:00
|
|
|
$(Q)$(CCOMPILE) -MMD -c -o $@ $< ; ./handle_deps $@ $$?
|
2004-07-18 15:06:33 +00:00
|
|
|
|
2005-01-08 18:32:52 +00:00
|
|
|
%.o: %.rc
|
|
|
|
@echo ' WINDRES ' $<
|
|
|
|
$(Q)$(RCCOMPILE) -o $@ $<
|
|
|
|
|
2004-07-18 15:06:33 +00:00
|
|
|
%.mo: %.po
|
|
|
|
@echo ' MSGFMT ' $<
|
|
|
|
$(Q)msgfmt -o $@ $<
|
2004-03-01 09:51:30 +00:00
|
|
|
|
2005-01-08 15:26:12 +00:00
|
|
|
# HTML help book stuff
|
|
|
|
%.hhk: %.hhc
|
|
|
|
@echo ' GREP ' $<
|
2009-08-10 19:20:11 +00:00
|
|
|
$(Q)$(GREP) -v 'name="ID"' $< > $@
|
|
|
|
|
|
|
|
# man pages from DocBook XML
|
|
|
|
%.1: %.xml
|
|
|
|
@echo 'XSLTPROC ' $<
|
|
|
|
$(Q)$(XSLTPROC) $(XSLTPROC_FLAGS) -o $@ $(DOCBOOK_MANPAGES_STYLESHEET) $<
|
2005-01-08 15:26:12 +00:00
|
|
|
|
2006-11-28 17:58:30 +00:00
|
|
|
# Qt files
|
|
|
|
%.h: %.ui
|
|
|
|
@echo ' UIC ' $<
|
|
|
|
$(Q)$(UIC) $< > $@
|
|
|
|
|
|
|
|
%.moc.cpp: %.h
|
|
|
|
@echo ' MOC ' $<
|
|
|
|
$(Q)$(MOC) $(QT_CFLAGS) $< > $@
|
|
|
|
|
2004-03-01 09:51:30 +00:00
|
|
|
clean:
|
2004-11-14 12:41:02 +00:00
|
|
|
rm -f *.o */*.o */*/*.o */lib*.a */*/lib*.a po/*.mo $(APPLICATIONS) \
|
2006-11-28 17:58:30 +00:00
|
|
|
*/*.exe */*/*.exe */*/*.dll */*/*.dll.a doc/*.hhk \
|
2009-05-21 10:08:39 +00:00
|
|
|
src/info/ui/*.h src/info/*.moc.cpp src/common/*/*.o \
|
|
|
|
src/mmg/*/*.o
|
2004-03-01 09:51:30 +00:00
|
|
|
|
|
|
|
distclean dist-clean: clean
|
2009-07-30 18:13:58 +00:00
|
|
|
rm -f config.h config.log config.cache Makefile */Makefile */*/Makefile TAGS
|
2009-02-26 21:01:04 +00:00
|
|
|
rm -rf .deps
|
2005-09-03 14:51:17 +00:00
|
|
|
|
|
|
|
maintainer-clean: distclean
|
|
|
|
rm -f configure config.h.in
|
2004-03-01 09:51:30 +00:00
|
|
|
|
2004-07-18 15:06:33 +00:00
|
|
|
update-po:
|
2008-12-12 16:06:48 +00:00
|
|
|
@echo 'XGETTEXT'
|
2009-08-07 13:18:32 +00:00
|
|
|
@xgettext --keyword=YT --keyword=Y --keyword=Z --keyword=TIP \
|
|
|
|
--default-domain=mkvtoolnix --from-code=UTF-8 -s --omit-header -o po/mkvtoolnix.pot \
|
2008-12-12 16:06:48 +00:00
|
|
|
$(ALL_SOURCES) $(ALL_HEADERS)
|
2004-07-18 15:06:33 +00:00
|
|
|
@for i in po/*.po ; do \
|
2008-12-12 16:06:48 +00:00
|
|
|
echo 'MSGMERGE ' $$i ; \
|
|
|
|
msgmerge -q -s --no-wrap $$i po/mkvtoolnix.pot > $$i.new ; \
|
2004-07-18 15:06:33 +00:00
|
|
|
mv $$i.new $$i ; \
|
|
|
|
done
|
|
|
|
@rm po/mkvtoolnix.pot
|
2009-05-19 17:25:44 +00:00
|
|
|
@for i in zh_CN zh_TW ; do \
|
|
|
|
perl -ni -e 'if (m/^#:/) { s/(\d) /$$1\n#: /g; print; } elsif (m/^#~/) { $$nonl = 1; print; } elsif (!($$nonl && m/^\s*$$/)) { print; }' po/$$i.po ; \
|
|
|
|
echo >> po/$$i.po ; \
|
|
|
|
done
|
2004-07-18 15:06:33 +00:00
|
|
|
|
2009-03-21 10:41:28 +00:00
|
|
|
po-stats po-statistics:
|
|
|
|
@for i in po/*.po ; do \
|
|
|
|
echo ' MSGFMT ' $$i ; \
|
|
|
|
msgfmt --statistics -o /dev/null $$i ; \
|
|
|
|
done
|
|
|
|
|
2005-01-08 15:26:12 +00:00
|
|
|
mkvmerge-gui-book: doc/mkvmerge-gui.hhk
|
|
|
|
|
2009-07-30 18:13:58 +00:00
|
|
|
tags: TAGS
|
|
|
|
|
|
|
|
TAGS: $(ALL_SOURCES)
|
|
|
|
@echo ' ETAGS'
|
|
|
|
$(Q)$(ETAGS) -o $@ $^
|
|
|
|
|
2004-03-01 09:51:30 +00:00
|
|
|
#
|
|
|
|
# avilib-0.6.10
|
|
|
|
#
|
|
|
|
|
2004-06-03 14:23:38 +00:00
|
|
|
libavi_SOURCES = $(wildcard avilib-0.6.10/*.c) $(wildcard avilib-0.6.10/*.cpp)
|
|
|
|
libavi_OBJECTS := $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(libavi_SOURCES)))
|
2004-03-01 09:51:30 +00:00
|
|
|
|
|
|
|
avilib-0.6.10/libavi.a: $(libavi_OBJECTS)
|
2004-07-18 15:06:33 +00:00
|
|
|
@rm -f $@
|
|
|
|
@echo ' AR ' $@
|
|
|
|
$(Q)$(RUNAR) $@ $(libavi_OBJECTS)
|
|
|
|
@echo ' RANLIB ' $@
|
|
|
|
$(Q)$(RANLIB) $@
|
2004-03-01 09:51:30 +00:00
|
|
|
|
2004-03-17 22:04:03 +00:00
|
|
|
#
|
|
|
|
# librmff
|
|
|
|
#
|
|
|
|
librmff_SOURCES = $(wildcard librmff/*.c)
|
|
|
|
librmff_OBJECTS := $(patsubst %.c,%.o,$(librmff_SOURCES))
|
|
|
|
|
|
|
|
librmff/librmff.a: $(librmff_OBJECTS)
|
2004-07-18 15:06:33 +00:00
|
|
|
@rm -f $@
|
|
|
|
@echo ' AR ' $@
|
|
|
|
$(Q)$(RUNAR) $@ $(librmff_OBJECTS)
|
|
|
|
@echo ' RANLIB ' $@
|
|
|
|
$(Q)$(RANLIB) $@
|
2004-03-17 22:04:03 +00:00
|
|
|
|
2004-11-02 20:51:07 +00:00
|
|
|
#
|
|
|
|
# spyder's MPEG parser
|
|
|
|
#
|
|
|
|
libmpegparser_SOURCES = $(wildcard src/mpegparser/*.cpp)
|
|
|
|
libmpegparser_OBJECTS := $(patsubst %.cpp,%.o,$(libmpegparser_SOURCES))
|
|
|
|
|
|
|
|
src/mpegparser/libmpegparser.a: $(libmpegparser_OBJECTS)
|
|
|
|
@rm -f $@
|
|
|
|
@echo ' AR ' $@
|
|
|
|
$(Q)$(RUNAR) $@ $(libmpegparser_OBJECTS)
|
|
|
|
@echo ' RANLIB ' $@
|
|
|
|
$(Q)$(RANLIB) $@
|
|
|
|
|
2004-03-01 09:51:30 +00:00
|
|
|
#
|
|
|
|
# src/common
|
|
|
|
#
|
|
|
|
|
2009-05-18 09:12:35 +00:00
|
|
|
libmtxcommon_SOURCES = $(wildcard src/common/*.cpp) $(wildcard src/common/*/*.cpp)
|
2004-03-01 09:51:30 +00:00
|
|
|
libmtxcommon_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxcommon_SOURCES))
|
|
|
|
|
|
|
|
src/common/libmtxcommon.dll: $(libmtxcommon_OBJECTS)
|
2004-07-18 15:06:33 +00:00
|
|
|
@echo ' LD/DLL ' $@
|
|
|
|
$(Q)$(LINKSHARED) -Wl,--out-implib=$@.a -o $@ $(libmtxcommon_OBJECTS) \
|
2005-05-02 14:55:09 +00:00
|
|
|
-liconv -lz $(COMPRESSION_LIBRARIES) -lmatroska -lebml \
|
|
|
|
-lexpat -lrpcrt4
|
2004-03-01 09:51:30 +00:00
|
|
|
|
|
|
|
src/common/libmtxcommon.a: $(libmtxcommon_OBJECTS)
|
2004-07-18 15:06:33 +00:00
|
|
|
@rm -f $@
|
|
|
|
@echo ' AR ' $@
|
|
|
|
$(Q)$(RUNAR) $@ $(libmtxcommon_OBJECTS)
|
|
|
|
@echo ' RANLIB ' $@
|
|
|
|
$(Q)$(RANLIB) $@
|
2004-03-01 09:51:30 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# src/input
|
|
|
|
#
|
|
|
|
|
|
|
|
libmtxinput_SOURCES = $(wildcard src/input/*.cpp)
|
|
|
|
libmtxinput_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxinput_SOURCES))
|
|
|
|
|
|
|
|
src/input/libmtxinput.a: $(libmtxinput_OBJECTS)
|
2004-07-18 15:06:33 +00:00
|
|
|
@rm -f $@
|
|
|
|
@echo ' AR ' $@
|
|
|
|
$(Q)$(RUNAR) $@ $(libmtxinput_OBJECTS)
|
|
|
|
@echo ' RANLIB ' $@
|
|
|
|
$(Q)$(RANLIB) $@
|
2004-03-01 09:51:30 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# src/output
|
|
|
|
#
|
|
|
|
|
|
|
|
libmtxoutput_SOURCES = $(wildcard src/output/*.cpp)
|
|
|
|
libmtxoutput_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxoutput_SOURCES))
|
|
|
|
|
|
|
|
src/output/libmtxoutput.a: $(libmtxoutput_OBJECTS)
|
2004-07-18 15:06:33 +00:00
|
|
|
@rm -f $@
|
|
|
|
@echo ' AR ' $@
|
|
|
|
$(Q)$(RUNAR) $@ $(libmtxoutput_OBJECTS)
|
|
|
|
@echo ' RANLIB ' $@
|
|
|
|
$(Q)$(RANLIB) $@
|
2004-03-01 09:51:30 +00:00
|
|
|
|
|
|
|
#
|
2004-11-09 18:21:59 +00:00
|
|
|
# src/merge
|
2004-03-01 09:51:30 +00:00
|
|
|
#
|
|
|
|
|
2004-11-09 18:21:59 +00:00
|
|
|
mkvmerge_SOURCES = $(wildcard src/merge/*.cpp)
|
2008-10-06 13:09:01 +00:00
|
|
|
mkvmerge_OBJECTS := $(patsubst %.cpp,%.o,$(mkvmerge_SOURCES)) \
|
|
|
|
$(patsubst %.rc,%.o,$(mkvmerge_RESOURCES))
|
2004-03-01 09:51:30 +00:00
|
|
|
mkvmerge_DEPENDENCIES += $(DEP_COMMON) \
|
2004-11-02 20:51:07 +00:00
|
|
|
$(DEP_COMP) $(DEP_INPUT) $(DEP_OUTPUT) $(DEP_AVI) $(DEP_RMFF) \
|
|
|
|
$(DEP_MPEGPARSER)
|
2004-03-01 09:51:30 +00:00
|
|
|
mkvmerge_LDADD = -lmtxinput -lmtxoutput \
|
2006-04-28 11:33:27 +00:00
|
|
|
-lmtxcommon $(MAGIC_LIBS) -lmatroska -lebml \
|
2004-11-02 20:51:07 +00:00
|
|
|
-lavi -lrmff -lmpegparser \
|
2004-03-17 22:04:03 +00:00
|
|
|
$(FLAC_LIBS) -lvorbis -logg -lz $(COMPRESSION_LIBRARIES) \
|
2008-08-30 12:45:54 +00:00
|
|
|
-lexpat $(ICONV_LIBS) $(LIBINTL_LIBS) $(LIBRPCRT) \
|
|
|
|
$(BOOST_REGEX_LIB)
|
2004-03-01 09:51:30 +00:00
|
|
|
|
2004-11-09 18:21:59 +00:00
|
|
|
#
|
|
|
|
# src/info
|
|
|
|
#
|
|
|
|
|
2006-11-28 17:58:30 +00:00
|
|
|
mkvinfo_SOURCES = src/info/mkvinfo.cpp src/info/console_ui.cpp
|
2008-12-17 18:00:44 +00:00
|
|
|
mkvinfo_LDADD = -lmtxcommon $(MAGIC_LIBS) -lmatroska -lebml \
|
|
|
|
$(BOOST_REGEX_LIB)
|
2006-11-28 17:58:30 +00:00
|
|
|
|
|
|
|
ifeq (yes,$(USE_QT))
|
|
|
|
mkvinfo_SOURCES += src/info/qt_ui.cpp src/info/qt_ui.moc.cpp \
|
|
|
|
src/info/rightclick_tree_widget.moc.cpp
|
|
|
|
mkvinfo_UIFILES = $(patsubst %.ui,%.h,$(wildcard src/info/ui/*.ui))
|
|
|
|
mkvinfo_LDADD += $(QT_LIBS)
|
|
|
|
|
|
|
|
src/info/qt_ui.o: $(wildcard src/info/ui/*.ui)
|
|
|
|
|
|
|
|
else
|
|
|
|
ifeq (yes,$(USE_WXWIDGETS))
|
|
|
|
mkvinfo_SOURCES += src/info/wxwidgets_ui.cpp
|
|
|
|
mkvinfo_LDADD += $(WXWIDGETS_LIBS)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2008-10-06 13:09:01 +00:00
|
|
|
mkvinfo_OBJECTS := $(patsubst %.cpp,%.o,$(mkvinfo_SOURCES)) \
|
|
|
|
$(patsubst %.rc,%.o,$(mkvinfo_RESOURCES))
|
2004-03-01 09:51:30 +00:00
|
|
|
mkvinfo_DEPENDENCIES += $(DEP_COMMON)
|
2006-11-28 17:58:30 +00:00
|
|
|
mkvinfo_LDADD += -lexpat $(ICONV_LIBS) $(LIBINTL_LIBS) $(LIBRPCRT)
|
|
|
|
|
2004-03-01 09:51:30 +00:00
|
|
|
|
2004-11-09 18:21:59 +00:00
|
|
|
#
|
|
|
|
# src/extract
|
|
|
|
#
|
|
|
|
|
2004-09-02 21:19:36 +00:00
|
|
|
mkvextract_SOURCES = $(wildcard src/extract/*.cpp)
|
2008-10-06 13:09:01 +00:00
|
|
|
mkvextract_OBJECTS := $(patsubst %.cpp,%.o,$(mkvextract_SOURCES)) \
|
|
|
|
$(patsubst %.rc,%.o,$(mkvextract_RESOURCES))
|
2004-03-22 19:13:26 +00:00
|
|
|
mkvextract_DEPENDENCIES += $(DEP_COMMON) $(DEP_AVILIB) $(DEP_RMFF)
|
2006-04-28 11:33:27 +00:00
|
|
|
mkvextract_LDADD = -lmtxcommon $(MAGIC_LIBS) -lvorbis -logg -lavi -lmatroska -lebml -lrmff \
|
2005-02-11 20:38:00 +00:00
|
|
|
$(ICONV_LIBS) $(LIBINTL_LIBS) -lexpat \
|
2008-10-11 14:11:55 +00:00
|
|
|
-lz $(COMPRESSION_LIBRARIES) $(LIBRPCRT) \
|
|
|
|
$(BOOST_REGEX_LIB)
|
2004-03-01 09:51:30 +00:00
|
|
|
|
2009-08-11 09:03:45 +00:00
|
|
|
#
|
|
|
|
# src/propedit
|
|
|
|
#
|
|
|
|
|
|
|
|
mkvpropedit_SOURCES = $(wildcard src/propedit/*.cpp)
|
|
|
|
mkvpropedit_OBJECTS := $(patsubst %.cpp,%.o,$(mkvpropedit_SOURCES)) \
|
|
|
|
$(patsubst %.rc,%.o,$(mkvpropedit_RESOURCES))
|
|
|
|
mkvpropedit_DEPENDENCIES += $(DEP_COMMON) $(DEP_AVILIB) $(DEP_RMFF)
|
|
|
|
mkvpropedit_LDADD = -lmtxcommon $(MAGIC_LIBS) -lvorbis -logg -lavi -lmatroska -lebml -lrmff \
|
|
|
|
$(ICONV_LIBS) $(LIBINTL_LIBS) -lexpat \
|
|
|
|
-lz $(COMPRESSION_LIBRARIES) $(LIBRPCRT) \
|
|
|
|
$(BOOST_REGEX_LIB)
|
|
|
|
|
2004-11-09 18:21:59 +00:00
|
|
|
#
|
|
|
|
# src/mmg
|
|
|
|
#
|
|
|
|
|
2009-05-21 10:08:39 +00:00
|
|
|
mmg_SOURCES = $(wildcard src/mmg/*.cpp) $(wildcard src/mmg/*/*.cpp)
|
2005-01-08 18:32:52 +00:00
|
|
|
mmg_OBJECTS := $(patsubst %.cpp,%.o,$(mmg_SOURCES)) \
|
2008-10-06 13:09:01 +00:00
|
|
|
$(patsubst %.rc,%.o,$(mmg_RESOURCES))
|
2004-03-01 09:51:30 +00:00
|
|
|
mmg_DEPENDENCIES += $(DEP_COMMON)
|
2006-04-28 11:33:27 +00:00
|
|
|
mmg_LDADD = -lmtxcommon $(MAGIC_LIBS) -lmatroska -lebml -lexpat $(ICONV_LIBS) \
|
2006-11-11 10:42:32 +00:00
|
|
|
$(WXWIDGETS_LIBS) $(LIBINTL_LIBS) $(MINGW_GUIAPP) \
|
2008-12-17 18:00:44 +00:00
|
|
|
$(BOOST_REGEX_LIB) $(LIBRPCRT)
|
2004-03-01 09:51:30 +00:00
|
|
|
|
2004-11-17 08:50:05 +00:00
|
|
|
mkvmerge: src/mkvmerge@EXEEXT@
|
|
|
|
|
2004-11-14 12:41:02 +00:00
|
|
|
src/mkvmerge@EXEEXT@: $(mkvmerge_OBJECTS) $(mkvmerge_DEPENDENCIES)
|
2004-07-18 15:06:33 +00:00
|
|
|
@echo ' LINK ' $@
|
|
|
|
$(Q)$(LINK) -o $@ $(mkvmerge_OBJECTS) $(mkvmerge_LDADD)
|
2004-03-01 09:51:30 +00:00
|
|
|
|
2004-11-17 08:50:05 +00:00
|
|
|
mkvinfo: src/mkvinfo@EXEEXT@
|
|
|
|
|
2006-11-28 17:58:30 +00:00
|
|
|
src/mkvinfo@EXEEXT@: $(mkvinfo_UIFILES) $(mkvinfo_OBJECTS) $(mkvinfo_DEPENDENCIES)
|
2004-07-18 15:06:33 +00:00
|
|
|
@echo ' LINK ' $@
|
|
|
|
$(Q)$(LINK) -o $@ $(mkvinfo_OBJECTS) $(mkvinfo_LDADD)
|
2004-03-01 09:51:30 +00:00
|
|
|
|
2004-11-17 08:50:05 +00:00
|
|
|
mkvextract: src/mkvextract@EXEEXT@
|
|
|
|
|
2004-11-14 12:41:02 +00:00
|
|
|
src/mkvextract@EXEEXT@: $(mkvextract_OBJECTS) $(mkvextract_DEPENDENCIES)
|
2004-07-18 15:06:33 +00:00
|
|
|
@echo ' LINK ' $@
|
|
|
|
$(Q)$(LINK) -o $@ $(mkvextract_OBJECTS) $(mkvextract_LDADD)
|
2004-03-01 09:51:30 +00:00
|
|
|
|
2009-08-11 09:03:45 +00:00
|
|
|
mkvpropedit: src/mkvpropedit@EXEEXT@
|
|
|
|
|
|
|
|
src/mkvpropedit@EXEEXT@: $(mkvpropedit_OBJECTS) $(mkvpropedit_DEPENDENCIES)
|
|
|
|
@echo ' LINK ' $@
|
|
|
|
$(Q)$(LINK) -o $@ $(mkvpropedit_OBJECTS) $(mkvpropedit_LDADD)
|
|
|
|
|
2004-11-17 08:50:05 +00:00
|
|
|
mmg: src/mmg/mmg@EXEEXT@
|
|
|
|
|
2004-11-14 12:41:02 +00:00
|
|
|
src/mmg/mmg@EXEEXT@: $(mmg_OBJECTS) $(mmg_DEPENDENCIES)
|
2004-07-18 15:06:33 +00:00
|
|
|
@echo ' LINK ' $@
|
|
|
|
$(Q)$(LINK) -o $@ $(mmg_OBJECTS) $(mmg_LDADD)
|
2004-03-01 09:51:30 +00:00
|
|
|
|
2006-11-28 17:58:30 +00:00
|
|
|
.SECONDARY:
|
|
|
|
|
2004-03-01 09:51:30 +00:00
|
|
|
#
|
|
|
|
# include dependency files if they exist
|
|
|
|
#
|
2009-02-26 21:01:04 +00:00
|
|
|
-include ./.deps/*.d
|