forked from mp3splt/mp3splt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
96 lines (84 loc) · 3.25 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
LIBMP3SPLT_DIR=libmp3splt
MP3SPLT_DIR=newmp3splt
MP3SPLT_GTK_DIR=mp3splt-gtk
usage: help
#help of this Makefile; explains how this makefile should be used
help:
@echo
@echo "The current directory must contain libmp3splt, newmp3splt and mp3splt-gtk."
@echo
@echo "Usage : "
@echo
@echo "make root_install : compile and installs the program (must be root)"
@echo "make root_uninstall : uninstalls the programs as root (must be root)"
@echo
@echo "make source_packages : generate source packages"
@echo
@echo "make debian_packages : generate debian packages"
@echo
@echo "make windows_cross_installers : generates windows installers with a cross compilation"
@echo
#source distribution creation
source_packages: clean_tmp
./${LIBMP3SPLT_DIR}/make_source_package.sh
./${MP3SPLT_DIR}/make_source_package.sh
./${MP3SPLT_GTK_DIR}/make_source_package.sh
#debian packages creation
debian_packages: clean_tmp
./${LIBMP3SPLT_DIR}/debian/make_debian_package.sh
./${MP3SPLT_DIR}/debian/make_debian_package.sh
./${MP3SPLT_GTK_DIR}/debian/make_debian_package.sh
#create windows installer by cross compilation
windows_cross_installers:
./${LIBMP3SPLT_DIR}/windows/make_windows_cross_compilation.sh
./${MP3SPLT_DIR}/windows/make_windows_cross_compilation.sh
./${MP3SPLT_DIR}/windows/make_windows_installer.sh cross
./${MP3SPLT_GTK_DIR}/windows/make_windows_cross_compilation.sh
./${MP3SPLT_GTK_DIR}/windows/make_windows_installer.sh cross
./${MP3SPLT_DIR}/windows/make_windows_zip.sh cross
./${MP3SPLT_GTK_DIR}/windows/make_windows_zip.sh cross
rm -rf translations
#installs libmp3splt, mp3splt and mp3splt-gtk (must be run as root)
root_install: root_libmp3splt root_newmp3splt root_mp3splt-gtk
root_libmp3splt:
cd ${LIBMP3SPLT_DIR} && ./autogen.sh && \
./configure && make clean && make && make install
# \
# && if [ -z `grep '/usr/local/lib' /etc/ld.so.conf` ];\
# then `echo '/usr/local/lib' >> /etc/ld.so.conf` && ldconfig;fi
root_newmp3splt:
cd ${MP3SPLT_DIR} && ./autogen.sh && ./configure \
&& make clean && make && make install
root_mp3splt-gtk:
cd ${MP3SPLT_GTK_DIR} && ./autogen.sh && ./configure --enable-audacious --enable-gstreamer \
&& make clean && make && make install
#uninstalls libmp3splt, mp3splt and mp3splt-gtk as root
root_uninstall:
cd ${LIBMP3SPLT_DIR} && make uninstall
cd ${MP3SPLT_DIR} && make uninstall
cd ${MP3SPLT_GTK_DIR} && make uninstall
#cleans the /tmp directories for a good build
DATE=`date +-%d_%m_%Y__%H_%M_%S`
clean_tmp:
$(shell if [[ -e /tmp/temp ]];then \
mv /tmp/temp /tmp/temp${DATE} &>/dev/null;fi)
sleep 1
#clean the builds
clean:
cd ${LIBMP3SPLT_DIR} && make clean
cd ${MP3SPLT_DIR} && make clean
cd ${MP3SPLT_GTK_DIR} && make clean
distclean:
cd ${LIBMP3SPLT_DIR} && make distclean
cd ${MP3SPLT_DIR} && make distclean
cd ${MP3SPLT_GTK_DIR} && make distclean
vim:
screen vim libmp3splt/src/*.{c,h} libmp3splt/plugins/*.{c,h} libmp3splt/include/libmp3splt/*.h newmp3splt/src/*.c mp3splt-gtk/src/*.{c,h}
compile_all:
cd ${LIBMP3SPLT_DIR} && ./autogen.sh && ./configure && make clean && make
cd ${MP3SPLT_DIR} && ./autogen.sh && ./configure && make clean && make
cd ${MP3SPLT_GTK_DIR} && ./autogen.sh && ./configure && make clean && make
compile:
cd ${LIBMP3SPLT_DIR} && make
cd ${MP3SPLT_DIR} && make
cd ${MP3SPLT_GTK_DIR} && make