pass char* as const char * where possible
[uzbl-mobile] / Makefile
1 # first entries are for gnu make, 2nd for BSD make.  see http://lists.uzbl.org/pipermail/uzbl-dev-uzbl.org/2009-July/000177.html
2
3 CFLAGS:=-std=c99 $(shell pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -lgthread-2.0 -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\"" $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic -ggdb3
4 CFLAGS!=echo -std=c99 `pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0` -ggdb -Wall -W -DARCH='"\""'`uname -m`'"\""' -lgthread-2.0 -DG_ERRORCHECK_MUTEXES -DCOMMIT='"\""'`git log | head -n1 | sed "s/.* //"`'"\""' $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic -ggdb3
5
6 LDFLAGS:=$(shell pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0) -pthread $(LDFLAGS)
7 LDFLAGS!=echo `pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0` -pthread $(LDFLAGS)
8
9 all: uzbl uzblctrl
10
11 PREFIX?=$(DESTDIR)/usr
12
13 # When compiling unit tests, compile uzbl as a library first
14 tests: uzbl.o
15         $(CC) -DUZBL_LIBRARY -shared -Wl uzbl.o -o ./tests/libuzbl.so
16         cd ./tests/; $(MAKE)
17
18 test: uzbl
19         ./uzbl --uri http://www.uzbl.org --verbose
20
21 test-dev: uzbl
22         XDG_DATA_HOME=./examples/data               XDG_CONFIG_HOME=./examples/config               ./uzbl --uri http://www.uzbl.org --verbose
23
24 test-share: uzbl
25         XDG_DATA_HOME=/usr/share/uzbl/examples/data XDG_CONFIG_HOME=/usr/share/uzbl/examples/config ./uzbl --uri http://www.uzbl.org --verbose
26
27
28 clean:
29         rm -f uzbl
30         rm -f uzblctrl
31         rm -f uzbl.o
32         cd ./tests/; $(MAKE) clean
33
34 install:
35         install -d $(PREFIX)/bin
36         install -d $(PREFIX)/share/uzbl/docs
37         install -d $(PREFIX)/share/uzbl/examples
38         install -m755 uzbl $(PREFIX)/bin/uzbl
39         install -m755 uzblctrl $(PREFIX)/bin/uzblctrl
40         cp -rp docs     $(PREFIX)/share/uzbl/
41         cp -rp config.h $(PREFIX)/share/uzbl/docs/
42         cp -rp examples $(PREFIX)/share/uzbl/
43         install -m644 AUTHORS $(PREFIX)/share/uzbl/docs
44         install -m644 README  $(PREFIX)/share/uzbl/docs
45
46
47 uninstall:
48         rm -rf $(PREFIX)/bin/uzbl
49         rm -rf $(PREFIX)/bin/uzblctrl
50         rm -rf $(PREFIX)/share/uzbl