257
|
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 #install...
|
|
9 OWNER = root
|
|
10 GROUP = root
|
|
11 PERM = 755
|
|
12
|
|
13 PRG = mplayer
|
|
14 PRG_HQ = mplayerHQ
|
|
15 PRG_AVIP = aviparse
|
|
16 PRG_TV = tvision
|
|
17 prefix = /usr/local
|
|
18 BINDIR = ${prefix}/bin
|
|
19 # BINDIR = /usr/local/bin
|
374
|
20 SRCS = codec-cfg.c subreader.c linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c lirc_mp.c cfgparser.c
|
|
21 OBJS = codec-cfg.o subreader.o linux/getch2.o linux/timer-lx.o linux/shmem.o xa/xa_gsm.o lirc_mp.o cfgparser.o
|
257
|
22 CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo # -Wall
|
|
23 A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3
|
|
24 VO_LIBS = -Llibvo -lvo $(X_LIBS)
|
|
25
|
|
26 .SUFFIXES: .c .o
|
|
27
|
|
28 # .PHONY: all clean
|
|
29
|
|
30 all: $(PRG)
|
|
31 # $(PRG_AVIP)
|
|
32
|
|
33 .c.o:
|
|
34 $(CC) -c $(CFLAGS) -o $@ $<
|
|
35
|
|
36 COMMONLIBS = libvo/libvo.a libac3/libac3.a mp3lib/libMP3.a
|
|
37
|
|
38 loader/libloader.a:
|
|
39 $(MAKE) -C loader
|
|
40
|
|
41 libmpeg2/libmpeg2.a:
|
|
42 $(MAKE) -C libmpeg2
|
|
43
|
|
44 libvo/libvo.a:
|
|
45 $(MAKE) -C libvo
|
|
46
|
|
47 libac3/libac3.a:
|
|
48 $(MAKE) -C libac3
|
|
49
|
|
50 mp3lib/libMP3.a:
|
|
51 $(MAKE) -C mp3lib
|
|
52
|
|
53 opendivx/libdecore.a:
|
|
54 $(MAKE) -C opendivx
|
|
55
|
|
56 encore/libencore.a:
|
|
57 $(MAKE) -C encore
|
|
58
|
|
59 $(PRG): .depend mplayer.o $(OBJS) loader/libloader.a libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
|
|
60 $(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
|
|
61
|
|
62 $(PRG_HQ): .depend mplayerHQ.o $(OBJS) loader/libloader.a libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
|
|
63 $(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
|
|
64
|
|
65 $(PRG_AVIP): .depend aviparse.o $(OBJS) loader/libloader.a $(COMMONLIBS)
|
|
66 $(CC) $(CFLAGS) -o $(PRG_AVIP) aviparse.o $(OBJS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader -ldl $(VO_LIBS) -lpthread
|
|
67
|
|
68 $(PRG_TV): .depend tvision.o $(OBJS) $(COMMONLIBS)
|
|
69 $(CC) $(CFLAGS) -o $(PRG_TV) tvision.o $(OBJS) -lm $(TERMCAP_LIB) $(VO_LIBS)
|
|
70
|
|
71 install: $(PRG)
|
|
72 install -g $(GROUP) -o $(OWNER) -m $(PERM) -s $(PRG) $(BINDIR)
|
|
73 install -D -m 644 DOCS/mplayer.1 $(prefix)/man/man1/mplayer.1
|
|
74
|
|
75 clean:
|
|
76 rm -f *.o *~ $(OBJS)
|
|
77
|
|
78 distclean:
|
|
79 @for a in mp3lib libac3 libmpeg2 opendivx encore libvo loader drivers drivers/syncfb ; do $(MAKE) -C $$a distclean ; done
|
|
80 rm -f *~ $(PRG) $(PRG_HQ) $(PRG_AVIP) $(PRG_TV) $(OBJS) *.o *.a .depend
|
|
81
|
|
82 dep: depend
|
|
83
|
|
84 depend: .depend
|
|
85 @for a in mp3lib libac3 libmpeg2 libvo opendivx encore ; do $(MAKE) -C $$a dep ; done
|
|
86
|
|
87 .depend: Makefile config.mak config.h
|
|
88 makedepend -f- -- $(CFLAGS) -- mplayer.c mplayerHQ.c aviparse.c tvision.c $(SRCS) 1>.depend 2>/dev/null
|
|
89
|
|
90 #
|
|
91 # include dependency files if they exist
|
|
92 #
|
|
93 ifneq ($(wildcard .depend),)
|
|
94 include .depend
|
|
95 endif
|