[matroska] r940 - trunk/libebml/make/linux
| Newsgroups | gmane.comp.multimedia.matroska.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mosu Date: 2004-11-13 14:25:50 +0300 (Sat, 13 Nov 2004) New Revision: 940 Modified: trunk/libebml/make/linux/Makefile Log: Improved the dependency calculation to be more portable (makedepend doesn't exist everywhere, and it doesn't necessarily use the compiler we want). Modified: trunk/libebml/make/linux/Makefile =================================================================== --- trunk/libebml/make/linux/Makefile 2004-11-13 11:17:14 UTC (rev 939) +++ trunk/libebml/make/linux/Makefile 2004-11-13 11:25:50 UTC (rev 940) @@ -22,8 +22,6 @@ # Programs CXX=g++ LD=$(CXX) -DEP=$(CXX) -MM -DEPEND = makedepend AR = ar rcvu RANLIB = ranlib INSTALL = install @@ -84,9 +82,15 @@ rm -f $(LIBRARY) rm -f CORE -# what are the source dependencies -depend: $(sources) - $(DEPEND) $(DEPENDFLAGS) $(sources) +depend: + @echo Calculating dependecies: + @rm -f .depend + @touch .depend + @for i in $(sources); do \ + o="`echo $$i | sed -e 's/\.c$$/.o/' -e 's/\.cpp$$/.o/'`" ; \ + echo ' ' $$i: $$o ; \ + $(CXX) $(DEPENDFLAGS) -MM -MT $$o $$i >> .depend ; \ + done install: $(LIBRARY) $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir) @@ -100,4 +104,9 @@ $(INSTALL) $(INSTALL_OPTS) $$i $(includedir)/c ; \ done +ifneq ($(wildcard .depend),) +include .depend +endif + # DO NOT DELETE +