comparison Makefile @ 1010:6d3a6d42c831

dependency stuff fixed
author arpi_esp
date Mon, 04 Jun 2001 19:33:28 +0000
parents d159308be231
children 74d55f3c4680
comparison
equal deleted inserted replaced
1009:c51d7e4853d6 1010:6d3a6d42c831
23 23
24 .SUFFIXES: .c .o 24 .SUFFIXES: .c .o
25 25
26 # .PHONY: all clean 26 # .PHONY: all clean
27 27
28 all: version.h config.h $(PRG) 28 all: $(PRG)
29 # $(PRG_AVIP) 29 # $(PRG_AVIP)
30 30
31 .c.o: 31 .c.o:
32 $(CC) -c $(CFLAGS) -o $@ $< 32 $(CC) -c $(CFLAGS) -o $@ $<
33 33
58 $(MAKE) -C opendivx 58 $(MAKE) -C opendivx
59 59
60 encore/libencore.a: 60 encore/libencore.a:
61 $(MAKE) -C encore 61 $(MAKE) -C encore
62 62
63 mplayerwithoutlink: .depend mplayer.o $(OBJS) loader/libloader.a $(DS_DEP) libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a 63 mplayerwithoutlink: version.h mplayer.o $(OBJS) loader/libloader.a $(DS_DEP) libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
64 @for a in mp3lib libac3 libmpeg2 libvo opendivx encore loader/DirectShow ; do $(MAKE) -C $$a all ; done 64 @for a in mp3lib libac3 libmpeg2 libvo opendivx encore loader/DirectShow ; do $(MAKE) -C $$a all ; done
65 65
66 $(PRG): .depend mplayer.o $(OBJS) loader/libloader.a $(DS_DEP) libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a 66 $(PRG): version.h mplayer.o $(OBJS) loader/libloader.a $(DS_DEP) libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
67 $(CC) $(CFLAGS) -o $(PRG) mplayer.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader $(DS_LIB) -Llibmpeg2 -lmpeg2 -Lopendivx -ldecore $(VO_LIBS) -Llibao2 -lao $(CSS_LIB) -Lencore -lencore $(ARCH_LIBS) 67 $(CC) $(CFLAGS) -o $(PRG) mplayer.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader $(DS_LIB) -Llibmpeg2 -lmpeg2 -Lopendivx -ldecore $(VO_LIBS) -Llibao2 -lao $(CSS_LIB) -Lencore -lencore $(ARCH_LIBS)
68 68
69 # $(PRG_HQ): .depend mplayerHQ.o $(OBJS) loader/libloader.a libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a 69 # $(PRG_HQ): depfile mplayerHQ.o $(OBJS) loader/libloader.a libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
70 # $(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 70 # $(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
71 71
72 # $(PRG_AVIP): .depend aviparse.o $(OBJS) loader/libloader.a $(COMMONLIBS) 72 # $(PRG_AVIP): depfile aviparse.o $(OBJS) loader/libloader.a $(COMMONLIBS)
73 # $(CC) $(CFLAGS) -o $(PRG_AVIP) aviparse.o $(OBJS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader -ldl $(VO_LIBS) -lpthread 73 # $(CC) $(CFLAGS) -o $(PRG_AVIP) aviparse.o $(OBJS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader -ldl $(VO_LIBS) -lpthread
74 74
75 # $(PRG_TV): .depend tvision.o $(OBJS) $(COMMONLIBS) 75 # $(PRG_TV): depfile tvision.o $(OBJS) $(COMMONLIBS)
76 # $(CC) $(CFLAGS) -o $(PRG_TV) tvision.o $(OBJS) -lm $(TERMCAP_LIB) $(VO_LIBS) 76 # $(CC) $(CFLAGS) -o $(PRG_TV) tvision.o $(OBJS) -lm $(TERMCAP_LIB) $(VO_LIBS)
77 77
78 $(PRG_CFG): .depend codec-cfg.c codec-cfg.h 78 $(PRG_CFG): version.h codec-cfg.c codec-cfg.h
79 $(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DCODECS2HTML 79 $(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DCODECS2HTML
80 80
81 install: $(PRG) 81 install: $(PRG)
82 install -D -m 755 -s $(PRG) $(BINDIR)/$(PRG) 82 install -D -m 755 -s $(PRG) $(BINDIR)/$(PRG)
83 install -D -m 644 DOCS/mplayer.1 $(prefix)/man/man1/mplayer.1 83 install -D -m 644 DOCS/mplayer.1 $(prefix)/man/man1/mplayer.1
89 @for a in mp3lib libac3 libmpeg2 opendivx encore libvo libao2 loader loader/DirectShow drivers drivers/syncfb ; do $(MAKE) -C $$a distclean ; done 89 @for a in mp3lib libac3 libmpeg2 opendivx encore libvo libao2 loader loader/DirectShow drivers drivers/syncfb ; do $(MAKE) -C $$a distclean ; done
90 rm -f *~ $(PRG) $(PRG_HQ) $(PRG_AVIP) $(PRG_TV) $(OBJS) *.o *.a .depend 90 rm -f *~ $(PRG) $(PRG_HQ) $(PRG_AVIP) $(PRG_TV) $(OBJS) *.o *.a .depend
91 91
92 dep: depend 92 dep: depend
93 93
94 depend: version.h config.h .depend 94 depend:
95 $(CC) -MM $(CFLAGS) mplayer.c $(SRCS) 1>.depend
95 @for a in mp3lib libac3 libmpeg2 libvo libao2 opendivx encore loader/DirectShow ; do $(MAKE) -C $$a dep ; done 96 @for a in mp3lib libac3 libmpeg2 libvo libao2 opendivx encore loader/DirectShow ; do $(MAKE) -C $$a dep ; done
96
97 .depend: Makefile config.mak config.h
98 $(CC) -MM $(CFLAGS) mplayer.c $(SRCS) 1>.depend
99 97
100 # ./configure must be run if it changed in CVS 98 # ./configure must be run if it changed in CVS
101 config.h: configure 99 config.h: configure
102 @echo "############################################################" 100 @echo "############################################################"
103 @echo "####### Please run ./configure again - it's changed! #######" 101 @echo "####### Please run ./configure again - it's changed! #######"
104 @echo "############################################################" 102 @echo "############################################################"
105 @exit 1 103 @exit 1
106 104
107 # rebuild at every config.h/config.mak change: 105 # rebuild at every config.h/config.mak change:
108 version.h: config.h config.mak Makefile 106 version.h: config.h config.mak Makefile
107 ./version.sh
109 $(MAKE) distclean 108 $(MAKE) distclean
110 ./version.sh 109 $(MAKE) depend
111 110
112 # rebuild at every CVS update: 111 # rebuild at every CVS update:
113 ifneq ($(wildcard CVS/Entries),) 112 ifneq ($(wildcard CVS/Entries),)
114 version.h: CVS/Entries 113 version.h: CVS/Entries
115 endif 114 endif