This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
forked from mrim-prpl-team/mrim-prpl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (67 loc) · 2.83 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
ifndef PODIR
PODIR=po/
endif
ifndef PRJID
PRJID=mrim-prpl-underbush
endif
ifndef POPRJ
POPRJ=${PODIR}${PRJID}
endif
ifndef LIBDIR
LIBDIR=lib
endif
ifndef FULL_LIBDIR
FULL_LIBDIR=usr/${LIBDIR}
endif
ifndef CC
CC=gcc
endif
ifndef CFLAGS
CFLAGS=-O0 -ggdb -g
endif
DEPENDENCIES=purple gtk+-2.0 zlib
CFLAGS+=`pkg-config ${DEPENDENCIES} --cflags` -fPIC -DPIC -std=c99
#CFLAGS+=-Wall -Wextra -Wconversion -Wsign-conversion -Winit-self -Wunreachable-code --pedantic -Wstrict-aliasing
#CFLAGS+= -g -ggdb
LDFLAGS+=`pkg-config ${DEPENDENCIES} --libs` -shared -ggdb -fPIC -DPIC
all: compile i18n
clean:
rm -f *.so
rm -f *.o
rm -f ${PODIR}*.mo
install:
install -Dm0755 libmrim-underbush.so ${DESTDIR}/${FULL_LIBDIR}/purple-2/mrim-underbush.so
#install -Dm0755 mrim.so ${DESTDIR}/${FULL_LIBDIR}/purple-2/mrim.so
install -Dm0644 pixmaps/mrim16.png ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/16/mrim.png
install -Dm0644 pixmaps/mrim22.png ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/22/mrim.png
install -Dm0644 pixmaps/mrim48.png ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/48/mrim.png
install -Dm0644 ${POPRJ}-ru_RU.mo ${DESTDIR}/usr/share/locale/ru/LC_MESSAGES/${PRJID}.mo
install -Dm0644 ${POPRJ}-ru_RU.mo ${DESTDIR}/usr/share/locale/ru_RU/LC_MESSAGES/${PRJID}.mo
uninstall:
rm -f ${DESTDIR}/${FULL_LIBDIR}/purple-2/libmrim-underbush.so
rm -f ${DESTDIR}/${FULL_LIBDIR}/purple-2/mrim.so
rm -f ${DESTDIR}/${FULL_LIBDIR}/purple-2/mrim-underbush.so
rm -f ${DESTDIR}/${FULL_LIBDIR}/purple-2/libmrim.so
rm -fv ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/16/mrim.png
rm -fv ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/22/mrim.png
rm -fv ${DESTDIR}/usr/share/pixmaps/pidgin/protocols/48/mrim.png
rm -fv ${DESTDIR}/usr/share/locale/ru/LC_MESSAGES/${PRJID}.mo
rm -fv ${DESTDIR}/usr/share/locale/ru_RU/LC_MESSAGES/${PRJID}.mo
compile: mrim.o package.o statuses.o cl.o message.o mrim-util.o ft.o
${CC} ${LDFLAGS} -o libmrim-underbush.so mrim.o package.o statuses.o cl.o message.o mrim-util.o ft.o
mrim.o: mrim.c mrim.h statuses.h cl.h message.h package.h config.h ft.h
${CC} -c ${CFLAGS} -o mrim.o mrim.c
package.o: package.c mrim.h statuses.h cl.h message.h package.h config.h
${CC} -c ${CFLAGS} -fPIC -DPIC -o package.o package.c
statuses.o: statuses.c mrim.h statuses.h cl.h message.h package.h config.h
${CC} -c ${CFLAGS} -fPIC -DPIC -o statuses.o statuses.c
cl.o: cl.c mrim.h statuses.h cl.h message.h package.h config.h
${CC} -c ${CFLAGS} -fPIC -DPIC -o cl.o cl.c
ft.o: ft.c ft.h mrim.h package.h cl.h config.h
${CC} -c ${CFLAGS} -fPIC -DPIC -o ft.o ft.c
message.o: message.c mrim.h statuses.h cl.h message.h package.h config.h
${CC} -c ${CFLAGS} -fPIC -DPIC -o message.o message.c
mrim-util.o: mrim-util.c mrim-util.h mrim.h config.h
${CC} -c ${CFLAGS} -fPIC -DPIC -o mrim-util.o mrim-util.c
i18n:
msgfmt ${POPRJ}-ru_RU.po --output-file=${POPRJ}-ru_RU.mo