Ticket #5855: Makefile

File Makefile, 2.4 KB (added by David Herman <dave@…>, 18 years ago)
Line 
1#
2# Makefile for installing nuvexport
3#
4
5BINS = nuvexport nuvinfo
6
7CONF = nuvexportrc
8
9EXPORT_MODULES = export/generic.pm \
10 export/ffmpeg.pm \
11 export/transcode.pm \
12 export/mencoder.pm \
13 export/NUV_SQL.pm \
14 export/transcode/DVCD.pm \
15 export/transcode/DVD.pm \
16 export/transcode/SVCD.pm \
17 export/transcode/VCD.pm \
18 export/transcode/XviD.pm \
19 export/ffmpeg/XviD.pm \
20 export/ffmpeg/DivX.pm \
21 export/ffmpeg/MP3.pm \
22 export/ffmpeg/ASF.pm \
23 export/ffmpeg/SVCD.pm \
24 export/ffmpeg/DVCD.pm \
25 export/ffmpeg/DVD.pm \
26 export/ffmpeg/VCD.pm \
27 export/ffmpeg/PSP.pm \
28 export/ffmpeg/MP4.pm \
29 export/mencoder/XviD.pm \
30 export/mencoder/H264.pm
31MODULE_SUBDIRS = transcode \
32 ffmpeg \
33 mencoder
34MYTHTV_MODULES = mythtv/nuvinfo.pm \
35 mythtv/recordings.pm
36NUVEXPORT_MODULES = nuv_export/help.pm \
37 nuv_export/shared_utils.pm \
38 nuv_export/task.pm \
39 nuv_export/cli.pm \
40 nuv_export/ui.pm
41MODULES = ${EXPORT_MODULES} ${MYTHTV_MODULES} ${NUVEXPORT_MODULES}
42
43NUVEXPORT_LINKS = divx dvcd dvd mp3 nuvsql svcd vcd asf xvid
44
45OWNER =
46
47INSTALL = /usr/bin/install
48
49prefix=/usr/local
50bindir=${prefix}/bin
51datadir=${prefix}/share
52sysconfdir=/etc
53
54MODDIR=${datadir}/nuvexport
55
56default:
57 @echo "Use \"make install\" to install the new version and \"make uninstall\" to remove this version"
58
59install:
60 # First the binaries
61 @for i in ${BINS} ; do \
62 ${INSTALL} -Dv ${OWNER} -m 0755 $$i ${bindir}/$$i; \
63 done
64 # Then the config file(s)
65 @for i in ${CONF} ; do \
66 if [ -e "${sysconfdir}"/"$$i" ]; then \
67 ${INSTALL} -Dv ${OWNER} -m 0755 $$i ${sysconfdir}/$$i.dist; \
68 else \
69 ${INSTALL} -Dv ${OWNER} -m 0755 $$i ${sysconfdir}/$$i; \
70 fi \
71 done
72 # Install the mode symlinks
73 @for i in ${NUVEXPORT_LINKS} ; do \
74 ln -fs nuvexport ${bindir}/nuvexport-$$i; \
75 done
76 # Install the modules
77 @for i in ${MODULES} ; do \
78 ${INSTALL} -Dv ${OWNER} -m 0755 $$i ${MODDIR}/$$i; \
79 done
80
81uninstall:
82 # First the binaries
83 @for i in ${BINS} ; do \
84 rm -f ${bindir}/$$i; \
85 done
86 # Remove the mode symlinks
87 @for i in ${NUVEXPORT_LINKS} ; do \
88 rm -f ${bindir}/nuvexport-$$i; \
89 done
90 # Remove the modules
91 @for i in ${MODULES} ; do \
92 rm -f ${MODDIR}/$$i; \
93 done
94