~ubuntu-branches/ubuntu/natty/mozvoikko/natty-proposed

« back to all changes in this revision

Viewing changes to .pc/port_to_latest_firefox.patch/src/Makefile.xulrunner

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2011-12-20 00:19:52 UTC
  • mfrom: (18.1.3 natty-security)
  • Revision ID: package-import@ubuntu.com-20111220001952-kgbjh71gwu6l8023
Tags: 1.10.0-0ubuntu0.11.04.4
* Update for Firefox 9 (LP: #906389)
  - update debian/patches/port_to_latest_firefox.patch for
    mozISpellCheckingEngine changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2008 - 2009 Harri Pitkänen <hatapitk@iki.fi>
 
2
#
 
3
# This program is free software; you can redistribute it and/or
 
4
# modify it under the terms of the GNU General Public License
 
5
# as published by the Free Software Foundation; either version 2
 
6
# of the License, or (at your option) any later version.
 
7
#
 
8
# This program is distributed in the hope that it will be useful,
 
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
# GNU General Public License for more details.
 
12
#
 
13
# You should have received a copy of the GNU General Public License
 
14
# along with this program; if not, write to the Free Software
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
16
 
 
17
DESTDIR=/usr/lib/firefox
 
18
CC=g++ -c
 
19
CC_LINK=g++ -shared -Wl,--no-undefined
 
20
include ../mozvoikko.config
 
21
 
 
22
XULRUNNER_INCLUDES=$(shell pkg-config --cflags libxul-unstable)
 
23
XULRUNNER_LIBS=$(shell pkg-config --libs libxul-unstable)
 
24
 
 
25
HEADERS=mozVoikko.hxx mozVoikkoSpell.hxx mozVoikkoUtils.hxx
 
26
OBJECTS=mozVoikko mozVoikkoSpell mozVoikkoUtils mozVoikkoSpellFactory
 
27
COMPONENT=libmozvoikko.so
 
28
EXTENSION=mozvoikko.xpi
 
29
UUID={b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a}
 
30
 
 
31
ifndef CFLAGS
 
32
        CFLAGS=-O2
 
33
endif
 
34
CC_FLAGS=$(CFLAGS) -Wall -Werror -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fPIC
 
35
CC_INCLUDES=$(XULRUNNER_INCLUDES) -include mozilla-config.h -include xpcom-config.h
 
36
CC_DEFINES=-DSYSTEM_LIBVOIKKO
 
37
CC_LIBS=-Wl,--as-needed $(XULRUNNER_LIBS)
 
38
 
 
39
.PHONY: all clean xpi extension-files install-unpacked
 
40
 
 
41
all: xpi
 
42
 
 
43
xpi: $(EXTENSION)
 
44
 
 
45
extension-files: components/$(COMPONENT) install.rdf
 
46
 
 
47
$(EXTENSION): components/$(COMPONENT) install.rdf
 
48
        zip -r $@ $^
 
49
 
 
50
components/$(COMPONENT): $(patsubst %,%.o,$(OBJECTS))
 
51
        -mkdir -p components
 
52
        $(CC_LINK) -o $@ $^ $(CC_LIBS)
 
53
 
 
54
%.o: %.cpp
 
55
        $(CC) $(CC_FLAGS) $(CC_INCLUDES) $(CC_DEFINES) -o $@ $<
 
56
 
 
57
INSTALL_RDF_SEDSCRIPT="s/@FF_MIN@/$(MOZVOIKKO_FF_MIN)/g; \
 
58
        s/@FF_MAX@/*/g; \
 
59
        s/@TB_MIN@/$(MOZVOIKKO_TB_MIN)/g; \
 
60
        s/@TB_MAX@/*/g; \
 
61
        s/@SM_MIN@/$(MOZVOIKKO_SM_MIN)/g; \
 
62
        s/@SM_MAX@/*/g; \
 
63
        s/@VERSION@/$(MOZVOIKKO_VERSION)/g; \
 
64
        /@TARGET_PLATFORM@/d"
 
65
install.rdf: install.rdf.in
 
66
        sed -e $(INSTALL_RDF_SEDSCRIPT) < $^ > $@
 
67
 
 
68
clean:
 
69
        $(RM) $(patsubst %,%.o,$(OBJECTS)) $(EXTENSION) install.rdf chrome.manifest
 
70
        $(RM) -r components
 
71
 
 
72
install-unpacked: extension-files
 
73
        echo "binary-component components/libmozvoikko.so" > chrome.manifest
 
74
        install -m 755 -d '$(DESTDIR)/$(UUID)' '$(DESTDIR)/$(UUID)/components'
 
75
        install -m 644 'components/$(COMPONENT)' '$(DESTDIR)/$(UUID)/components'
 
76
        install -m 644 install.rdf '$(DESTDIR)/$(UUID)'
 
77
        install -m 644 chrome.manifest '$(DESTDIR)/$(UUID)'