]>
git.ipfire.org Git - people/ms/dnsmasq.git/blob - Makefile
1 # dnsmasq is Copyright (c) 2000-2007 Simon Kelley
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.
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.
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/>.
17 BINDIR
= ${PREFIX}/sbin
18 MANDIR
= ${PREFIX}/share
/man
19 LOCALEDIR
= ${PREFIX}/share
/locale
25 PKG_CONFIG
= pkg-config
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 `"
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
47 rm -f
*~
$(SRC
)/*.mo contrib
/*/*~
*/*~
$(SRC
)/*.pot
48 rm -f
$(SRC
)/*.o
$(SRC
)/dnsmasq.a
$(SRC
)/dnsmasq core
*/core
50 install : all install-common
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
)
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
66 cd
$(PO
); for f in
*.po
; do \
67 cd ..
/$(SRC
) && $(MAKE
) -f ..
/bld
/Makefile
$${f
%.po
}.mo
; \
70 install-i18n
: all-i18n install-common
71 cd
$(SRC
); ..
/bld
/install-mo
$(DESTDIR
)$(LOCALEDIR
)
72 cd
$(MAN
); ..
/bld
/install-man
$(DESTDIR
)$(MANDIR
)
75 $(MAKE
) I18N
=-DLOCALEDIR
='\"$(LOCALEDIR)\"' -f ..
/bld
/Makefile
-C
$(SRC
) dnsmasq.pot
76 cd
$(PO
); for f in
*.po
; do \
77 msgmerge
-U
$$f ..
/$(SRC
)/dnsmasq.pot
; \