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