mkvtoolnix/Makefile.in

456 lines
12 KiB
Makefile
Raw Normal View History

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@
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
localedir = $(datadir)/locale
2004-03-01 09:51:30 +00:00
# Common programs
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@
AR = @AR@
CC = @CC@
CPP = @CPP@
CXX = @CXX@
LD = @LD@
PROFILING_CFLAGS = @PROFILING_CFLAGS@
PROFILING_LIBS = @PROFILING_LIBS@
RANLIB = @RANLIB@
STRIP = @STRIP@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
GCC_DEP_STYLE = @GCC_DEP_STYLE@
2004-03-01 09:51:30 +00:00
# Variable stuff as set by configure
BZ2_LIBS = @BZ2_LIBS@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
EBML_CFLAGS = @EBML_CFLAGS@
EBML_LIBS = @EBML_LIBS@
EXPAT_CFLAGS = @EXPAT_CFLAGS@
EXPAT_LIBS = @EXPAT_LIBS@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
FLAC_LIBS = @FLAC_LIBS@
ICONV_LIBS = @ICONV_LIBS@
LZO_LIBS = @LZO_LIBS@
MATROSKA_CFLAGS = @MATROSKA_CFLAGS@
MATROSKA_LIBS = @MATROSKA_LIBS@
MINGW_GUIAPP = @MINGW_GUIAPP@
MINGW_LIBS = @MINGW_LIBS@
MINGW = @MINGW@
2004-03-01 09:51:30 +00:00
OGG_LIBS = @OGG_LIBS@
VORBIS_LIBS = @VORBIS_LIBS@
WXWINDOWS_CFLAGS = @WXWINDOWS_CFLAGS@
WXWINDOWS_INCLUDES = @WXWINDOWS_INCLUDES@
2004-03-01 09:51:30 +00:00
WXWINDOWS_LIBS = @WXWINDOWS_LIBS@
ZLIB_LIBS = @ZLIB_LIBS@
LIBINTL_LIBS = @LIBINTL_LIBS@
2004-03-01 09:51:30 +00:00
CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
CFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\"
CXXFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\"
CXXFLAGS += -DMTX_LOCALE_DIR=\"$(localedir)\"
2004-03-01 09:51:30 +00:00
# Which additional stuff to compile
USE_WXWINDOWS = @USE_WXWINDOWS@
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
ifeq (1,$(MINGW))
MMG_RESOURCES = src/mmg/mmg-resources.rc
LIBRPCRT = -lrpcrt4
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)
DEP_RMFF = librmff/librmff.a
DEP_MPEGPARSER = src/mpegparser/libmpegparser.a
2004-03-01 09:51:30 +00:00
COMPRESSION_LIBRARIES = $(LZO_LIBS) $(BZ2_LIBS)
2004-11-14 12:41:02 +00:00
APPLICATIONS = src/mkvmerge@EXEEXT@ src/mkvinfo@EXEEXT@ \
src/mkvextract@EXEEXT@ src/base64tool@EXEEXT@
2004-03-01 09:51:30 +00:00
MANPAGES = doc/mkvmerge.1 doc/mkvinfo.1 doc/mkvextract.1 doc/base64tool.1
ifeq (yes,$(USE_WXWINDOWS))
2004-11-14 12:41:02 +00:00
APPLICATIONS += src/mmg/mmg@EXEEXT@
2004-03-01 09:51:30 +00:00
MANPAGES += doc/mmg.1
endif
TRANSLATIONS = @TRANSLATIONS@
TRANSLATIONS_POS = @TRANSLATIONS_POS@
TRANSLATIONS_MOS = $(patsubst %.po,%.mo,$(TRANSLATIONS_POS))
2004-03-01 09:51:30 +00:00
HTMLHELPBOOKS = mkvmerge-gui-book
all: $(APPLICATIONS) $(TRANSLATIONS_MOS) $(HTMLHELPBOOKS)
install: install-programs install-mans install-trans
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; \
$(STRIP) $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
install-mans:
$(mkinstalldirs) $(DESTDIR)$(man1dir)
for i in $(MANPAGES); do \
inst=`echo $$i | sed -e 's/^.*\///'`; \
echo " $(INSTALL_DATA) $$i $(DESTDIR)$(man1dir)/$$inst"; \
$(INSTALL_DATA) $$i $(DESTDIR)$(man1dir)/$$inst; \
done
install-trans:
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
2004-06-12 17:42:42 +00:00
SYSTEM_INCLUDES = $(AVILIB_INCLUDES) \
-I. -Ilibrmff -Isrc/merge -Isrc/info -Isrc/common -Isrc/input \
-Isrc/output -Isrc/mpegparser
2004-06-12 17:42:42 +00:00
SYSTEM_LIBDIRS = $(AVILIB_LIBDIRS) \
-Llibrmff -Lsrc/common -Lsrc/input -Lsrc/output \
-Lsrc/mpegparser
2004-03-01 09:51:30 +00:00
RUNAR = $(AR) rcu
LINK = $(CXX) $(LDFLAGS) $(LIBDIRS) $(SYSTEM_LIBDIRS)
2004-11-14 12:41:02 +00:00
LINKSHARED = $(CXX) $(LDFLAGS) $(LIBDIRS) $(SYSTEM_LIBDIRS) \
-shared -Wl,--export-all
2004-03-01 09:51:30 +00:00
CXXCOMPILE = $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES)
CCOMPILE = $(CC) $(CFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES)
RCCOMPILE = windres $(WXWINDOWS_INCLUDES) -Isrc/mmg
2004-03-01 09:51:30 +00:00
2004-10-28 15:27:08 +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) \
$(wildcard src/mmg/*.cpp) $(wildcard src/extract/*.cpp) \
$(wildcard src/merge/*cpp) $(wildcard src/info/*.cpp) \
$(wildcard src/mpegparser/*.cpp)
ifeq ($(V),1)
Q =
else
Q = @
endif
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 ' $<
@if echo $@ | grep src.common > /dev/null 2>&1; then \
test x$(V) = "x1" && echo $(CXXCOMPILE) $(CXXFLAGS_SRC_COMMON) -c -o $@ $< ; \
$(CXXCOMPILE) $(CXXFLAGS_SRC_COMMON) -c -o $@ $< ; \
else \
test x$(V) = "x1" && echo $(CXXCOMPILE) $(CXXFLAGS_NO_SRC_COMMON) -c -o $@ $< ; \
$(CXXCOMPILE) $(CXXFLAGS_NO_SRC_COMMON) -c -o $@ $< ; \
fi
else
2004-03-01 09:51:30 +00:00
%.o: %.cpp
@echo ' CXX ' $<
$(Q)$(CXXCOMPILE) -c -o $@ $<
2004-11-14 12:41:02 +00:00
endif
2004-03-01 09:51:30 +00:00
%.o: %.c
@echo ' CC ' $<
$(Q)$(CCOMPILE) -c -o $@ $<
%.o: %.rc
@echo ' WINDRES ' $<
$(Q)$(RCCOMPILE) -o $@ $<
%.mo: %.po
@echo ' MSGFMT ' $<
$(Q)msgfmt -o $@ $<
2004-03-01 09:51:30 +00:00
# HTML help book stuff
%.hhk: %.hhc
@echo ' GREP ' $<
$(Q)grep -v 'name="ID"' $< > $@
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) \
*/*.exe */*/*.exe */*/*.dll */*/*.dll.a doc/*.hhk
2004-03-01 09:51:30 +00:00
distclean dist-clean: clean
2004-11-14 12:41:02 +00:00
rm -f configure config.h config.h.in config.log config.cache \
2004-03-01 09:51:30 +00:00
Makefile */Makefile */*/Makefile
depend:
@echo Calculating dependecies:
@rm -f .depend
@touch .depend
ifeq (v2,$(GCC_DEP_STYLE))
@for i in $(ALL_SOURCES); do \
o="`dirname "$$i"`/" ; \
echo ' CXX -MM '$$i ; \
$(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM $$i | \
awk 'BEGIN { pfx="'$$o'" } { print pfx $$0 ; pfx="" }' \
>> .depend ; \
done
else
@for i in $(ALL_SOURCES); do \
2004-03-01 09:51:30 +00:00
o="`echo $$i | sed -e 's/\.c$$/.o/' -e 's/\.cpp$$/.o/'`" ; \
echo ' CXX -MM '$$i ; \
2004-03-01 09:51:30 +00:00
$(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \
-MT $$o $$i >> .depend ; \
done
endif
2004-03-01 09:51:30 +00:00
update-po:
xgettext --keyword=_ --keyword=N_ --default-domain=mkvtoolnix \
-o po/mkvtoolnix.pot $(ALL_SOURCES)
@for i in po/*.po ; do \
echo msgmerge -s $$i po/mkvtoolnix.pot ; \
msgmerge -s $$i po/mkvtoolnix.pot > $$i.new ; \
mv $$i.new $$i ; \
done
@rm po/mkvtoolnix.pot
mkvmerge-gui-book: doc/mkvmerge-gui.hhk
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)
@rm -f $@
@echo ' AR ' $@
$(Q)$(RUNAR) $@ $(libavi_OBJECTS)
@echo ' RANLIB ' $@
$(Q)$(RANLIB) $@
2004-03-01 09:51:30 +00:00
#
# librmff
#
librmff_SOURCES = $(wildcard librmff/*.c)
librmff_OBJECTS := $(patsubst %.c,%.o,$(librmff_SOURCES))
librmff/librmff.a: $(librmff_OBJECTS)
@rm -f $@
@echo ' AR ' $@
$(Q)$(RUNAR) $@ $(librmff_OBJECTS)
@echo ' RANLIB ' $@
$(Q)$(RANLIB) $@
#
# 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
#
libmtxcommon_SOURCES = $(wildcard src/common/*.cpp)
libmtxcommon_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxcommon_SOURCES))
src/common/libmtxcommon.dll: $(libmtxcommon_OBJECTS)
@echo ' LD/DLL ' $@
$(Q)$(LINKSHARED) -Wl,--out-implib=$@.a -o $@ $(libmtxcommon_OBJECTS) \
-liconv -lz $(COMPRESSION_LIBRARIES) -lmatroska -lebml \
-lexpat -lrpcrt4
2004-03-01 09:51:30 +00:00
src/common/libmtxcommon.a: $(libmtxcommon_OBJECTS)
@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)
@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)
@rm -f $@
@echo ' AR ' $@
$(Q)$(RUNAR) $@ $(libmtxoutput_OBJECTS)
@echo ' RANLIB ' $@
$(Q)$(RANLIB) $@
2004-03-01 09:51:30 +00:00
#
# src/merge
2004-03-01 09:51:30 +00:00
#
mkvmerge_SOURCES = $(wildcard src/merge/*.cpp)
2004-03-01 09:51:30 +00:00
mkvmerge_OBJECTS := $(patsubst %.cpp,%.o,$(mkvmerge_SOURCES))
mkvmerge_DEPENDENCIES += $(DEP_COMMON) \
$(DEP_COMP) $(DEP_INPUT) $(DEP_OUTPUT) $(DEP_AVI) $(DEP_RMFF) \
$(DEP_MPEGPARSER)
2004-03-01 09:51:30 +00:00
mkvmerge_LDADD = -lmtxinput -lmtxoutput \
-lmtxcommon -lmatroska -lebml \
-lavi -lrmff -lmpegparser \
$(FLAC_LIBS) -lvorbis -logg -lz $(COMPRESSION_LIBRARIES) \
-lexpat $(ICONV_LIBS) $(LIBINTL_LIBS) $(LIBRPCRT)
2004-03-01 09:51:30 +00:00
#
# src/info
#
mkvinfo_SOURCES = $(wildcard src/info/*.cpp)
2004-03-01 09:51:30 +00:00
mkvinfo_OBJECTS := $(patsubst %.cpp,%.o,$(mkvinfo_SOURCES))
mkvinfo_DEPENDENCIES += $(DEP_COMMON)
mkvinfo_LDADD = -lmtxcommon -lmatroska -lebml \
2004-10-17 15:16:11 +00:00
$(WXWINDOWS_LIBS) \
-lexpat $(ICONV_LIBS) $(LIBINTL_LIBS) $(LIBRPCRT)
2004-03-01 09:51:30 +00:00
#
# src/extract
#
mkvextract_SOURCES = $(wildcard src/extract/*.cpp)
2004-03-01 09:51:30 +00:00
mkvextract_OBJECTS := $(patsubst %.cpp,%.o,$(mkvextract_SOURCES))
mkvextract_DEPENDENCIES += $(DEP_COMMON) $(DEP_AVILIB) $(DEP_RMFF)
mkvextract_LDADD = -lmtxcommon -lvorbis -logg -lavi -lmatroska -lebml -lrmff \
$(ICONV_LIBS) $(LIBINTL_LIBS) -lexpat \
-lz $(COMPRESSION_LIBRARIES) $(LIBRPCRT)
2004-03-01 09:51:30 +00:00
#
# src
#
2004-03-01 09:51:30 +00:00
base64tool_SOURCES = src/base64tool.cpp
base64tool_OBJECTS := $(patsubst %.cpp,%.o,$(base64tool_SOURCES))
base64tool_DEPENDENCIES += $(DEP_COMMON)
base64tool_LDADD = -lmtxcommon -lexpat $(ICONV_LIBS) $(LIBINTL_LIBS) \
$(LIBRPCRT)
2004-03-01 09:51:30 +00:00
#
# src/mmg
#
2004-03-01 09:51:30 +00:00
mmg_SOURCES = $(wildcard src/mmg/*.cpp)
mmg_OBJECTS := $(patsubst %.cpp,%.o,$(mmg_SOURCES)) \
$(patsubst %.rc,%.o,$(MMG_RESOURCES))
2004-03-01 09:51:30 +00:00
mmg_DEPENDENCIES += $(DEP_COMMON)
mmg_LDADD = -lmtxcommon -lmatroska -lebml -lexpat $(ICONV_LIBS) \
$(WXWINDOWS_LIBS) $(LIBINTL_LIBS) $(MINGW_GUIAPP) \
$(LIBRPCRT)
2004-03-01 09:51:30 +00:00
mkvmerge: src/mkvmerge@EXEEXT@
2004-11-14 12:41:02 +00:00
src/mkvmerge@EXEEXT@: $(mkvmerge_OBJECTS) $(mkvmerge_DEPENDENCIES)
@echo ' LINK ' $@
$(Q)$(LINK) -o $@ $(mkvmerge_OBJECTS) $(mkvmerge_LDADD)
2004-03-01 09:51:30 +00:00
mkvinfo: src/mkvinfo@EXEEXT@
2004-11-14 12:41:02 +00:00
src/mkvinfo@EXEEXT@: $(mkvinfo_OBJECTS) $(mkvinfo_DEPENDENCIES)
@echo ' LINK ' $@
$(Q)$(LINK) -o $@ $(mkvinfo_OBJECTS) $(mkvinfo_LDADD)
2004-03-01 09:51:30 +00:00
mkvextract: src/mkvextract@EXEEXT@
2004-11-14 12:41:02 +00:00
src/mkvextract@EXEEXT@: $(mkvextract_OBJECTS) $(mkvextract_DEPENDENCIES)
@echo ' LINK ' $@
$(Q)$(LINK) -o $@ $(mkvextract_OBJECTS) $(mkvextract_LDADD)
2004-03-01 09:51:30 +00:00
base64tool: src/base64tool@EXEEXT@
2004-11-14 12:41:02 +00:00
src/base64tool@EXEEXT@: $(base64tool_OBJECTS) $(base64tool_DEPENDENCIES)
@echo ' LINK ' $@
$(Q)$(LINK) -o $@ $(base64tool_OBJECTS) $(base64tool_LDADD)
2004-03-01 09:51:30 +00:00
mmg: src/mmg/mmg@EXEEXT@
2004-11-14 12:41:02 +00:00
src/mmg/mmg@EXEEXT@: $(mmg_OBJECTS) $(mmg_DEPENDENCIES)
@echo ' LINK ' $@
$(Q)$(LINK) -o $@ $(mmg_OBJECTS) $(mmg_LDADD)
2004-03-01 09:51:30 +00:00
#
# include dependency files if they exist
#
ifneq ($(wildcard .depend),)
include .depend
endif