-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·75 lines (66 loc) · 3.13 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
#Customisable stuff here
CFLAGS = -g -Wall
SYSTEM_CFLAGS = -I/usr/include -I/usr/local/include
DEB_PACKAGE_DIR = ./debdir
SRCDIR=./src
FCHAT_SOURCES = \
${SRCDIR}/actions.c \
${SRCDIR}/attention.c \
${SRCDIR}/buddy.c \
${SRCDIR}/chat.c \
${SRCDIR}/connection.c \
${SRCDIR}/fchat.c \
${SRCDIR}/fchat.h \
${SRCDIR}/info.c \
${SRCDIR}/process_cmds.c \
${SRCDIR}/send_cmds.c \
${SRCDIR}/status.c \
#Standard stuff here
.PHONY: all clean install uninstall getpot locale dist
#all: clean libfchat.so dist sourcepackage
all: clean libfchat.so locale
install: libfchat.so locale
# cp libfchat.so ~/.purple/plugins/
# mkdir --mode=664 --parents ${DESTDIR}/usr/lib/purple-2/
mkdir --parents ${DESTDIR}/usr/lib/purple-2/
cp libfchat.so ${DESTDIR}/usr/lib/purple-2/
chmod 664 ${DESTDIR}/usr/lib/purple-2/libfchat.so
chown root:root ${DESTDIR}/usr/lib/purple-2/libfchat.so
# fchat16.png
mkdir --parents ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/16/
cp ./share/pixmaps/pidgin/protocols/16/fchat.png ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/16/fchat.png
chmod 664 ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/16/fchat.png
chown root:root ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/16/fchat.png
# fchat22.png
mkdir --parents ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/22/
cp ./share/pixmaps/pidgin/protocols/22/fchat.png ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/22/fchat.png
chmod 664 ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/22/fchat.png
chown root:root ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/22/fchat.png
# fchat48.png
mkdir --parents ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/48/
cp ./share/pixmaps/pidgin/protocols/48/fchat.png ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/48/fchat.png
chmod 664 ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/48/fchat.png
chown root:root ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/48/fchat.png
# fchat.mo
mkdir --parents ${DESTDIR}/usr/share/locale/ru/LC_MESSAGES/
cp ./share/locale/ru/LC_MESSAGES/fchat.mo ${DESTDIR}/usr/share/locale/ru/LC_MESSAGES/fchat.mo
chmod 664 ${DESTDIR}/usr/share/locale/ru/LC_MESSAGES/fchat.mo
chown root:root ${DESTDIR}/usr/share/locale/ru/LC_MESSAGES/fchat.mo
uninstall:
# rm -f ~/.purple/plugins/libfchat.so
rm -f ${DESTDIR}/usr/lib/purple-2/libfchat.so
rm -f ${DESTDIR}/usr/share/locale/ru/LC_MESSAGES/fchat.mo
rm -f ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/16/fchat.png ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/22/fchat.png ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/48/fchat.png
libfchat.so: ${FCHAT_SOURCES}
${CC} ${SYSTEM_CFLAGS} $$(pkg-config --libs --cflags glib-2.0 purple) ${FCHAT_SOURCES} -o libfchat.so -shared -fPIC -DPIC
clean:
rm -f libfchat.so prpl-fchat-source.tar.bz2
rm -rf prpl-fchat
pot:
xgettext --package-name=fchat -k_ -o ./i18n/fchat.pot ${FCHAT_SOURCES}
locale:
mkdir -p ./share/locale/ru/LC_MESSAGES/
msgfmt -o ./share/locale/ru/LC_MESSAGES/fchat.mo ./i18n/ru.po
# https://developer.pidgin.im/wiki/CHowTo/Valgrind
debug:
valgrind --tool=memcheck --leak-check=yes --leak-resolution=high --num-callers=20 --trace-children=no --child-silent-after-fork=yes --track-origins=yes --track-fds=yes pidgin -d 2>&1 | tee valgrind.log