]> git.ipfire.org Git - people/ms/dnsmasq.git/blame - Makefile
import of dnsmasq-2.32.tar.gz
[people/ms/dnsmasq.git] / Makefile
CommitLineData
9e4abcb5
SK
1PREFIX?=/usr/local
2BINDIR = ${PREFIX}/sbin
b8187c80
SK
3MANDIR = ${PREFIX}/share/man
4LOCALEDIR = ${PREFIX}/share/locale
9e4abcb5
SK
5
6SRC = src
b8187c80
SK
7PO = po
8MAN = man
9e4abcb5
SK
9
10CFLAGS?= -O2
11
12all :
b8187c80 13 $(MAKE) I18N=-DNO_GETTEXT -f ../bld/Makefile -C $(SRC) dnsmasq
9e4abcb5
SK
14
15clean :
b8187c80
SK
16 rm -f *~ $(SRC)/*.mo contrib/*/*~ */*~ $(SRC)/*.pot
17 rm -f $(SRC)/*.o $(SRC)/dnsmasq core */core
9e4abcb5 18
b8187c80
SK
19install : all install-common
20
21install-common :
9e4abcb5 22 install -d $(DESTDIR)$(BINDIR) -d $(DESTDIR)$(MANDIR)/man8
b8187c80 23 install -m 644 $(MAN)/dnsmasq.8 $(DESTDIR)$(MANDIR)/man8
9e4abcb5
SK
24 install -m 755 $(SRC)/dnsmasq $(DESTDIR)$(BINDIR)
25
b8187c80
SK
26all-i18n :
27 $(MAKE) I18N=-DLOCALEDIR='\"$(LOCALEDIR)\"' -f ../bld/Makefile -C $(SRC) dnsmasq
28 cd $(PO); for f in *.po; do \
29 $(MAKE) -f ../bld/Makefile -C ../$(SRC) $${f/.po/.mo}; \
30 done
31
32install-i18n : all-i18n install-common
33 cd $(SRC); ../bld/install-mo $(DESTDIR)$(LOCALEDIR)
34 cd $(MAN); ../bld/install-man $(DESTDIR)$(MANDIR)
35
36merge :
37 $(MAKE) I18N=-DLOCALEDIR='\"$(LOCALEDIR)\"' -f ../bld/Makefile -C $(SRC) dnsmasq.pot
38 cd $(PO); for f in *.po; do \
39 msgmerge -U $$f ../$(SRC)/dnsmasq.pot; \
40 done
9e4abcb5
SK
41
42