[matroska] r945 - in trunk/libebml/make: linux mingw32

[email protected]
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: mosu
Date: 2004-11-14 00:09:37 +0300 (Sun, 14 Nov 2004)
New Revision: 945

Modified:
   trunk/libebml/make/linux/Makefile
   trunk/libebml/make/mingw32/
   trunk/libebml/make/mingw32/Makefile
Log:
Fixed "make depend" on mingw and some cleanup for the Linux Makefile.

Modified: trunk/libebml/make/linux/Makefile
===================================================================
--- trunk/libebml/make/linux/Makefile	2004-11-13 11:30:53 UTC (rev 944)
+++ trunk/libebml/make/linux/Makefile	2004-11-13 21:09:37 UTC (rev 945)
@@ -75,7 +75,7 @@
 
 clean:
 	rm -f $(objects)
-	rm -f $(dependencies)
+	rm -f .depend
 	rm -f $(LIBRARY)
 	rm -f CORE
 


Property changes on: trunk/libebml/make/mingw32
___________________________________________________________________
Name: svn:ignore
   + libebml.dll
libebml.dll.a
.depend


Modified: trunk/libebml/make/mingw32/Makefile
===================================================================
--- trunk/libebml/make/mingw32/Makefile	2004-11-13 11:30:53 UTC (rev 944)
+++ trunk/libebml/make/mingw32/Makefile	2004-11-13 21:09:37 UTC (rev 945)
@@ -41,7 +41,7 @@
 lib: $(LIBS)
 
 clean:
-	rm -f $(OBJ) libebml.a libebml.dll libebml.dll.a
+	rm -f $(OBJ) libebml.a libebml.dll libebml.dll.a .depend
 
 libebml.a: $(OBJ)
 	ar r $@ $(OBJ)
@@ -51,7 +51,14 @@
 	$(CXX) -shared -Wl,--export-all -Wl,[email protected] -o $@ $(OBJ)
 
 depend:
-	$(CXX) $(CXXFLAGS) -MM $(SRC) > .depend
+	@echo Calculating dependecies:
+	@rm -f .depend
+	@touch .depend
+	@for i in $(SRC); do \
+		o="`echo $$i | sed -e 's/\.c$$/.o/' -e 's/\.cpp$$/.o/'`" ; \
+		echo '  ' $$i: $$o ; \
+		$(CXX) $(CXXFLAGS) -MM -MT $$o $$i >> .depend ; \
+	done
 
 #
 # include dependency files if they exist
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.