~ubuntu-branches/ubuntu/oneiric/pidgin-otr/oneiric-security

« back to all changes in this revision

Viewing changes to Makefile.mingw

  • Committer: Bazaar Package Importer
  • Author(s): Thibaut VARENE
  • Date: 2008-07-10 17:34:32 UTC
  • mfrom: (2.1.2 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080710173432-aqx359odj7cp182a
Tags: 3.2.0-2
Make key generation use /dev/urandom (Closes: #489523)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
WIN32=1
2
2
 
3
3
# The version number to put in the plugin info
4
 
PIDGIN_OTR_VERSION = 3.0.0
 
4
PIDGIN_OTR_VERSION = 3.2.0
 
5
 
 
6
# Name of the gettext domain
 
7
GETTEXT_PACKAGE = pidgin-otr
5
8
 
6
9
# Replace this with the path to the pidgin and purple headers
7
10
PIDGIN_HEADERS ?= /usr/i586-mingw32msvc/include/pidgin
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
17
20
 
18
21
# The locataion of libotr.a.
19
 
LIBOTRLIBDIR = /usr/lib
 
22
LIBOTRLIBDIR = /usr/i586-mingw32msvc/lib
 
23
 
 
24
# Location of libintl.h
 
25
LIBINTLINCDIR = /usr/i586-mingw32msvc/include
 
26
 
 
27
# Location of intl.dll
 
28
LIBINTLLIBDIR = /usr/i586-mingw32msvc/lib
 
29
 
 
30
# Installed location of libotr toolkit
 
31
LIBOTRBINDIR = /usr/i586-mingw32msvc/bin
 
32
 
 
33
# Source location of libotr
 
34
LIBOTRSRCDIR = ../libotr
20
35
 
21
36
# The target
22
 
TARGET = pidgin-otr.so
23
 
 
24
 
ifdef WIN32
 
37
TARGET = pidgin-otr.dll
 
38
 
 
39
# The target zipfile
 
40
ZIPFILE = pidgin-otr-$(PIDGIN_OTR_VERSION).zip
 
41
 
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
32
 
else
33
 
FPIC = -fPIC
34
 
LDFLAGS = -module -avoid-version
35
 
LDLIBS = -lotr -lgcrypt
36
 
endif
37
 
 
38
 
# Install directory
39
 
PIDGINDIR = /usr/lib/pidgin
40
 
INSTALLDIR = $(DESTDIR)$(PIDGINDIR)
 
45
         -lgobject-2.0 -lpidgin -llibpurple -lgcrypt -lgpg-error \
 
46
         -L$(LIBINTLLIBDIR) -lintl
41
47
 
42
48
CC ?= gcc
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)\"
46
54
 
47
55
all: $(TARGET)
 
56
        $(MAKE) -C po -f Makefile.mingw
48
57
 
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)
51
60
 
52
 
install: all
53
 
        install -d $(INSTALLDIR)
54
 
        install -m 0755 $(TARGET) $(INSTALLDIR)
55
61
clean:
56
62
        rm -f *.o
57
63
        rm -f $(TARGET)
 
64
        $(MAKE) -C po -f Makefile.mingw clean
58
65
 
59
66
distclean: clean
 
67
        $(MAKE) -C po -f Makefile.mingw distclean
 
68
 
 
69
## Package up all the pieces needed to build the installer
 
70
zip: all
 
71
        mkdir win32_export
 
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; \
 
87
        done
 
88
        cp -a po/*.gmo win32_export/
 
89
        cd 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
 
97
        rm -rf win32_export