updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / pidgin-gpg / Makefile
blob937dc8dd0adbaedd6cd5444df069386f35200b19
1 # pidgin-gpg Makefile
3 # Copyright (C) 2007 Andrey Angelov <mortallink@mail.ru>
5 # Modified for ArchLinux i686 by Tilman Bartsch <tba@timaba.de>
6 # -use make instead of gmake
7 # -set correct path (DESTDIR)/usr/lib/pidgin
10 #Note for Linux compilation use make for BSD use gmake
12 # This program is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU Lesser General Public License as published by
14 # the Free Software Foundation; either version 2.1 of the License, or
15 # (at your option) any later version.
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU Lesser General Public License for more details.
22 # You should have received a copy of the GNU Lesser General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 CC := gcc
27 LIBTOOL := libtool
29 #ifeq ($(PREFIX),)
30 # LIB_INSTALL_DIR = $(PREFIX)/lib/pidgin
31 #else
32 # LIB_INSTALL_DIR = $(HOME)/.purple/plugins
33 #endif
35 PIDGIN_GPG = pidgin-gpg
37 #cflags need for compilation
38 PIDGIN_CFLAGS = $(shell pkg-config pidgin --cflags)
39 GTK_CFLAGS = $(shell pkg-config gtk+-2.0 --cflags)
40 GPGME_CFLAGS = $(shell gpgme-config --cflags)
42 #libflags need for compilation
43 PIDGIN_LIBS = $(shell pkg-config pidgin --libs)
44 GTK_LIBS = $(shell pkg-config gtk+-2.0 --libs)
45 GPGME_LIBS = $(shell gpgme-config --libs)
47 #pidgin libs directory
48 PIDGIN_LIBDIR = $(shell pkg-config --variable=libdir pidgin)/pidgin
50 all: note
51 @make compilation
53 note:
54 @echo
55 @echo -e "######### \033[7m\033[1mPidgin-GPG for pidgin COMPILING NOTES\033[0m #########"
56 @echo "--------------------------------------------------------------------------------"
57 @echo "You'll need GTK 2.x Pidgin 2.x Gpgme 1.x and Gnupg 2.x to compile Pidgin-GPG!"
58 @echo "ON LINUX USE MAKE ON BSD USE GMAKE IF YOU USE MAKE FOR LINUX COMPILATION"
59 @echo "PLEASE EDIT THE MAKE FILE AND REPLEACE GMAKE WITH MAKE"
60 @echo "If there is any errors please contact with me at mortallink@mail.ru"
61 @echo "--------------------------------------------------------------------------------"
62 @echo
63 @echo "Press ENTER to continue or CTRL+C to abort..."; read junk
65 #compilation
66 compilation:
67 @echo
68 @echo "Compiling now..."
69 @echo
70 @make $(PIDGIN_GPG).so
72 #making
73 $(PIDGIN_GPG).so: $(PIDGIN_GPG).o
74 $(CC) -D_FILE_OFFSET_BITS=64 -shared $(CFLAGS) $< -o $@ $(PIDGIN_LIBS) $(GTK_LIBS) $(GPGME_LIBS) -Wl,--export-dynamic -Wl,-soname
76 @echo
77 @ls -l pidgin-gpg.so
78 @echo
79 @echo -e "Compiling finished -->> $(PWD)/\033[1mpidgin-gpg.so\033[0m"
80 @echo
82 $(PIDGIN_GPG).o:$(PIDGIN_GPG).c $(PIDGIN_GPG).h
83 $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -O2 -fPIC -c $< -o $@ $(PIDGIN_CFLAGS) $(GPGME_CFLAGS) $(GTK_CFLAGS) -DHAVE_CONFIG_H
85 #do install
86 install: all
87 @echo
88 @echo "Installing now..."
89 @echo
90 mkdir -p $(DESTDIR)/usr/lib/pidgin/
91 cp $(PIDGIN_GPG).so $(DESTDIR)/usr/lib/pidgin/
93 #do clean
94 clean:
95 @echo
96 @echo Cleaning up...
97 rm -rf *.o *.c~ *.h~ *.so *.la .libs