File: Makefile

package info (click to toggle)
pidgin-mra 20100304-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 256 kB
  • ctags: 323
  • sloc: ansic: 2,445; makefile: 55; sh: 7
file content (56 lines) | stat: -rw-r--r-- 1,824 bytes parent folder | download
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
LIBDIR ?= /usr/lib
DATADIR ?= /usr/share
LINUX_COMPILER = gcc

LIBPURPLE_CFLAGS = -I/usr/include/libpurple -DPURPLE_PLUGINS -DENABLE_NLS
GLIB_CFLAGS = $(shell pkg-config --cflags glib-2.0)

#Standard stuff here
MRA_SOURCES =     \
    src/mra_net.c \
    src/libmra.c

all:	release

ifdef DESTDIR

install:
	install -d -m 0755    ${DESTDIR}${LIBDIR}/purple-2/
	install -d -m 0755    ${DESTDIR}${DATADIR}/pixmaps/pidgin/protocols/16/
	install -d -m 0755    ${DESTDIR}${DATADIR}/pixmaps/pidgin/protocols/22/
	install -d -m 0755    ${DESTDIR}${DATADIR}/pixmaps/pidgin/protocols/48/
	install libmra.so     ${DESTDIR}${LIBDIR}/purple-2/
	install img/mra16.png ${DESTDIR}${DATADIR}/pixmaps/pidgin/protocols/16/mra.png
	install img/mra22.png ${DESTDIR}${DATADIR}/pixmaps/pidgin/protocols/22/mra.png
	install img/mra48.png ${DESTDIR}${DATADIR}/pixmaps/pidgin/protocols/48/mra.png

uninstall:
	rm -f ${DESTDIR}${LIBDIR}/purple-2/libmra.so
	rm -f ${DESTDIR}${DATADIR}/pixmaps/pidgin/protocols/16/mra.png
	rm -f ${DESTDIR}${DATADIR}/pixmaps/pidgin/protocols/22/mra.png
	rm -f ${DESTDIR}${DATADIR}/pixmaps/pidgin/protocols/48/mra.png

else

install:
	install libmra.so     ${LIBDIR}/purple-2/
	install img/mra16.png ${DATADIR}/pixmaps/pidgin/protocols/16/mra.png
	install img/mra22.png ${DATADIR}/pixmaps/pidgin/protocols/22/mra.png
	install img/mra48.png ${DATADIR}/pixmaps/pidgin/protocols/48/mra.png

uninstall:
	rm -f ${LIBDIR}/purple-2/libmra.so
	rm -f ${DATADIR}/pixmaps/pidgin/protocols/16/mra.png
	rm -f ${DATADIR}/pixmaps/pidgin/protocols/22/mra.png
	rm -f ${DATADIR}/pixmaps/pidgin/protocols/48/mra.png

endif

clean:
	rm -f libmra.so

libmra.so:	${MRA_SOURCES}
	${LINUX_COMPILER} ${LIBPURPLE_CFLAGS} -Wall -Wextra -pthread ${GLIB_CFLAGS} -I. -g3 -O2 -pipe ${MRA_SOURCES} -o libmra.so -shared -fPIC -DPIC

release:	libmra.so