tazweb view Makefile @ rev 140

Makefile: make it cross friendly
author Christophe Lincoln <pankso@slitaz.org>
date Sat Apr 05 09:13:43 2014 +0200 (2014-04-05)
parents 0940993683ef
children b499c4de5634
line source
1 # Makefile for TazWeb
2 #
3 PREFIX?=/usr
4 DOCDIR?=$(PREFIX)/share/doc
5 DESTDIR?=
7 PACKAGE=tazweb
8 VERSION=1.6.4
9 LINGUAS?=fr pt_BR ru
11 CC?=gcc
13 all:
14 $(CC) src/main.c -o $(PACKAGE) \
15 `pkg-config --cflags --libs gtk+-2.0 webkit-1.0`
16 @du -sh $(PACKAGE)
18 qt:
19 cd src && qmake && make
20 @du -sh src/$(PACKAGE)-qt
22 # i18n
24 pot:
25 xgettext -o po/$(PACKAGE).pot -L C -k_ \
26 --package-name="TazWeb" \
27 --package-version="$(VERSION)" \
28 ./src/main.c
30 msgmerge:
31 @for l in $(LINGUAS); do \
32 echo -n "Updating $$l po file."; \
33 msgmerge -U po/$$l.po po/$(PACKAGE).pot; \
34 done;
36 msgfmt:
37 @for l in $(LINGUAS); do \
38 echo "Compiling $$l mo file..."; \
39 mkdir -p po/mo/$$l/LC_MESSAGES; \
40 msgfmt -o po/mo/$$l/LC_MESSAGES/$(PACKAGE).mo po/$$l.po; \
41 done;
44 install:
45 mkdir -p \
46 $(DESTDIR)$(DOCDIR)/$(PACKAGE) \
47 $(DESTDIR)$(PREFIX)/bin \
48 $(DESTDIR)$(PREFIX)/share/tazweb \
49 $(DESTDIR)$(PREFIX)/share/pixmaps \
50 $(DESTDIR)$(PREFIX)/share/applications
51 install -m 0755 $(PACKAGE) $(DESTDIR)$(PREFIX)/bin
52 cp -d doc/* $(DESTDIR)$(DOCDIR)/$(PACKAGE)
53 install -m 0644 data/tazweb.png \
54 $(DESTDIR)$(PREFIX)/share/pixmaps
55 install -m 0644 data/tazweb.desktop \
56 $(DESTDIR)$(PREFIX)/share/applications
57 cp -a data/*.html $(DESTDIR)$(PREFIX)/share/tazweb
58 install -m 0644 data/style.css \
59 $(DESTDIR)$(PREFIX)/share/tazweb
60 mkdir -p $(DESTDIR)$(PREFIX)/share/locale
61 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
63 clean:
64 rm -f $(PACKAGE)
65 rm -rf po/mo
66 rm -f po/*.mo
67 rm -f po/*.*~
68 rm -f src/Makefile src/*.o src/tazweb-qt
70 help:
71 @echo "make [ pot | msgmerge | msgfmt | install | clean ]"