13
16
# The location of the libotr include files. Note that if, for example,
14
17
# the full path of message.h is /usr/include/libotr/message.h, you
15
18
# should put /usr/include on the next line, not /usr/include/libotr
16
LIBOTRINCDIR = /usr/include
19
LIBOTRINCDIR = /usr/i586-mingw32msvc/include
18
21
# The locataion of libotr.a.
19
LIBOTRLIBDIR = /usr/lib
22
LIBOTRLIBDIR = /usr/i586-mingw32msvc/lib
24
# Location of libintl.h
25
LIBINTLINCDIR = /usr/i586-mingw32msvc/include
27
# Location of intl.dll
28
LIBINTLLIBDIR = /usr/i586-mingw32msvc/lib
30
# Installed location of libotr toolkit
31
LIBOTRBINDIR = /usr/i586-mingw32msvc/bin
33
# Source location of libotr
34
LIBOTRSRCDIR = ../libotr
22
TARGET = pidgin-otr.so
37
TARGET = pidgin-otr.dll
40
ZIPFILE = pidgin-otr-$(PIDGIN_OTR_VERSION).zip
25
42
CC = i586-mingw32msvc-gcc
26
LIBOTRINCDIR = /usr/i586-mingw32msvc/include
27
LIBOTRLIBDIR = /usr/i586-mingw32msvc/lib
28
TARGET = pidgin-otr.dll
29
43
LDFLAGS = -Wl,--enable-auto-image-base
30
44
LDLIBS = $(LIBOTRLIBDIR)/libotr.a -lgtk-win32-2.0 -lglib-2.0 -lgdk_pixbuf-2.0 \
31
-lgobject-2.0 -lpidgin -llibpurple -lgcrypt -lgpg-error
34
LDFLAGS = -module -avoid-version
35
LDLIBS = -lotr -lgcrypt
39
PIDGINDIR = /usr/lib/pidgin
40
INSTALLDIR = $(DESTDIR)$(PIDGINDIR)
45
-lgobject-2.0 -lpidgin -llibpurple -lgcrypt -lgpg-error \
46
-L$(LIBINTLLIBDIR) -lintl
43
override CFLAGS += -g -Wall -I$(PIDGIN_HEADERS) -I$(PURPLE_HEADERS) \
49
override CFLAGS += -g -O2 -Wall -I$(PIDGIN_HEADERS) -I$(PURPLE_HEADERS) \
44
50
$(GTK_HDRS) -I$(LIBOTRINCDIR) $(FPIC) -DUSING_GTK -DPURPLE_PLUGINS \
45
-DPIDGIN_OTR_VERSION=\"$(PIDGIN_OTR_VERSION)\" -DPIDGIN_NAME=\"Pidgin\"
51
-DPIDGIN_OTR_VERSION=\"$(PIDGIN_OTR_VERSION)\" \
52
-DPIDGIN_NAME=\"Pidgin\" -I$(LIBINTLINCDIR) -DENABLE_NLS \
53
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
56
$(MAKE) -C po -f Makefile.mingw
49
$(TARGET): otr-plugin.o ui.o dialogs.o gtk-ui.o gtk-dialog.o
58
$(TARGET): otr-plugin.o ui.o dialogs.o gtk-ui.o gtk-dialog.o tooltipmenu.o
50
59
$(CC) -g -shared $(LDFLAGS) $^ -o $@ $(LDLIBS)
53
install -d $(INSTALLDIR)
54
install -m 0755 $(TARGET) $(INSTALLDIR)
64
$(MAKE) -C po -f Makefile.mingw clean
67
$(MAKE) -C po -f Makefile.mingw distclean
69
## Package up all the pieces needed to build the installer
72
# Copy pieces over from the libotr source dir
73
for f in otr_mackey.exe otr_parse.exe otr_remac.exe otr_modify.exe \
74
otr_readforge.exe otr_sesskeys.exe; do \
75
cp -a $(LIBOTRBINDIR)/$$f win32_export/; done
76
cp -a $(LIBOTRSRCDIR)/README win32_export/README.Toolkit.txt
77
cp -a $(LIBOTRSRCDIR)/Protocol-v2.html win32_export/Protocol-v2.html
78
cp -a $(LIBOTRSRCDIR)/COPYING win32_export/COPYING.txt
79
cp -a $(LIBOTRSRCDIR)/COPYING.LIB win32_export/COPYING.LIB.txt
80
cp -a $(TARGET) win32_export/
81
cp -a README win32_export/README.txt
82
cp -a packaging/windows/pidgin-otr.nsi win32_export/
83
for i in po/*.gmo; do \
84
l=`basename $$i .gmo`; \
85
mkdir -p win32_export/locale/$$l/LC_MESSAGES; \
86
cp -a $$i win32_export/locale/$$l/LC_MESSAGES/pidgin-otr.mo; \
88
cp -a po/*.gmo win32_export/
90
i586-mingw32msvc-strip *.exe *.dll; \
91
perl -pi -e 's/$$/\r/' README.Toolkit.txt Protocol-v2.html \
92
COPYING.txt COPYING.LIB.txt README.txt; \
93
rm -f ../$(ZIPFILE); \
94
zip -r ../$(ZIPFILE) README.txt \
95
README.Toolkit.txt Protocol-v2.html COPYING.txt \
96
COPYING.LIB.txt *.exe *.dll *.nsi locale