1
|
1 # LINUX Makefile made by A'rpi / Astral
|
|
2 # Some cleanup by LGB: * 'make -C dir' instead of 'cd dir;make;cd..'
|
|
3 # * for loops instead of linear sequence of make directories
|
|
4 # * some minor problems with make clean and distclean were corrected
|
|
5
|
|
6 include config.mak
|
|
7
|
|
8 PRG = mplayer
|
|
9 PRG_AVIP = aviparse
|
|
10 PRG_TV = tvision
|
|
11 prefix = /usr/local
|
|
12 BINDIR = ${prefix}/bin
|
|
13 # BINDIR = /usr/local/bin
|
|
14 SRCS = linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c lirc_mp.c
|
|
15 OBJS = linux/getch2.o linux/timer-lx.o linux/shmem.o xa/xa_gsm.o lirc_mp.o
|
|
16 CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo # -Wall
|
|
17 A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3
|
|
18 VO_LIBS = -Llibvo -lvo $(X_LIBS)
|
|
19
|
|
20 .SUFFIXES: .c .o
|
|
21
|
|
22 # .PHONY: all clean
|
|
23
|
|
24 all: $(PRG)
|
|
25 # $(PRG_AVIP)
|
|
26
|
|
27 .c.o:
|
|
28 $(CC) -c $(CFLAGS) -o $@ $<
|
|
29
|
|
30 COMMONLIBS = libvo/libvo.a libac3/libac3.a mp3lib/libMP3.a
|
|
31
|
|
32 loader/libloader.a:
|
|
33 $(MAKE) -C loader
|
|
34
|
|
35 libmpeg2/libmpeg2.a:
|
|
36 $(MAKE) -C libmpeg2
|
|
37
|
|
38 libvo/libvo.a:
|
|
39 $(MAKE) -C libvo
|
|
40
|
|
41 libac3/libac3.a:
|
|
42 $(MAKE) -C libac3
|
|
43
|
|
44 mp3lib/libMP3.a:
|
|
45 $(MAKE) -C mp3lib
|
|
46
|
|
47 opendivx/libdecore.a:
|
|
48 $(MAKE) -C opendivx
|
|
49
|
|
50 encore/libencore.a:
|
|
51 $(MAKE) -C encore
|
|
52
|
|
53 $(PRG): mplayer.o $(OBJS) loader/libloader.a libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
|
|
54 $(CC) $(CFLAGS) -o $(PRG) mplayer.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader -ldl -Llibmpeg2 -lmpeg2 -Lopendivx -ldecore $(VO_LIBS) -Lencore -lencore -lpthread
|
|
55
|
|
56 $(PRG_AVIP): aviparse.o $(OBJS) loader/libloader.a $(COMMONLIBS)
|
|
57 $(CC) $(CFLAGS) -o $(PRG_AVIP) aviparse.o $(OBJS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader -ldl $(VO_LIBS) -lpthread
|
|
58
|
|
59 $(PRG_TV): tvision.o $(OBJS) $(COMMONLIBS)
|
|
60 $(CC) $(CFLAGS) -o $(PRG_TV) tvision.o $(OBJS) -lm $(TERMCAP_LIB) $(VO_LIBS)
|
|
61
|
|
62 install: $(PRG)
|
|
63 strip $(PRG)
|
|
64 cp $(PRG) $(BINDIR)
|
|
65 install -m 644 DOCS/mplayer.1 $(prefix)/man/man1/mplayer.1
|
|
66
|
|
67 clean:
|
|
68 rm -f *.o *~ $(OBJS)
|
|
69
|
|
70 distclean:
|
|
71 @for a in mp3lib libac3 libmpeg2 opendivx encore libvo loader drivers drivers/syncfb ; do $(MAKE) -C $$a distclean ; done
|
|
72 makedepend
|
|
73 rm -f *~ $(PRG) $(PRG_AVIP) $(PRG_TV) $(OBJS) *.o *.a Makefile.bak
|
|
74
|
|
75 dep: depend
|
|
76
|
|
77 depend:
|
|
78 @for a in mp3lib libac3 libmpeg2 libvo opendivx encore ; do $(MAKE) -C $$a dep ; done
|
|
79 # cd loader;make dep;cd ..
|
|
80 makedepend -- $(CFLAGS) -- mplayer.c aviparse.c tvision.c $(SRCS) &>/dev/null
|
|
81
|
|
82 # DO NOT DELETE
|