diff --git a/Makefile.mingw b/Makefile.mingw index d6cdb7a79..19ccbd38f 100644 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -2,7 +2,52 @@ # because I was fed up fighting against libtool # Put all the user changeable options into one file -include Makefile.mingw.options +include Makefile.options + +ifneq (,$(DEBUG)) +CFLAGS += -g -DDEBUG +CXXFLAGS += -g -DDEBUG +endif + +ifneq (,$(findstring aviclasses,$(AVILIB))) +CXXFLAGS += -DHAVE_AVICLASSES=1 +AVICLASSES_INCLUDES = -Iaviclasses +AVICLASSES_LIBDIRS = -Laviclasses +AVICLASSES_LIBRARIES = -laviclasses +DEP_AVICLASSES = aviclasses/libaviclasses.a +endif + +ifneq (,$(findstring bzlib,$(COMPRESSION_LIBS))) +CXXFLAGS += -DHAVE_BZLIB_H=1 +COMPRESSION_LIBRARIES = -lbz2 +endif + +ifneq (,$(findstring lzo,$(COMPRESSION_LIBS))) +CXXFLAGS += -DHAVE_LZO1X_H=1 +COMPRESSION_LIBRARIES += -llzo1x +endif + +ifneq (,$(WXWINDOWS)) +WXWINDOWS_LIBS = $(shell wx-config --libs) +WXWINDOWS_LDFLAGS = $(shell wx-config --ldflags) +CXXFLAGS += -DHAVE_WXWINDOWS=1 $(shell wx-config --cflags) +endif + +ifneq (,$(findstring yes,$(MTX_DLLS))) +DEP_COMMON = src/common/libmtxcommon.dll +DEP_EBMLCOMMON = src/common/libmtxebmlcommon.dll +DEP_KAXCOMMON = src/common/libmtxkaxcommon.dll +CXXFLAGS_SRC_COMMON += -DMTX_DLL_EXPORT +CXXFLAGS_NO_SRC_COMMON += -DMTX_DLL +else +DEP_COMMON = src/common/libmtxcommon.a +DEP_EBMLCOMMON = src/common/libmtxebmlcommon.a +DEP_KAXCOMMON = src/common/libmtxkaxcommon.a +endif +DEP_INPUT = src/input/libmtxinput.a +DEP_OUTPUT = src/output/libmtxoutput.a +DEP_AVILIB = avilib-0.6.10/libavi.a +DEP_AVI = $(DEP_AVILIB) $(DEP_AVICLASSES) # # System settings. Don't change anything below here. @@ -13,6 +58,175 @@ else SUBDIRS = avilib-0.6.10 src endif -all: subdirs +APPLICATIONS=src/mkvmerge src/mkvinfo src/mkvextract src/base64tool src/mmg -include Makefile.mingw.common +all: config.h $(APPLICATIONS) + +SYSTEM_INCLUDES = -Iavilib-0.6.10 $(AVICLASSES_INCLUDES) \ + -I. -Isrc -Isrc/common -Isrc/input -Isrc/output +SYSTEM_LIBDIRS = -Lavilib-0.6.10 $(AVICLASSES_LIBDIRS) \ + -Lsrc/common -Lsrc/input -Lsrc/output + +RUNAR = $(AR) rcu +LINK = $(LD) $(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) + +# Some general rules +%.o: %.cpp + @if echo $@ | grep src/common > /dev/null 2>&1; then \ + echo $(CXXCOMPILE) $(CXXFLAGS_SRC_COMMON) -c -o $@ $< ; \ + $(CXXCOMPILE) $(CXXFLAGS_SRC_COMMON) -c -o $@ $< ; \ + else \ + echo $(CXXCOMPILE) $(CXXFLAGS_NO_SRC_COMMON) -c -o $@ $< ; \ + $(CXXCOMPILE) $(CXXFLAGS_NO_SRC_COMMON) -c -o $@ $< ; \ + fi + +%.o: %.c + $(CCOMPILE) -c -o $@ $< + +clean: + rm -f *.o */*.o */*/*.o */lib*.a */*/lib*.a */*/*.dll */*.exe + +depend: + @echo Calculating dependecies: + @rm -f .depend + @touch .depend + @for i in */*.c */*.cpp */*/*.cpp; do \ + o="`echo $$i | sed -e 's/\.c$$/.o/' -e 's/\.cpp$$/.o/'`" ; \ + echo ' ' $$i: $$o ; \ + $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ + $$i | sed "s;^.*o: ;$${o}: ;" >> .depend ; \ + done + +config.h: configure.in + @echo configure.in is newer than config.h. Re-run autogen.sh. + @false + +# +# avilib-0.6.10 +# + +libavi_SOURCES = $(wildcard avilib-0.6.10/*.c) +libavi_OBJECTS := $(patsubst %.c,%.o,$(libavi_SOURCES)) + +avilib-0.6.10/libavi.a: $(libavi_OBJECTS) + rm -f $@ + $(RUNAR) $@ $(libavi_OBJECTS) + $(RANLIB) $@ + +# +# aviclasses +# + +libaviclasses_SOURCES = $(wildcard aviclasses/*.cpp) +libaviclasses_OBJECTS := $(patsubst %.cpp,%.o,$(libaviclasses_SOURCES)) + +aviclasses/libaviclasses.a: $(libaviclasses_OBJECTS) + rm -f $@ + $(RUNAR) $@ $(libaviclasses_OBJECTS) + $(RANLIB) $@ + +# +# src/common +# + +libmtxcommon_SOURCES = $(wildcard src/common/*.cpp) +libmtxcommon_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxcommon_SOURCES)) + +src/common/libmtxcommon.dll: $(libmtxcommon_OBJECTS) + $(LINKSHARED) -Wl,--out-implib=$@.a -o $@ $(libmtxcommon_OBJECTS) \ + -liconv -lz $(COMPRESSION_LIBRARIES) -lmatroska -lebml -lexpat + +src/common/libmtxcommon.a: $(libmtxcommon_OBJECTS) + rm -f $@ + $(RUNAR) $@ $(libmtxcommon_OBJECTS) + $(RANLIB) $@ + +# +# src/input +# + +libmtxinput_SOURCES = $(wildcard src/input/*.cpp) +libmtxinput_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxinput_SOURCES)) + +src/input/libmtxinput.a: $(libmtxinput_OBJECTS) + rm -f $@ + $(RUNAR) $@ $(libmtxinput_OBJECTS) + $(RANLIB) $@ + +# +# src/output +# + +libmtxoutput_SOURCES = $(wildcard src/output/*.cpp) +libmtxoutput_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxoutput_SOURCES)) + +src/output/libmtxoutput.a: $(libmtxoutput_OBJECTS) + rm -f $@ + $(RUNAR) $@ $(libmtxoutput_OBJECTS) + $(RANLIB) $@ + +# +# src +# + +mkvmerge_SOURCES = src/mkvmerge.cpp \ + src/cluster_helper.cpp \ + src/pr_generic.cpp +mkvmerge_OBJECTS := $(patsubst %.cpp,%.o,$(mkvmerge_SOURCES)) +mkvmerge_DEPENDENCIES += $(DEP_COMMON) \ + $(DEP_COMP) $(DEP_INPUT) $(DEP_OUTPUT) $(DEP_AVI) +mkvmerge_LDADD = -lmtxinput -lmtxoutput \ + -lmtxcommon -lmatroska -lebml \ + -lavi $(AVICLASSES_LIBDIRS) $(AVICLASSES_LIBRARIES) \ + -lvorbis -lflac -logg -lz $(COMPRESSION_LIBRARIES) \ + -lexpat -liconv + +mkvinfo_SOURCES = $(wildcard src/mkvinfo*.cpp) +mkvinfo_OBJECTS := $(patsubst %.cpp,%.o,$(mkvinfo_SOURCES)) +mkvinfo_DEPENDENCIES += $(DEP_COMMON) +mkvinfo_LDADD = -lmtxcommon -lmatroska -lebml \ + $(WXWINDOWS_LDFLAGS) $(WXWINDOWS_LIBS) \ + -liconv + +mkvextract_SOURCES = $(wildcard src/mkvextract*.cpp) +mkvextract_OBJECTS := $(patsubst %.cpp,%.o,$(mkvextract_SOURCES)) +mkvextract_DEPENDENCIES += $(DEP_COMMON) $(DEP_AVILIB) +mkvextract_LDADD = -lmtxcommon -lvorbis -logg -lavi -lmatroska -lebml -liconv + +base64tool_SOURCES = src/base64tool.cpp +base64tool_OBJECTS := $(patsubst %.cpp,%.o,$(base64tool_SOURCES)) +base64tool_DEPENDENCIES += $(DEP_COMMON) +base64tool_LDADD = -lmtxcommon -liconv + +mmg_SOURCES = $(wildcard src/mmg/*.cpp) +mmg_OBJECTS := $(patsubst %.cpp,%.o,$(mmg_SOURCES)) +mmg_DEPENDENCIES += $(DEP_COMMON) +mmg_LDADD = -lmtxcommon -lmatroska -lebml -liconv -lexpat \ + $(WXWINDOWS_LDFLAGS) $(WXWINDOWS_LIBS) \ + -mwindows + +src/mkvmerge: $(mkvmerge_OBJECTS) $(mkvmerge_DEPENDENCIES) + $(LINK) -o $@ $(mkvmerge_OBJECTS) $(mkvmerge_LDADD) + +src/mkvinfo: $(mkvinfo_OBJECTS) $(mkvinfo_DEPENDENCIES) + $(LINK) -o $@ $(mkvinfo_OBJECTS) $(mkvinfo_LDADD) + +src/mkvextract: $(mkvextract_OBJECTS) $(mkvextract_DEPENDENCIES) + $(LINK) -o $@ $(mkvextract_OBJECTS) $(mkvextract_LDADD) + +src/base64tool: $(base64tool_OBJECTS) $(base64tool_DEPENDENCIES) + $(LINK) -o $@ $(base64tool_OBJECTS) $(base64tool_LDADD) + +src/mmg: $(mmg_OBJECTS) $(mmg_DEPENDENCIES) + $(LINK) -o $@ $(mmg_OBJECTS) $(mmg_LDADD) + +# +# include dependency files if they exist +# +ifneq ($(wildcard .depend),) +include .depend +endif diff --git a/Makefile.mingw.options b/Makefile.mingw.options index 4e846c913..be69df4da 100644 --- a/Makefile.mingw.options +++ b/Makefile.mingw.options @@ -1,5 +1,4 @@ # Add paths here for your other include files. -TOP=c:/cygwin/usr/local/src/mkvtoolnix INCLUDES = -Ic:/cygwin/usr/local/src/libebml \ -Ic:/cygwin/usr/local/src/libmatroska \ -Ic:/cygwin/usr/local/include @@ -38,51 +37,3 @@ CC = gcc.exe LD = g++.exe AR = ar.exe RANLIB = ranlib.exe - -# -# Don't chagen anything below this line. -# -ifneq (,$(DEBUG)) -CFLAGS += -g -DDEBUG -CXXFLAGS += -g -DDEBUG -endif - -ifneq (,$(findstring aviclasses,$(AVILIB))) -CXXFLAGS += -DHAVE_AVICLASSES=1 -AVICLASSES_INCLUDES = -I$(TOP)/aviclasses -AVICLASSES_LIBDIRS = -L$(TOP)/aviclasses -AVICLASSES_LIBRARIES = -laviclasses -DEP_AVICLASSES = $(TOP)/aviclasses/libaviclasses.a -endif - -ifneq (,$(findstring bzlib,$(COMPRESSION_LIBS))) -CXXFLAGS += -DHAVE_BZLIB_H=1 -COMPRESSION_LIBRARIES = -lbz2 -endif - -ifneq (,$(findstring lzo,$(COMPRESSION_LIBS))) -CXXFLAGS += -DHAVE_LZO1X_H=1 -COMPRESSION_LIBRARIES += -llzo1x -endif - -ifneq (,$(WXWINDOWS)) -CXXFLAGS += -DHAVE_WXWINDOWS=1 -WXWINDOWS_LIBS = $(shell wx-config --libs) -WXWINDOWS_CFLAGS = $(shell wx-config --cflags) -WXWINDOWS_LDFLAGS = $(shell wx-config --ldflags) -endif - -ifneq (,$(findstring yes,$(MTX_DLLS))) -DEP_COMMON = $(TOP)/src/common/libmtxcommon.dll -DEP_EBMLCOMMON = $(TOP)/src/common/libmtxebmlcommon.dll -DEP_KAXCOMMON = $(TOP)/src/common/libmtxkaxcommon.dll -CXXFLAGS += -DMTX_DLL -else -DEP_COMMON = $(TOP)/src/common/libmtxcommon.a -DEP_EBMLCOMMON = $(TOP)/src/common/libmtxebmlcommon.a -DEP_KAXCOMMON = $(TOP)/src/common/libmtxkaxcommon.a -endif -DEP_INPUT = $(TOP)/src/input/libmtxinput.a -DEP_OUTPUT = $(TOP)/src/output/libmtxoutput.a -DEP_AVILIB = $(TOP)/avilib-0.6.10/libavi.a -DEP_AVI = $(DEP_AVILIB) $(DEP_AVICLASSES) diff --git a/autogen.sh b/autogen.sh index bd4c2de1b..02000f579 100755 --- a/autogen.sh +++ b/autogen.sh @@ -38,24 +38,6 @@ if gcc -v 2>&1 | grep -i mingw > /dev/null 2> /dev/null; then fi echo '' - if gcc -o ___getcwd contrib/getcwd.c ; then - REALCWD=`./___getcwd` - echo Automatically patching Makefile.options with the - echo real top dir: $REALCWD - if grep ^TOP Makefile.options > /dev/null 2> /dev/null; then - sed "s/^TOP.=/TOP = $REALCWD/" < Makefile.options > mf-tmp - else - echo "# TOP dir set automatically by autogen.sh" > mf-tmp - echo "TOP = $REALCWD" >> mf-tmp - fi - mv mf-tmp Makefile.options - else - echo Could not compile a test program for getting the - echo top level directory. Set it yourself in Makefile.options - fi - rm -f ___getcwd.* - echo '' - echo 'Done with the preparations. Please review and edit the' echo 'settings in Makefile.options. Then run "make".' diff --git a/aviclasses/Makefile.mingw b/aviclasses/Makefile.mingw index d761c386f..7e241fe2c 100644 --- a/aviclasses/Makefile.mingw +++ b/aviclasses/Makefile.mingw @@ -1,27 +1,5 @@ # mkvtoolnix - Makefile for MinGW # because I was fed up fighting against libtool -# Put all the user changeable options into one file -include ../Makefile.mingw.options - -ifneq (,$(findstring aviclasses,$(AVILIB))) -LIBRARIES = libaviclasses.a -endif - -SYSTEM_INCLUDES = -I$(TOP) -I$(TOP)/aviclasses -I$(TOP)/src/common - -libaviclasses_SOURCES = AVIReadHandler.cpp \ - AVIIndex.cpp \ - list.cpp -libaviclasses_OBJECTS := $(patsubst %.cpp,%.o,$(libaviclasses_SOURCES)) - -ALL_SOURCES = $(libaviclasses_SOURCES) - -all: $(LIBRARIES) - -include ../Makefile.mingw.common - -libaviclasses.a: $(libaviclasses_OBJECTS) - rm -f $@ - $(RUNAR) $@ $(libaviclasses_OBJECTS) - $(RANLIB) $@ +all clean: + make -C .. $@ diff --git a/avilib-0.6.10/Makefile.mingw b/avilib-0.6.10/Makefile.mingw index 89d6c4ae4..7e241fe2c 100644 --- a/avilib-0.6.10/Makefile.mingw +++ b/avilib-0.6.10/Makefile.mingw @@ -1,25 +1,5 @@ # mkvtoolnix - Makefile for MinGW # because I was fed up fighting against libtool -# Put all the user changeable options into one file -include ../Makefile.mingw.options - -LIBRARIES = libavi.a - -SYSTEM_INCLUDES = -I$(TOP) -I$(TOP)/avilib-0.6.10 -I$(TOP)/src/common - -libavi_SOURCES = avidump.c \ - avilib.c \ - avimisc.c -libavi_OBJECTS := $(patsubst %.c,%.o,$(libavi_SOURCES)) - -ALL_SOURCES = $(libavi_SOURCES) - -all: $(LIBRARIES) - -include ../Makefile.mingw.common - -libavi.a: $(libavi_OBJECTS) - rm -f $@ - $(RUNAR) $@ $(libavi_OBJECTS) - $(RANLIB) $@ +all clean: + make -C .. $@ diff --git a/src/Makefile.mingw b/src/Makefile.mingw index f794e3228..7e241fe2c 100644 --- a/src/Makefile.mingw +++ b/src/Makefile.mingw @@ -1,72 +1,5 @@ # mkvtoolnix - Makefile for MinGW # because I was fed up fighting against libtool -# Put all the user changeable options into one file -include ../Makefile.mingw.options - -PROGRAMS = mkvmerge mkvinfo mkvextract base64tool -CXXFLAGS += $(WXWINDOWS_CFLAGS) - -SYSTEM_INCLUDES = -I$(TOP)/avilib-0.6.10 $(AVICLASSES_INCLUDES) \ - -I$(TOP) -I$(TOP)/src \ - -I$(TOP)/src/common -I$(TOP)/src/input -I$(TOP)/src/output -SYSTEM_LIBDIRS = -L$(TOP)/avilib-0.6.10 $(AVICLASSES_LIBDIRS) \ - -L$(TOP)/src/common -L$(TOP)/src/input -L$(TOP)/src/output - -mkvmerge_SOURCES = mkvmerge.cpp \ - cluster_helper.cpp \ - pr_generic.cpp -mkvmerge_OBJECTS := $(patsubst %.cpp,%.o,$(mkvmerge_SOURCES)) -mkvmerge_DEPENDENCIES += $(DEP_COMMON) \ - $(DEP_COMP) $(DEP_INPUT) $(DEP_OUTPUT) $(DEP_AVI) -mkvmerge_LDADD = -lmtxinput -lmtxoutput \ - -lmtxcommon -lmatroska -lebml \ - -lavi $(AVICLASSES_LIBDIRS) $(AVICLASSES_LIBRARIES) \ - -lvorbis -lflac -logg -lz $(COMPRESSION_LIBRARIES) \ - -lexpat -liconv - -mkvinfo_SOURCES = mkvinfo.cpp \ - mkvinfo_gui.cpp \ - mkvinfo_tag_types.cpp -mkvinfo_OBJECTS := $(patsubst %.cpp,%.o,$(mkvinfo_SOURCES)) -mkvinfo_DEPENDENCIES += $(DEP_COMMON) -mkvinfo_LDADD = -lmtxcommon -lmatroska -lebml \ - $(WXWINDOWS_LDFLAGS) $(WXWINDOWS_LIBS) \ - -liconv - -mkvextract_SOURCES = mkvextract.cpp \ - mkvextract_attachments.cpp \ - mkvextract_chapters.cpp \ - mkvextract_tags.cpp \ - mkvextract_tracks.cpp -mkvextract_OBJECTS := $(patsubst %.cpp,%.o,$(mkvextract_SOURCES)) -mkvextract_DEPENDENCIES += $(DEP_COMMON) $(DEP_AVILIB) -mkvextract_LDADD = -lmtxcommon -lvorbis -logg -lavi -lmatroska -lebml -liconv - -base64tool_SOURCES = base64tool.cpp -base64tool_OBJECTS := $(patsubst %.cpp,%.o,$(base64tool_SOURCES)) -base64tool_DEPENDENCIES += $(DEP_COMMON) -base64tool_LDADD = -lmtxcommon -liconv - -# Definitions that are needed before the inclusions. -SUBDIRS = common input output mmg -ALL_SOURCES = $(mkvmerge_SOURCES) $(mkvinfo_SOURCES) $(mkvextract_SOURCES) \ - $(base64tool_SOURCES) -EXTRA_CLEAN = $(PROGRAMS) - -all: subdirs $(PROGRAMS) - -# Include the common stuff. -include ../Makefile.common - -mkvmerge: $(mkvmerge_OBJECTS) $(mkvmerge_DEPENDENCIES) - $(LINK) -o $@ $(mkvmerge_OBJECTS) $(mkvmerge_LDADD) - -mkvinfo: $(mkvinfo_OBJECTS) $(mkvinfo_DEPENDENCIES) - $(LINK) -o $@ $(mkvinfo_OBJECTS) $(mkvinfo_LDADD) - -mkvextract: $(mkvextract_OBJECTS) $(mkvextract_DEPENDENCIES) - $(LINK) -o $@ $(mkvextract_OBJECTS) $(mkvextract_LDADD) - -base64tool: $(base64tool_OBJECTS) $(base64tool_DEPENDENCIES) - $(LINK) -o $@ $(base64tool_OBJECTS) $(base64tool_LDADD) +all clean: + make -C .. $@ diff --git a/src/common/Makefile.mingw b/src/common/Makefile.mingw index b3718432d..98e333acc 100644 --- a/src/common/Makefile.mingw +++ b/src/common/Makefile.mingw @@ -1,48 +1,5 @@ # mkvtoolnix - Makefile for MinGW # because I was fed up fighting against libtool -# Put all the user changeable options into one file -include ../../Makefile.mingw.options - -ifneq (,$(findstring yes,$(MTX_DLLS))) -LIBRARIES = libmtxcommon.dll -CXXFLAGS += -DMTX_DLL_EXPORT -else -LIBRARIES = libmtxcommon.a -endif - -SYSTEM_INCLUDES = -I$(TOP) -I$(TOP)/src -I$(TOP)/src/common - -libmtxcommon_SOURCES = base64.cpp \ - aac_common.cpp \ - ac3_common.cpp \ - chapters.cpp \ - chapter_parser_xml.cpp \ - chapter_writer.cpp \ - common.cpp \ - commonebml.cpp \ - compression.cpp \ - dts_common.cpp \ - iso639.cpp \ - mp3_common.cpp \ - mm_io.cpp \ - tagparser_start.cpp \ - tagparser_end.cpp \ - tagwriter.cpp -libmtxcommon_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxcommon_SOURCES)) - -ALL_SOURCES = $(libmtxcommon_SOURCES) -EXTRA_CLEAN = lib*.dll - -all: $(LIBRARIES) - -include ../../Makefile.common - -libmtxcommon.dll: $(libmtxcommon_OBJECTS) - $(LINKSHARED) -Wl,--out-implib=$@.a -o $@ $(libmtxcommon_OBJECTS) \ - -liconv -lz $(COMPRESSION_LIBRARIES) -lmatroska -lebml -lexpat - -libmtxcommon.a: $(libmtxcommon_OBJECTS) - rm -f $@ - $(RUNAR) $@ $(libmtxcommon_OBJECTS) - $(RANLIB) $@ +all clean: + make -C ../.. $@ diff --git a/src/input/Makefile.mingw b/src/input/Makefile.mingw index 03d378de4..98e333acc 100644 --- a/src/input/Makefile.mingw +++ b/src/input/Makefile.mingw @@ -1,40 +1,5 @@ # mkvtoolnix - Makefile for MinGW # because I was fed up fighting against libtool -# Put all the user changeable options into one file -include ../../Makefile.mingw.options - -LIBRARIES = libmtxinput.a - -SYSTEM_INCLUDES = -I$(TOP) -I$(TOP)/avilib-0.6.10 $(AVICLASSES_INCLUDES) \ - -I$(TOP)/src -I$(TOP)/src/common -I$(TOP)/src/input \ - -I$(TOP)/src/output - - -libmtxinput_SOURCES = r_aac.cpp \ - r_ac3.cpp \ - r_avi.cpp \ - r_dts.cpp \ - r_flac.cpp \ - r_matroska.cpp \ - r_mp3.cpp \ - r_qtmp4.cpp \ - r_real.cpp \ - r_srt.cpp \ - r_ssa.cpp \ - r_ogm.cpp \ - r_vobsub.cpp \ - r_wav.cpp \ - subtitles.cpp -libmtxinput_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxinput_SOURCES)) - -ALL_SOURCES = $(libmtxinput_SOURCES) - -all: $(LIBRARIES) - -include ../../Makefile.common - -libmtxinput.a: $(libmtxinput_OBJECTS) - rm -f $@ - $(RUNAR) $@ $(libmtxinput_OBJECTS) - $(RANLIB) $@ +all clean: + make -C ../.. $@ diff --git a/src/mmg/Makefile.mingw b/src/mmg/Makefile.mingw index 627b3154c..98e333acc 100644 --- a/src/mmg/Makefile.mingw +++ b/src/mmg/Makefile.mingw @@ -1,37 +1,5 @@ # mkvtoolnix - Makefile for MinGW # because I was fed up fighting against libtool -# Put all the user changeable options into one file -include ../../Makefile.mingw.options - -PROGRAMS = mmg -CXXFLAGS += $(WXWINDOWS_CFLAGS) - -SYSTEM_INCLUDES = -I$(TOP) -I$(TOP)/src -I$(TOP)/src/common -SYSTEM_LIBDIRS = -L$(TOP)/src/common - -mmg_SOURCES = mmg.cpp \ - extern_data.cpp \ - kax_analyzer.cpp \ - mux_dialog.cpp \ - tab_advanced.cpp \ - tab_attachments.cpp \ - tab_chapters.cpp \ - tab_input.cpp \ - tab_global.cpp \ - tab_settings.cpp -mmg_OBJECTS := $(patsubst %.cpp,%.o,$(mmg_SOURCES)) -mmg_DEPENDENCIES += $(DEP_COMMON) -mmg_LDADD = -lmtxcommon -lmatroska -lebml -liconv -lexpat \ - $(WXWINDOWS_LDFLAGS) $(WXWINDOWS_LIBS) \ - -mwindows - -ALL_SOURCES = $(mmg_SOURCES) -EXTRA_CLEAN = $(PROGRAMS) - -all: $(PROGRAMS) - -include ../../Makefile.common - -mmg: $(mmg_OBJECTS) $(mmg_DEPENDENCIES) - $(LINK) -o $@ $(mmg_OBJECTS) $(mmg_LDADD) +all clean: + make -C ../.. $@ diff --git a/src/output/Makefile.mingw b/src/output/Makefile.mingw index 4089b4c4b..98e333acc 100644 --- a/src/output/Makefile.mingw +++ b/src/output/Makefile.mingw @@ -1,36 +1,5 @@ # mkvtoolnix - Makefile for MinGW # because I was fed up fighting against libtool -# Put all the user changeable options into one file -include ../../Makefile.mingw.options - -LIBRARIES = libmtxoutput.a - -SYSTEM_INCLUDES = -I$(TOP) -I$(TOP)/avilib-0.6.10 $(AVICLASSES_INCLUDES) \ - -I$(TOP)/src -I$(TOP)/src/common -I$(TOP)/src/input \ - -I$(TOP)/src/output - - -libmtxoutput_SOURCES = p_aac.cpp \ - p_ac3.cpp \ - p_dts.cpp \ - p_flac.cpp \ - p_mp3.cpp \ - p_passthrough.cpp \ - p_pcm.cpp \ - p_textsubs.cpp \ - p_video.cpp \ - p_vobsub.cpp \ - p_vorbis.cpp -libmtxoutput_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxoutput_SOURCES)) - -ALL_SOURCES = $(libmtxoutput_SOURCES) - -all: $(LIBRARIES) - -include ../../Makefile.common - -libmtxoutput.a: $(libmtxoutput_OBJECTS) - rm -f $@ - $(RUNAR) $@ $(libmtxoutput_OBJECTS) - ranlib $@ +all clean: + make -C ../.. $@