From a0b3aab33ad8af43a045fa4b718a04e7a19db0fb Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 10 Jan 2004 17:58:24 +0000 Subject: [PATCH] Added a lot of options for allowing parts of mtx being compiled as DLLs. --- Makefile.mingw | 35 +------------------ Makefile.mingw.common | 48 ++++++++++++++++++++++++++ Makefile.mingw.options | 19 +++++++++-- autogen.sh | 23 ++++++++----- aviclasses/Makefile.mingw | 29 +++------------- avilib-0.6.10/Makefile.mingw | 27 +++------------ src/Makefile.mingw | 65 +++++++++--------------------------- src/common/Makefile.mingw | 63 +++++++++++++++------------------- src/input/Makefile.mingw | 28 +++------------- src/mmg/Makefile.mingw | 26 +++------------ src/output/Makefile.mingw | 26 ++------------- 11 files changed, 142 insertions(+), 247 deletions(-) create mode 100644 Makefile.mingw.common diff --git a/Makefile.mingw b/Makefile.mingw index f1b2e9302..d6cdb7a79 100644 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -13,39 +13,6 @@ else SUBDIRS = avilib-0.6.10 src endif -# And now the targets. -.PHONY: config.h - all: subdirs -subdirs: - list='$(SUBDIRS)'; \ - for subdir in $$list; do \ - echo "Making all in $$subdir"; \ - (cd $$subdir && make -f Makefile.mingw) || exit 1; \ - done - -clean: - list='$(SUBDIRS)'; \ - for subdir in $$list; do \ - echo "Making clean in $$subdir"; \ - (cd $$subdir && make -f Makefile.mingw clean) || exit 1; \ - done - -Makefile: Makefile.mingw - @echo Re-copying Makefile from Makefile.mingw - sed "s/-f Makefile\.mingw//g" < $< > $@ - -depend: - list='$(SUBDIRS)'; \ - for subdir in $$list; do \ - echo "Making depend in $$subdir"; \ - (cd $$subdir && make -f Makefile.mingw depend) || exit 1; \ - done - -# -# include dependency files if they exist -# -ifneq ($(wildcard .depend),) -include .depend -endif +include Makefile.mingw.common diff --git a/Makefile.mingw.common b/Makefile.mingw.common new file mode 100644 index 000000000..e787ed594 --- /dev/null +++ b/Makefile.mingw.common @@ -0,0 +1,48 @@ +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 +.cpp.o: + $(CXXCOMPILE) -c -o $@ $< + +.c.o: + $(CCOMPILE) -c -o $@ $< + +subdirs: + list='$(SUBDIRS)'; \ + for subdir in $$list; do \ + echo "Making all in $$subdir"; \ + (cd $$subdir && make -f Makefile.mingw) || exit 1; \ + done + +clean: + list='$(SUBDIRS)'; \ + for subdir in $$list; do \ + echo "Making clean in $$subdir"; \ + (cd $$subdir && make -f Makefile.mingw clean) || exit 1; \ + done + rm -f *.o lib*.a $(EXTRA_CLEAN) + +depend: + list='$(SUBDIRS)'; \ + for subdir in $$list; do \ + echo "Making depend in $$subdir"; \ + (cd $$subdir && make -f Makefile.mingw depend) || exit 1; \ + done +ifneq (,$(ALL_SOURCES)) + $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ + $(ALL_SOURCES) > .depend +endif + +# +# include dependency files if they exist +# +ifneq ($(wildcard .depend),) +include .depend +endif diff --git a/Makefile.mingw.options b/Makefile.mingw.options index dc74305d6..efa84f6c4 100644 --- a/Makefile.mingw.options +++ b/Makefile.mingw.options @@ -3,7 +3,7 @@ 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 -LIBRARIES = -Lc:/cygwin/usr/local/src/libebml/make/mingw32 \ +LIBDIRS = -Lc:/cygwin/usr/local/src/libebml/make/mingw32 \ -Lc:/cygwin/usr/local/src/libmatroska/make/mingw32 \ -Lc:/cygwin/usr/local/lib @@ -20,6 +20,12 @@ COMPRESSION_LIBS = bzlib lzo #CXXFLAGS = #LDFLAGS = +# Have libebml and libmatroska been compiled as DLLs? +#CXXFLAGS += -DEBML_DLL -DMATROSKA_DLL + +# Build mkvtoolnix with DLLs? +#MTX_DLLS = yes + # Activate debugging options? DEBUG = yes @@ -31,6 +37,7 @@ CXX = g++.exe CC = gcc.exe LD = g++.exe AR = ar.exe +RANLIB = ranlib.exe # # Don't chagen anything below this line. @@ -53,7 +60,7 @@ CXXFLAGS += -DHAVE_BZLIB_H=1 COMPRESSION_LIBRARIES = -lbz2 endif -ifneq (,$(findstring bzlib,$(LZO_LIBS))) +ifneq (,$(findstring lzo,$(LZO_LIBS))) CXXFLAGS += -DHAVE_LZO1X_H=1 COMPRESSION_LIBRARIES += -llzo1x endif @@ -65,10 +72,16 @@ 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 += MTX_DLL +else DEP_COMMON = $(TOP)/src/common/libmtxcommon.a DEP_EBMLCOMMON = $(TOP)/src/common/libmtxebmlcommon.a DEP_KAXCOMMON = $(TOP)/src/common/libmtxkaxcommon.a -DEP_COMP = $(TOP)/src/common/libmtxcomp.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 diff --git a/autogen.sh b/autogen.sh index 0fc8d9be5..2b59f24a6 100755 --- a/autogen.sh +++ b/autogen.sh @@ -27,17 +27,24 @@ if gcc -v 2>&1 | grep -i mingw > /dev/null 2> /dev/null; then echo '' for i in `find -name Makefile.mingw`; do - n=`echo $i | sed 's/\.mingw$//'` + n=`echo $i | sed 's/\.mingw//'` echo "Creating $n from $i" - sed "s/-f Makefile\.mingw//g" < $i > $n + sed -e "s/Makefile.mingw.common/Makefile.common/g" < $i > $n done - echo "Creating config.h from config.h.mingw" - cp config.h.mingw config.h - echo '' + echo "Creating Makefile.common from Makefile.mingw.common" + sed -e "s!-f Makefile.mingw!!g" < Makefile.mingw.common > Makefile.common - echo 'Creating dependencies (calling "make depend")' - echo '' - make depend + if test "x$1" = "x"; then + echo "Creating config.h from config.h.mingw" + cp config.h.mingw config.h + echo '' + echo 'Creating dependencies (calling "make depend")' + echo '' + make depend + else + echo 'Not creating config.h.' + echo 'Not creating the dependencies.' + fi exit $? fi diff --git a/aviclasses/Makefile.mingw b/aviclasses/Makefile.mingw index 6458d3504..d761c386f 100644 --- a/aviclasses/Makefile.mingw +++ b/aviclasses/Makefile.mingw @@ -8,39 +8,20 @@ ifneq (,$(findstring aviclasses,$(AVILIB))) LIBRARIES = libaviclasses.a endif -SYSTEM_INCLUDES = -I$(TOP) -$(TOP)/aviclasses -I$(TOP)/src/common +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)) -RUNAR = $(AR) rcu - -.cpp.o: - $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -c -o $@ $< +ALL_SOURCES = $(libaviclasses_SOURCES) all: $(LIBRARIES) +include ../Makefile.mingw.common + libaviclasses.a: $(libaviclasses_OBJECTS) rm -f $@ $(RUNAR) $@ $(libaviclasses_OBJECTS) - ranlib $@ - -clean: - rm -f *.o $(LIBRARIES) - -Makefile: Makefile.mingw - @echo Re-copying Makefile from Makefile.mingw - sed "s/-f Makefile\.mingw//g" < $< > $@ - -depend: - $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ - $(libaviclasses_SOURCES) > .depend - -# -# include dependency files if they exist -# -ifneq ($(wildcard .depend),) -include .depend -endif + $(RANLIB) $@ diff --git a/avilib-0.6.10/Makefile.mingw b/avilib-0.6.10/Makefile.mingw index 73d7cd0f2..89d6c4ae4 100644 --- a/avilib-0.6.10/Makefile.mingw +++ b/avilib-0.6.10/Makefile.mingw @@ -13,32 +13,13 @@ libavi_SOURCES = avidump.c \ avimisc.c libavi_OBJECTS := $(patsubst %.c,%.o,$(libavi_SOURCES)) -RUNAR = $(AR) rcu - -.c.o: - $(CC) $(CFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -c -o $@ $< +ALL_SOURCES = $(libavi_SOURCES) all: $(LIBRARIES) +include ../Makefile.mingw.common + libavi.a: $(libavi_OBJECTS) rm -f $@ $(RUNAR) $@ $(libavi_OBJECTS) - ranlib $@ - -clean: - rm -f *.o $(LIBRARIES) .depend - -Makefile: Makefile.mingw - @echo Re-copying Makefile from Makefile.mingw - sed "s/-f Makefile\.mingw//g" < $< > $@ - -depend: - $(CC) $(CFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ - $(libavi_SOURCES) > .depend - -# -# include dependency files if they exist -# -ifneq ($(wildcard .depend),) -include .depend -endif + $(RANLIB) $@ diff --git a/src/Makefile.mingw b/src/Makefile.mingw index ccc801bae..3731bf14f 100644 --- a/src/Makefile.mingw +++ b/src/Makefile.mingw @@ -19,21 +19,21 @@ mkvmerge_SOURCES = mkvmerge.cpp \ mkvmerge_OBJECTS := $(patsubst %.cpp,%.o,$(mkvmerge_SOURCES)) mkvmerge_DEPENDENCIES += $(DEP_COMMON) $(DEP_EBMLCOMMON) $(DEP_KAXCOMMON) \ $(DEP_COMP) $(DEP_INPUT) $(DEP_OUTPUT) $(DEP_AVI) -mkvmerge_LDADD = -lmtxinput -lmtxoutput -lmtxcomp \ +mkvmerge_LDADD = -lmtxinput -lmtxoutput \ -lmtxkaxcommon -lmtxebmlcommon -lmtxcommon \ -lmatroska -lebml \ -lavi $(AVICLASSES_LIBDIRS) $(AVICLASSES_LIBRARIES) \ - -lvorbis -lflac -logg \ - -liconv -lexpat \ - -lz $(COMPRESSION_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) $(DEP_EBMLCOMMON) -mkvinfo_LDADD = -lmtxebmlcommon -lmtxcommon -lmatroska -lebml -liconv \ - $(WXWINDOWS_LDFLAGS) $(WXWINDOWS_LIBS) +mkvinfo_LDADD = -lmtxebmlcommon -lmtxcommon -lmatroska -lebml \ + $(WXWINDOWS_LDFLAGS) $(WXWINDOWS_LIBS) \ + -liconv mkvextract_SOURCES = mkvextract.cpp \ mkvextract_attachments.cpp \ @@ -43,29 +43,24 @@ mkvextract_SOURCES = mkvextract.cpp \ mkvextract_OBJECTS := $(patsubst %.cpp,%.o,$(mkvextract_SOURCES)) mkvextract_DEPENDENCIES += $(DEP_COMMON) $(DEP_EBMLCOMMON) $(DEP_KAXCOMMON) \ $(DEP_AVILIB) -mkvextract_LDADD = -lmtxebmlcommon -lmtxkaxcommon -lmtxcommon -lebml -liconv \ - -lvorbis -logg -lavi -lmatroska -lebml +mkvextract_LDADD = -lmtxebmlcommon -lmtxkaxcommon -lmtxcommon \ + -lvorbis -logg -lavi -lmatroska -lebml -liconv base64tool_SOURCES = base64tool.cpp base64tool_OBJECTS := $(patsubst %.cpp,%.o,$(base64tool_SOURCES)) base64tool_DEPENDENCIES += $(DEP_COMMON) $(DEP_EBMLCOMMON) -base64tool_LDADD = -lmtxebmlcommon -lmtxcommon -lebml -liconv +base64tool_LDADD = -lmtxcommon -lmtxebmlcommon -liconv +# Definitions that are needed before the inclusions. SUBDIRS = common input output mmg - -LINK = $(LD) $(LDFLAGS) $(LIBRARIES) $(SYSTEM_LIBDIRS) - -.cpp.o: - $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -c -o $@ $< +ALL_SOURCES = $(mkvmerge_SOURCES) $(mkvinfo_SOURCES) $(mkvextract_SOURCES) \ + $(base64tool_SOURCES) +EXTRA_CLEAN = $(PROGRAMS) all: subdirs $(PROGRAMS) -subdirs: - list='$(SUBDIRS)'; \ - for subdir in $$list; do \ - echo "Making all in $$subdir"; \ - (cd $$subdir && make -f Makefile.mingw) || exit 1; \ - done +# Include the common stuff. +include ../Makefile.mingw.common mkvmerge: $(mkvmerge_OBJECTS) $(mkvmerge_DEPENDENCIES) $(LINK) -o $@ $(mkvmerge_OBJECTS) $(mkvmerge_LDADD) @@ -78,33 +73,3 @@ mkvextract: $(mkvextract_OBJECTS) $(mkvextract_DEPENDENCIES) base64tool: $(base64tool_OBJECTS) $(base64tool_DEPENDENCIES) $(LINK) -o $@ $(base64tool_OBJECTS) $(base64tool_LDADD) - -clean: - list='$(SUBDIRS)'; \ - for subdir in $$list; do \ - echo "Making clean in $$subdir"; \ - (cd $$subdir && make -f Makefile.mingw clean) || exit 1; \ - done - rm -f *.o $(PROGRAMS) - -Makefile: Makefile.mingw - @echo Re-copying Makefile from Makefile.mingw - sed "s/-f Makefile\.mingw//g" < $< > $@ - -depend: - list='$(SUBDIRS)'; \ - for subdir in $$list; do \ - echo "Making depend in $$subdir"; \ - (cd $$subdir && make -f Makefile.mingw depend) || exit 1; \ - done - $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ - $(mkvmerge_SOURCES) $(mkvinfo_SOURCES) $(mkvextract_SOURCES) \ - $(base64tool_SOURCES) > .depend - - -# -# include dependency files if they exist -# -ifneq ($(wildcard .depend),) -include .depend -endif diff --git a/src/common/Makefile.mingw b/src/common/Makefile.mingw index 47a950a1f..b5cbc48cd 100644 --- a/src/common/Makefile.mingw +++ b/src/common/Makefile.mingw @@ -4,8 +4,12 @@ # Put all the user changeable options into one file include ../../Makefile.mingw.options -LIBRARIES = libmtxcommon.a libmtxebmlcommon.a libmtxkaxcommon.a \ - libmtxcomp.a +ifneq (,$(findstring yes,$(MTX_DLLS))) +LIBRARIES = libmtxcommon.dll libmtxebmlcommon.dll libmtxkaxcommon.dll +CXXFLAGS += -DMTX_DLL_EXPORT +else +LIBRARIES = libmtxcommon.a libmtxebmlcommon.a libmtxkaxcommon.a +endif SYSTEM_INCLUDES = -I$(TOP) -I$(TOP)/src -I$(TOP)/src/common @@ -13,6 +17,7 @@ libmtxcommon_SOURCES = base64.cpp \ aac_common.cpp \ ac3_common.cpp \ common.cpp \ + compression.cpp \ dts_common.cpp \ iso639.cpp \ mp3_common.cpp @@ -30,51 +35,37 @@ libmtxkaxcommon_SOURCES = chapters.cpp \ tagwriter.cpp libmtxkaxcommon_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxkaxcommon_SOURCES)) -libmtxcomp_SOURCES = compression.cpp -libmtxcomp_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxcomp_SOURCES)) - -RUNAR = $(AR) rcu - -.cpp.o: - $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -c -o $@ $< +ALL_SOURCES = $(libmtxcommon_SOURCES) $(libmtxebmlcommon_SOURCES) \ + $(libmtxkaxcommon_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) + +libmtxebmlcommon.dll: $(libmtxebmlcommon_OBJECTS) + $(LINKSHARED) -Wl,--out-implib=$@.a -o $@ $(libmtxebmlcommon_OBJECTS) \ + -L. -lmtxcommon -lebml + +libmtxkaxcommon.dll: $(libmtxkaxcommon_OBJECTS) + $(LINKSHARED) -Wl,--out-implib=$@.a -o $@ $(libmtxkaxcommon_OBJECTS) \ + -L. -lmtxcommon -lmatroska -lebml -lmtxebmlcommon -lexpat + libmtxcommon.a: $(libmtxcommon_OBJECTS) rm -f $@ $(RUNAR) $@ $(libmtxcommon_OBJECTS) - ranlib $@ + $(RANLIB) $@ libmtxebmlcommon.a: $(libmtxebmlcommon_OBJECTS) rm -f $@ $(RUNAR) $@ $(libmtxebmlcommon_OBJECTS) - ranlib $@ + $(RANLIB) $@ libmtxkaxcommon.a: $(libmtxkaxcommon_OBJECTS) rm -f $@ $(RUNAR) $@ $(libmtxkaxcommon_OBJECTS) - ranlib $@ - -libmtxcomp.a: $(libmtxcomp_OBJECTS) - rm -f $@ - $(RUNAR) $@ $(libmtxcomp_OBJECTS) - ranlib $@ - -clean: - rm -f *.o $(LIBRARIES) - -Makefile: Makefile.mingw - @echo Re-copying Makefile from Makefile.mingw - sed "s/-f Makefile\.mingw//g" < $< > $@ - -depend: - $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ - $(libmtxcommon_SOURCES) $(libmtxebmlcommon_SOURCES) \ - $(libmtxkaxcommon_SOURCES) $(libmtxcomp_SOURCES) > .depend - -# -# include dependency files if they exist -# -ifneq ($(wildcard .depend),) -include .depend -endif + $(RANLIB) $@ diff --git a/src/input/Makefile.mingw b/src/input/Makefile.mingw index e7d422397..03d378de4 100644 --- a/src/input/Makefile.mingw +++ b/src/input/Makefile.mingw @@ -28,33 +28,13 @@ libmtxinput_SOURCES = r_aac.cpp \ subtitles.cpp libmtxinput_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxinput_SOURCES)) -RUNAR = $(AR) rcu - -.cpp.o: - $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -c -o $@ $< +ALL_SOURCES = $(libmtxinput_SOURCES) all: $(LIBRARIES) +include ../../Makefile.common + libmtxinput.a: $(libmtxinput_OBJECTS) rm -f $@ $(RUNAR) $@ $(libmtxinput_OBJECTS) - ranlib $@ - -clean: - rm -f *.o $(LIBRARIES) - -Makefile: Makefile.mingw - @echo Re-copying Makefile from Makefile.mingw - sed "s/-f Makefile\.mingw//g" < $< > $@ - -depend: - $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ - $(libmtxinput_SOURCES) > .depend - - -# -# include dependency files if they exist -# -ifneq ($(wildcard .depend),) -include .depend -endif + $(RANLIB) $@ diff --git a/src/mmg/Makefile.mingw b/src/mmg/Makefile.mingw index 9cf666ace..a93869b18 100644 --- a/src/mmg/Makefile.mingw +++ b/src/mmg/Makefile.mingw @@ -27,30 +27,12 @@ mmg_LDADD = -lmtxkaxcommon -lmtxebmlcommon -lmtxcommon \ $(WXWINDOWS_LDFLAGS) $(WXWINDOWS_LIBS) \ -mwindows -LINK = $(LD) $(LDFLAGS) $(LIBRARIES) $(SYSTEM_LIBDIRS) - -.cpp.o: - $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -c -o $@ $< +ALL_SOURCES = $(mmg_SOURCES) +EXTRA_CLEAN = $(PROGRAMS) all: $(PROGRAMS) +include ../../Makefile.common + mmg: $(mmg_OBJECTS) $(mmg_DEPENDENCIES) $(LINK) -o $@ $(mmg_OBJECTS) $(mmg_LDADD) - -clean: - rm -f *.o $(PROGRAMS) - -Makefile: Makefile.mingw - @echo Re-copying Makefile from Makefile.mingw - sed "s/-f Makefile\.mingw//g" < $< > $@ - -depend: - $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ - $(mmg_SOURCES) > .depend - -# -# include dependency files if they exist -# -ifneq ($(wildcard .depend),) -include .depend -endif diff --git a/src/output/Makefile.mingw b/src/output/Makefile.mingw index d531aaa32..4089b4c4b 100644 --- a/src/output/Makefile.mingw +++ b/src/output/Makefile.mingw @@ -24,33 +24,13 @@ libmtxoutput_SOURCES = p_aac.cpp \ p_vorbis.cpp libmtxoutput_OBJECTS := $(patsubst %.cpp,%.o,$(libmtxoutput_SOURCES)) -RUNAR = $(AR) rcu - -.cpp.o: - $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -c -o $@ $< +ALL_SOURCES = $(libmtxoutput_SOURCES) all: $(LIBRARIES) +include ../../Makefile.common + libmtxoutput.a: $(libmtxoutput_OBJECTS) rm -f $@ $(RUNAR) $@ $(libmtxoutput_OBJECTS) ranlib $@ - -clean: - rm -f *.o $(LIBRARIES) - -Makefile: Makefile.mingw - @echo Re-copying Makefile from Makefile.mingw - sed "s/-f Makefile\.mingw//g" < $< > $@ - -depend: - $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ - $(libmtxoutput_SOURCES) > .depend - - -# -# include dependency files if they exist -# -ifneq ($(wildcard .depend),) -include .depend -endif