]> git.ipfire.org Git - people/ms/dnsmasq.git/blame - Makefile
import of dnsmasq-2.50.tar.gz
[people/ms/dnsmasq.git] / Makefile
CommitLineData
73a08a24 1# dnsmasq is Copyright (c) 2000-2009 Simon Kelley
824af85b
SK
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#
73a08a24
SK
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/>.
824af85b
SK
15
16PREFIX = /usr/local
17BINDIR = ${PREFIX}/sbin
18MANDIR = ${PREFIX}/share/man
19LOCALEDIR = ${PREFIX}/share/locale
9e4abcb5
SK
20
21SRC = src
b8187c80
SK
22PO = po
23MAN = man
9e4abcb5 24
824af85b 25PKG_CONFIG = pkg-config
824af85b
SK
26INSTALL = install
27
824af85b
SK
28DBUS_CFLAGS="`echo $(COPTS) | ../bld/pkg-wrapper $(PKG_CONFIG) --cflags dbus-1`"
29DBUS_LIBS=" `echo $(COPTS) | ../bld/pkg-wrapper $(PKG_CONFIG) --libs dbus-1`"
824af85b 30SUNOS_LIBS=" `if uname | grep SunOS 2>&1 >/dev/null; then echo -lsocket -lnsl -lposix4; fi `"
9e4abcb5 31
208b65c5
SK
32all : dnsmasq
33
34dnsmasq :
824af85b 35 cd $(SRC) && $(MAKE) \
824af85b
SK
36 DBUS_CFLAGS=$(DBUS_CFLAGS) \
37 DBUS_LIBS=$(DBUS_LIBS) \
38 SUNOS_LIBS=$(SUNOS_LIBS) \
824af85b 39 -f ../bld/Makefile dnsmasq
9e4abcb5
SK
40
41clean :
b8187c80 42 rm -f *~ $(SRC)/*.mo contrib/*/*~ */*~ $(SRC)/*.pot
208b65c5 43 rm -f $(SRC)/*.o $(SRC)/dnsmasq.a $(SRC)/dnsmasq core */core
9e4abcb5 44
b8187c80
SK
45install : all install-common
46
47install-common :
824af85b
SK
48 $(INSTALL) -d $(DESTDIR)$(BINDIR) -d $(DESTDIR)$(MANDIR)/man8
49 $(INSTALL) -m 644 $(MAN)/dnsmasq.8 $(DESTDIR)$(MANDIR)/man8
50 $(INSTALL) -m 755 $(SRC)/dnsmasq $(DESTDIR)$(BINDIR)
9e4abcb5 51
b8187c80 52all-i18n :
824af85b
SK
53 cd $(SRC) && $(MAKE) \
54 I18N=-DLOCALEDIR='\"$(LOCALEDIR)\"' \
824af85b
SK
55 DBUS_CFLAGS=$(DBUS_CFLAGS) \
56 DBUS_LIBS=$(DBUS_LIBS) \
57 SUNOS_LIBS=$(SUNOS_LIBS) \
824af85b 58 -f ../bld/Makefile dnsmasq
b8187c80 59 cd $(PO); for f in *.po; do \
824af85b 60 cd ../$(SRC) && $(MAKE) -f ../bld/Makefile $${f%.po}.mo; \
b8187c80
SK
61 done
62
63install-i18n : all-i18n install-common
64 cd $(SRC); ../bld/install-mo $(DESTDIR)$(LOCALEDIR)
65 cd $(MAN); ../bld/install-man $(DESTDIR)$(MANDIR)
66
67merge :
68 $(MAKE) I18N=-DLOCALEDIR='\"$(LOCALEDIR)\"' -f ../bld/Makefile -C $(SRC) dnsmasq.pot
69 cd $(PO); for f in *.po; do \
1a6bca81 70 msgmerge --no-wrap -U $$f ../$(SRC)/dnsmasq.pot; \
b8187c80 71 done
9e4abcb5
SK
72
73