blob: d9e125f237ad9a4c035dd43c3a046fe0ffe59bc5 [file] [log] [blame]
Simon Kelley9e4abcb2004-01-22 19:47:41 +00001PREFIX?=/usr/local
2BINDIR = ${PREFIX}/sbin
Simon Kelleyb8187c82005-11-26 21:46:27 +00003MANDIR = ${PREFIX}/share/man
4LOCALEDIR = ${PREFIX}/share/locale
Simon Kelley9e4abcb2004-01-22 19:47:41 +00005
6SRC = src
Simon Kelleyb8187c82005-11-26 21:46:27 +00007PO = po
8MAN = man
Simon Kelley9e4abcb2004-01-22 19:47:41 +00009
10CFLAGS?= -O2
11
12all :
Simon Kelleyb8187c82005-11-26 21:46:27 +000013 $(MAKE) I18N=-DNO_GETTEXT -f ../bld/Makefile -C $(SRC) dnsmasq
Simon Kelley9e4abcb2004-01-22 19:47:41 +000014
15clean :
Simon Kelleyb8187c82005-11-26 21:46:27 +000016 rm -f *~ $(SRC)/*.mo contrib/*/*~ */*~ $(SRC)/*.pot
17 rm -f $(SRC)/*.o $(SRC)/dnsmasq core */core
Simon Kelley9e4abcb2004-01-22 19:47:41 +000018
Simon Kelleyb8187c82005-11-26 21:46:27 +000019install : all install-common
20
21install-common :
Simon Kelley9e4abcb2004-01-22 19:47:41 +000022 install -d $(DESTDIR)$(BINDIR) -d $(DESTDIR)$(MANDIR)/man8
Simon Kelleyb8187c82005-11-26 21:46:27 +000023 install -m 644 $(MAN)/dnsmasq.8 $(DESTDIR)$(MANDIR)/man8
Simon Kelley9e4abcb2004-01-22 19:47:41 +000024 install -m 755 $(SRC)/dnsmasq $(DESTDIR)$(BINDIR)
25
Simon Kelleyb8187c82005-11-26 21:46:27 +000026all-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
Simon Kelley9e4abcb2004-01-22 19:47:41 +000031
Simon Kelleyb8187c82005-11-26 21:46:27 +000032install-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
Simon Kelley9e4abcb2004-01-22 19:47:41 +000041
42