tazweb annotate Makefile @ rev 153
Makefile: use CFLAGS
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Apr 19 21:42:50 2014 +0200 (2014-04-19) |
parents | 8c516569c2c8 |
children | 44e8f68b8694 |
rev | line source |
---|---|
pankso@71 | 1 # Makefile for TazWeb |
pankso@1 | 2 # |
pankso@1 | 3 PREFIX?=/usr |
pankso@17 | 4 DOCDIR?=$(PREFIX)/share/doc |
pankso@1 | 5 DESTDIR?= |
pankso@1 | 6 |
pankso@1 | 7 PACKAGE=tazweb |
pankso@142 | 8 VERSION=1.8 |
al@123 | 9 LINGUAS?=fr pt_BR ru |
pankso@1 | 10 |
pankso@140 | 11 CC?=gcc |
pankso@140 | 12 |
pankso@1 | 13 all: |
pankso@153 | 14 $(CC) src/main.c -o $(PACKAGE) $(CFLAGS) \ |
pankso@1 | 15 `pkg-config --cflags --libs gtk+-2.0 webkit-1.0` |
pankso@16 | 16 @du -sh $(PACKAGE) |
pankso@1 | 17 |
pankso@140 | 18 qt: |
pankso@140 | 19 cd src && qmake && make |
pankso@140 | 20 @du -sh src/$(PACKAGE)-qt |
pankso@140 | 21 |
al@121 | 22 # i18n |
al@121 | 23 |
al@121 | 24 pot: |
al@121 | 25 xgettext -o po/$(PACKAGE).pot -L C -k_ \ |
al@121 | 26 --package-name="TazWeb" \ |
al@121 | 27 --package-version="$(VERSION)" \ |
al@121 | 28 ./src/main.c |
al@121 | 29 |
al@121 | 30 msgmerge: |
al@121 | 31 @for l in $(LINGUAS); do \ |
al@121 | 32 echo -n "Updating $$l po file."; \ |
al@121 | 33 msgmerge -U po/$$l.po po/$(PACKAGE).pot; \ |
al@121 | 34 done; |
al@121 | 35 |
al@121 | 36 msgfmt: |
al@121 | 37 @for l in $(LINGUAS); do \ |
al@121 | 38 echo "Compiling $$l mo file..."; \ |
al@121 | 39 mkdir -p po/mo/$$l/LC_MESSAGES; \ |
al@121 | 40 msgfmt -o po/mo/$$l/LC_MESSAGES/$(PACKAGE).mo po/$$l.po; \ |
al@121 | 41 done; |
al@121 | 42 |
pankso@1 | 43 install: |
pankso@1 | 44 mkdir -p \ |
pankso@17 | 45 $(DESTDIR)$(DOCDIR)/$(PACKAGE) \ |
pankso@1 | 46 $(DESTDIR)$(PREFIX)/bin \ |
pascal@147 | 47 $(DESTDIR)/var/www/cgi-bin \ |
pankso@35 | 48 $(DESTDIR)$(PREFIX)/share/tazweb \ |
pankso@1 | 49 $(DESTDIR)$(PREFIX)/share/pixmaps \ |
pankso@1 | 50 $(DESTDIR)$(PREFIX)/share/applications |
erjo@25 | 51 install -m 0755 $(PACKAGE) $(DESTDIR)$(PREFIX)/bin |
pankso@38 | 52 cp -d doc/* $(DESTDIR)$(DOCDIR)/$(PACKAGE) |
pankso@141 | 53 install -m 0644 data/tazweb.png $(DESTDIR)$(PREFIX)/share/pixmaps |
pankso@141 | 54 install -m 0644 data/tazweb.desktop $(DESTDIR)$(PREFIX)/share/applications |
pankso@141 | 55 install -m 0644 data/bookmarks.txt $(DESTDIR)$(PREFIX)/share/tazweb |
pankso@145 | 56 install -m 0755 data/bookmarks.cgi $(DESTDIR)/var/www/cgi-bin |
al@125 | 57 mkdir -p $(DESTDIR)$(PREFIX)/share/locale |
al@121 | 58 cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale |
pankso@1 | 59 |
pankso@1 | 60 clean: |
pankso@1 | 61 rm -f $(PACKAGE) |
al@121 | 62 rm -rf po/mo |
al@121 | 63 rm -f po/*.mo |
al@121 | 64 rm -f po/*.*~ |
pankso@129 | 65 rm -f src/Makefile src/*.o src/tazweb-qt |
al@121 | 66 |
al@121 | 67 help: |
al@121 | 68 @echo "make [ pot | msgmerge | msgfmt | install | clean ]" |