make this work again on windows
[xombrero.git] / Makefile
blobb0d3d95a92fd800fb34125409df10743c6e9e59d
1 PREFIX?=/usr/local
2 BINDIR=${PREFIX}/bin
4 PROG=xombrero
5 MAN=xombrero.1
7 DEBUG= -g
9 SRCS= cookie.c inspector.c marco.c about.c whitelist.c settings.c inputfocus.c
10 SRCS+= history.c completion.c tldlist.c externaleditor.c unix.c xombrero.c
11 CFLAGS+= -O2 -Wall -Wno-format-extra-args -Wunused
12 CFLAGS+= -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare ${DEBUG}
13 CFLAGS+= -I. -I${.CURDIR}
14 LDADD= -lutil -lgcrypt
15 LIBS+= gtk+-2.0
16 LIBS+= webkit-1.0
17 LIBS+= libsoup-2.4
18 LIBS+= gnutls
19 LIBS+= gthread-2.0
20 GTK_CFLAGS!= pkg-config --cflags $(LIBS)
21 GTK_LDFLAGS!= pkg-config --libs $(LIBS)
22 CFLAGS+= $(GTK_CFLAGS)
23 LDFLAGS+= $(GTK_LDFLAGS)
24 BUILDVERSION != sh "${.CURDIR}/buildver.sh"
25 .if !${BUILDVERSION} == ""
26 CPPFLAGS+= -DXOMBRERO_BUILDSTR=\"$(BUILDVERSION)\"
27 .endif
29 MANDIR= ${PREFIX}/man/man
31 CLEANFILES += ${.CURDIR}/javascript.h javascript.h xombrero.cat1 xombrero.core
33 JSFILES += hinting.js
34 JSFILES += input-focus.js
35 JSFILES += autoscroll.js
37 .for _js in ${JSFILES}
38 JSCURDIR += ${.CURDIR}/${_js}
39 .endfor
41 javascript.h: ${JSFILES} js-merge-helper.pl
42 perl ${.CURDIR}/js-merge-helper.pl \
43 ${JSCURDIR} > javascript.h
45 beforeinstall:
46 install -m 755 -d ${PREFIX}/bin
47 install -m 755 -d ${PREFIX}/man/man1/
48 install -m 755 -d ${PREFIX}/share/xombrero
49 install -m 644 ${.CURDIR}/xombreroicon.png ${PREFIX}/share/xombrero
50 install -m 644 ${.CURDIR}/xombreroicon16.png ${PREFIX}/share/xombrero
51 install -m 644 ${.CURDIR}/xombreroicon32.png ${PREFIX}/share/xombrero
52 install -m 644 ${.CURDIR}/xombreroicon48.png ${PREFIX}/share/xombrero
53 install -m 644 ${.CURDIR}/xombreroicon64.png ${PREFIX}/share/xombrero
54 install -m 644 ${.CURDIR}/xombreroicon128.png ${PREFIX}/share/xombrero
55 install -m 644 ${.CURDIR}/tld-rules ${PREFIX}/share/xombrero
56 install -m 644 ${.CURDIR}/style.css ${PREFIX}/share/xombrero
58 ${PROG} ${OBJS} beforedepend: javascript.h
60 # clang targets
61 .if ${.TARGETS:M*analyze*}
62 CFLAGS+= -Wdeclaration-after-statement -Wshadow
63 CC=clang
64 CXX=clang++
65 CPP=clang -E
66 CFLAGS+=--analyze
67 .elif ${.TARGETS:M*clang*}
68 CFLAGS+= -Wdeclaration-after-statement -Wshadow
69 CC=clang
70 CXX=clang++
71 CPP=clang -E
72 .endif
74 analyze: all
75 clang: all
77 .include <bsd.prog.mk>