Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 1 | PREFIX?=/usr/local |
| 2 | BINDIR = ${PREFIX}/sbin |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame^] | 3 | MANDIR = ${PREFIX}/share/man |
| 4 | LOCALEDIR = ${PREFIX}/share/locale |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 5 | |
| 6 | SRC = src |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame^] | 7 | PO = po |
| 8 | MAN = man |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 9 | |
| 10 | CFLAGS?= -O2 |
| 11 | |
| 12 | all : |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame^] | 13 | $(MAKE) I18N=-DNO_GETTEXT -f ../bld/Makefile -C $(SRC) dnsmasq |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 14 | |
| 15 | clean : |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame^] | 16 | rm -f *~ $(SRC)/*.mo contrib/*/*~ */*~ $(SRC)/*.pot |
| 17 | rm -f $(SRC)/*.o $(SRC)/dnsmasq core */core |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 18 | |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame^] | 19 | install : all install-common |
| 20 | |
| 21 | install-common : |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 22 | install -d $(DESTDIR)$(BINDIR) -d $(DESTDIR)$(MANDIR)/man8 |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame^] | 23 | install -m 644 $(MAN)/dnsmasq.8 $(DESTDIR)$(MANDIR)/man8 |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 24 | install -m 755 $(SRC)/dnsmasq $(DESTDIR)$(BINDIR) |
| 25 | |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame^] | 26 | all-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 Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 31 | |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame^] | 32 | install-i18n : all-i18n install-common |
| 33 | cd $(SRC); ../bld/install-mo $(DESTDIR)$(LOCALEDIR) |
| 34 | cd $(MAN); ../bld/install-man $(DESTDIR)$(MANDIR) |
| 35 | |
| 36 | merge : |
| 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 Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 41 | |
| 42 | |