changeset 421:c0d9b0903d92

timestamping - automatic rebuild after CVS updates or config changes
author arpi_esp
date Sat, 14 Apr 2001 22:27:49 +0000
parents 980bafac238f
children eb04cde16bde
files Makefile
diffstat 1 files changed, 16 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Apr 14 22:26:27 2001 +0000
+++ b/Makefile	Sat Apr 14 22:27:49 2001 +0000
@@ -64,19 +64,19 @@
 encore/libencore.a:
 	$(MAKE) -C encore
 
-$(PRG):	.depend mplayer.o $(OBJS) loader/libloader.a loader/DirectShow/libDS_Filter.a libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
+$(PRG):	version.h .depend mplayer.o $(OBJS) loader/libloader.a loader/DirectShow/libDS_Filter.a libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
 	$(CC) $(CFLAGS) -o $(PRG) mplayer.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader -Lloader/DirectShow -lDS_Filter -ldl -Llibmpeg2 -lmpeg2 -Lopendivx -ldecore $(VO_LIBS) -Lencore -lencore -lpthread -lstdc++
 
-$(PRG_HQ):	.depend mplayerHQ.o $(OBJS) loader/libloader.a libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
+$(PRG_HQ):	version.h .depend mplayerHQ.o $(OBJS) loader/libloader.a libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
 	$(CC) $(CFLAGS) -o $(PRG_HQ) mplayerHQ.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader -ldl -Llibmpeg2 -lmpeg2 -Lopendivx -ldecore $(VO_LIBS) -Lencore -lencore -lpthread
 
-$(PRG_AVIP):	.depend aviparse.o $(OBJS) loader/libloader.a $(COMMONLIBS)
+$(PRG_AVIP):	version.h .depend aviparse.o $(OBJS) loader/libloader.a $(COMMONLIBS)
 	$(CC) $(CFLAGS) -o $(PRG_AVIP) aviparse.o $(OBJS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader -ldl $(VO_LIBS) -lpthread
 
-$(PRG_TV):	.depend tvision.o $(OBJS) $(COMMONLIBS)
+$(PRG_TV):	version.h .depend tvision.o $(OBJS) $(COMMONLIBS)
 	$(CC) $(CFLAGS) -o $(PRG_TV) tvision.o $(OBJS) -lm $(TERMCAP_LIB) $(VO_LIBS)
 
-$(PRG_CFG):        codec-cfg.c codec-cfg.h
+$(PRG_CFG):        version.h codec-cfg.c codec-cfg.h
 	$(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DTESTING
 
 install: $(PRG)
@@ -98,9 +98,20 @@
 .depend: Makefile config.mak config.h
 	makedepend -f- -- $(CFLAGS) -- mplayer.c mplayerHQ.c aviparse.c tvision.c $(SRCS) 1>.depend 2>/dev/null
 
+# rebuild at every config.h/config.mak change:
+version.h: config.h config.mak Makefile
+	$(MAKE) distclean
+	./version.sh
+
+# rebuild at every CVS update:
+ifneq ($(wildcard CVS/Entries),)
+version.h: CVS/Entries
+endif
+
 #
 # include dependency files if they exist
 #
 ifneq ($(wildcard .depend),)
 include .depend
 endif
+