Commit | Line | Data |
---|---|---|
21c4e167 H |
1 | # |
2 | # pidgin-autoanswer Makefile | |
3 | # | |
4 | # Copyright 2009 Dmitriy Kostiuk < d.k AT list DOT ru> | |
5 | # | |
6 | # Heavily inspired and copied from : | |
7 | # pidgin-latex plugin by Kevin Stange <extprefs@simguy.net> | |
8 | # | |
9 | # This program is free software; you can redistribute it and/or modify | |
10 | # it under the terms of the GNU General Public License as published by | |
11 | # the Free Software Foundation; either version 2 of the License, or | |
12 | # (at your option) any later version. | |
13 | # | |
14 | # This program is distributed in the hope that it will be useful, | |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | # GNU General Public License for more details. | |
18 | # | |
19 | # You should have received a copy of the GNU General Public License | |
20 | # along with this program; if not, write to the Free Software | |
21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 | # | |
23 | ||
24 | CC := gcc | |
25 | LIBTOOL := libtool | |
26 | ||
27 | ifeq ($(PREFIX),) | |
28 | LIB_INSTALL_DIR = $(HOME)/.purple/plugins | |
29 | else | |
30 | LIB_INSTALL_DIR = $(PREFIX)/lib/pidgin | |
31 | endif | |
32 | ||
33 | PIDGIN_AUTOANSWER = autoansw | |
34 | ||
35 | PIDGIN_CFLAGS = $(shell pkg-config pidgin --cflags) | |
36 | GTK_CFLAGS = $(shell pkg-config gtk+-2.0 --cflags) | |
37 | PIDGIN_LIBS = $(shell pkg-config pidgin --libs) | |
38 | GTK_LIBS = $(shell pkg-config gtk+-2.0 --libs) | |
39 | PIDGIN_LIBDIR = $(shell pkg-config --variable=libdir pidgin)/pidgin | |
40 | ||
41 | all: $(PIDGIN_AUTOANSWER).so | |
42 | ||
43 | install: all | |
44 | mkdir -p $(LIB_INSTALL_DIR) | |
45 | cp $(PIDGIN_AUTOANSWER).so $(LIB_INSTALL_DIR) | |
46 | ||
47 | $(PIDGIN_AUTOANSWER).so: $(PIDGIN_AUTOANSWER).o | |
48 | $(CC) -shared $(CFLAGS) $< -o $@ $(PIDGIN_LIBS) $(GTK_LIBS) -Wl,--export-dynamic -Wl,-soname | |
49 | ||
50 | $(PIDGIN_AUTOANSWER).o:$(PIDGIN_AUTOANSWER).c | |
51 | $(CC) $(CFLAGS) -fPIC -c $< -o $@ $(PIDGIN_CFLAGS) $(GTK_CFLAGS) -DHAVE_CONFIG_H | |
52 | ||
53 | clean: | |
54 | rm -rf *.o *.c~ *.h~ *.so *.la .libs |