~ubuntu-branches/debian/lenny/dnsmasq/lenny

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Simon Kelley
  • Date: 2008-07-20 19:27:11 UTC
  • mfrom: (0.3.1 upstream) (9.1.4 hardy)
  • Revision ID: james.westby@ubuntu.com-20080720192711-b0lg0kl8egyg0v1b
Tags: 2.45-1
New upstream - fixes regression when min-port not set.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
PREFIX?=/usr/local
 
1
# dnsmasq is Copyright (c) 2000-2007 Simon Kelley
 
2
#
 
3
#  This program is free software; you can redistribute it and/or modify
 
4
#  it under the terms of the GNU General Public License as published by
 
5
#  the Free Software Foundation; version 2 dated June, 1991, or
 
6
#  (at your option) version 3 dated 29 June, 2007.
 
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, see <http://www.gnu.org/licenses/>.
 
15
 
 
16
PREFIX = /usr/local
2
17
BINDIR = ${PREFIX}/sbin
3
18
MANDIR = ${PREFIX}/share/man
4
19
LOCALEDIR = ${PREFIX}/share/locale
7
22
PO = po
8
23
MAN = man
9
24
 
10
 
CFLAGS?= -O2
 
25
PKG_CONFIG = pkg-config
 
26
AWK = nawk
 
27
INSTALL = install
 
28
 
 
29
DBUS_MINOR=" `echo $(COPTS) | ../bld/pkg-wrapper $(PKG_CONFIG) --modversion dbus-1 | $(AWK) -F . -- '{ if ($$(NF-1)) print \"-DDBUS_MINOR=\"$$(NF-1) }'`" 
 
30
DBUS_CFLAGS="`echo $(COPTS) | ../bld/pkg-wrapper $(PKG_CONFIG) --cflags dbus-1`" 
 
31
DBUS_LIBS="  `echo $(COPTS) | ../bld/pkg-wrapper $(PKG_CONFIG) --libs dbus-1`" 
 
32
SUNOS_VER="  `if uname | grep SunOS 2>&1 >/dev/null; then uname -r | $(AWK) -F . -- '{ print \"-DSUNOS_VER=\"$$2 }'; fi`"
 
33
SUNOS_LIBS=" `if uname | grep SunOS 2>&1 >/dev/null; then echo -lsocket -lnsl -lposix4; fi `"
11
34
 
12
35
all :   dnsmasq
13
36
 
14
37
dnsmasq :
15
 
        $(MAKE) I18N=-DNO_GETTEXT -f ../bld/Makefile -C $(SRC) dnsmasq 
 
38
        cd $(SRC) && $(MAKE) \
 
39
 DBUS_MINOR=$(DBUS_MINOR) \
 
40
 DBUS_CFLAGS=$(DBUS_CFLAGS) \
 
41
 DBUS_LIBS=$(DBUS_LIBS) \
 
42
 SUNOS_LIBS=$(SUNOS_LIBS) \
 
43
 SUNOS_VER=$(SUNOS_VER) \
 
44
 -f ../bld/Makefile dnsmasq 
16
45
 
17
46
clean :
18
47
        rm -f *~ $(SRC)/*.mo contrib/*/*~ */*~ $(SRC)/*.pot 
21
50
install : all install-common
22
51
 
23
52
install-common :
24
 
        install -d $(DESTDIR)$(BINDIR) -d $(DESTDIR)$(MANDIR)/man8
25
 
        install -m 644 $(MAN)/dnsmasq.8 $(DESTDIR)$(MANDIR)/man8 
26
 
        install -m 755 $(SRC)/dnsmasq $(DESTDIR)$(BINDIR)
 
53
        $(INSTALL) -d $(DESTDIR)$(BINDIR) -d $(DESTDIR)$(MANDIR)/man8
 
54
        $(INSTALL) -m 644 $(MAN)/dnsmasq.8 $(DESTDIR)$(MANDIR)/man8 
 
55
        $(INSTALL) -m 755 $(SRC)/dnsmasq $(DESTDIR)$(BINDIR)
27
56
 
28
57
all-i18n :
29
 
        $(MAKE) I18N=-DLOCALEDIR='\"$(LOCALEDIR)\"' -f ../bld/Makefile -C $(SRC) dnsmasq
 
58
        cd $(SRC) && $(MAKE) \
 
59
 I18N=-DLOCALEDIR='\"$(LOCALEDIR)\"' \
 
60
 DBUS_MINOR=$(DBUS_MINOR) \
 
61
 DBUS_CFLAGS=$(DBUS_CFLAGS) \
 
62
 DBUS_LIBS=$(DBUS_LIBS) \
 
63
 SUNOS_LIBS=$(SUNOS_LIBS) \
 
64
 SUNOS_VER=$(SUNOS_VER) \
 
65
 -f ../bld/Makefile dnsmasq 
30
66
        cd $(PO); for f in *.po; do \
31
 
                $(MAKE) -f ../bld/Makefile -C ../$(SRC) $${f%.po}.mo; \
 
67
                cd ../$(SRC) && $(MAKE) -f ../bld/Makefile $${f%.po}.mo; \
32
68
        done
33
69
 
34
70
install-i18n : all-i18n install-common
38
74
merge :
39
75
        $(MAKE) I18N=-DLOCALEDIR='\"$(LOCALEDIR)\"' -f ../bld/Makefile -C $(SRC) dnsmasq.pot
40
76
        cd $(PO); for f in *.po; do \
41
 
                msgmerge -U $$f ../$(SRC)/dnsmasq.pot; \
 
77
                msgmerge --no-wrap -U $$f ../$(SRC)/dnsmasq.pot; \
42
78
        done
43
79
 
44
80