summaryrefslogtreecommitdiff
path: root/examples/p2p-im/Makefile
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2017-04-29 04:36:01 +0300
committerdefanor <defanor@uberspace.net>2017-04-29 04:36:01 +0300
commita06cc218bfa18943a46e051d5bbf463e1ddc0b6e (patch)
treed160d59dc14e0693ac8a304574dbf726b92850a0 /examples/p2p-im/Makefile
Initial commit
Diffstat (limited to 'examples/p2p-im/Makefile')
-rw-r--r--examples/p2p-im/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/examples/p2p-im/Makefile b/examples/p2p-im/Makefile
new file mode 100644
index 0000000..72ca0f5
--- /dev/null
+++ b/examples/p2p-im/Makefile
@@ -0,0 +1,33 @@
+# This Makefile builds and installs the libpurple plugin.
+
+# Using -Wno-unused-parameter here, since libpurple predefines those
+# parameters, and we don't always need them.
+
+# Not using -Werror, since on Debian 9 -pedantic points to an error in
+# libpurple/certificate.h.
+
+# C99 is needed to initialize large structures with less boilerplate,
+# and glib requires it anyway. GNU extensions are also handy, so using
+# gnu99.
+
+CC = gcc
+CFLAGS += -std=gnu99 -Wall -Wextra -Wno-unused-parameter -pedantic \
+ -g -DPURPLE_PLUGINS -fPIC -DPIC -shared \
+ `pkg-config --cflags purple glib-2.0`
+LDLIBS += `pkg-config --libs purple glib-2.0`
+PLUGIN_DIR = `pkg-config --variable=plugindir purple`
+SOURCES = libpurple-fifo-plugin.c
+PLUGIN_ID = prpl-defanor-fifo
+TARGET = ${PLUGIN_ID}.so
+
+all:
+ ${CC} ${CFLAGS} ${SOURCES} ${LDLIBS} -o ${TARGET}
+
+install:
+ install ${TARGET} ${PLUGIN_DIR}
+
+uninstall:
+ rm -f ${PLUGIN_DIR}/${TARGET}
+
+clean:
+ rm -f ${TARGET}