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
|
|
20 SRCS = linux/getch2.c linux/timer-lx.c linux/shmem.c xa/xa_gsm.c lirc_mp.c
|
|
21 OBJS = linux/getch2.o linux/timer-lx.o linux/shmem.o xa/xa_gsm.o lirc_mp.o
|
|
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
|
118
|
30 all: $(PRG) $(PRG_HQ)
|
1
|
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
|
28
|
59 $(PRG): .depend mplayer.o $(OBJS) loader/libloader.a libmpeg2/libmpeg2.a opendivx/libdecore.a $(COMMONLIBS) encore/libencore.a
|
1
|
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
|
118
|
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
|
28
|
65 $(PRG_AVIP): .depend aviparse.o $(OBJS) loader/libloader.a $(COMMONLIBS)
|
1
|
66 $(CC) $(CFLAGS) -o $(PRG_AVIP) aviparse.o $(OBJS) $(A_LIBS) -lm $(TERMCAP_LIB) -Lloader -lloader -ldl $(VO_LIBS) -lpthread
|
|
67
|
28
|
68 $(PRG_TV): .depend tvision.o $(OBJS) $(COMMONLIBS)
|
1
|
69 $(CC) $(CFLAGS) -o $(PRG_TV) tvision.o $(OBJS) -lm $(TERMCAP_LIB) $(VO_LIBS)
|
|
70
|
|
71 install: $(PRG)
|
78
|
72 install -g $(GROUP) -o $(OWNER) -m $(PERM) -s $(PRG) $(BINDIR)
|
22
|
73 install -D -m 644 DOCS/mplayer.1 $(prefix)/man/man1/mplayer.1
|
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
|
118
|
80 rm -f *~ $(PRG) $(PRG_HQ) $(PRG_AVIP) $(PRG_TV) $(OBJS) *.o *.a .depend
|
1
|
81
|
|
82 dep: depend
|
|
83
|
28
|
84 depend: .depend
|
1
|
85 @for a in mp3lib libac3 libmpeg2 libvo opendivx encore ; do $(MAKE) -C $$a dep ; done
|
|
86
|
28
|
87 .depend: Makefile config.mak config.h
|
118
|
88 makedepend -f- -- $(CFLAGS) -- mplayer.c mplayerHQ.c aviparse.c tvision.c $(SRCS) 1>.depend 2>/dev/null
|
22
|
89
|
28
|
90 #
|
|
91 # include dependency files if they exist
|
|
92 #
|
|
93 ifneq ($(wildcard .depend),)
|
|
94 include .depend
|
|
95 endif
|