two more free() -> g_free(); ok jrick
[xombrero.git] / Makefile
blob5867dcb8707b198785bbfe68ae992791ff5147da
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+= -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE
14 CFLAGS+= -I. -I${.CURDIR}
15 LDADD= -lutil -lgcrypt
16 GTK_VERSION ?= gtk3
17 .if ${GTK_VERSION} == "gtk2"
18 LIBS+= gtk+-2.0
19 LIBS+= webkit-1.0
20 .else
21 LIBS+= gtk+-3.0
22 LIBS+= webkitgtk-3.0
23 .endif
24 LIBS+= libsoup-2.4
25 LIBS+= gnutls
26 LIBS+= gthread-2.0
27 GTK_CFLAGS!= pkg-config --cflags $(LIBS)
28 GTK_LDFLAGS!= pkg-config --libs $(LIBS)
29 CFLAGS+= $(GTK_CFLAGS)
30 LDFLAGS+= $(GTK_LDFLAGS)
31 BUILDVERSION != sh "${.CURDIR}/buildver.sh"
32 .if !${BUILDVERSION} == ""
33 CPPFLAGS+= -DXOMBRERO_BUILDSTR=\"$(BUILDVERSION)\"
34 .endif
36 MANDIR= ${PREFIX}/man/man
38 CLEANFILES += ${.CURDIR}/javascript.h javascript.h xombrero.cat1 xombrero.core
40 JSFILES += hinting.js
41 JSFILES += input-focus.js
42 JSFILES += autoscroll.js
44 .for _js in ${JSFILES}
45 JSCURDIR += ${.CURDIR}/${_js}
46 .endfor
48 javascript.h: ${JSFILES} js-merge-helper.pl
49 perl ${.CURDIR}/js-merge-helper.pl \
50 ${JSCURDIR} > javascript.h
52 beforeinstall:
53 install -m 755 -d ${PREFIX}/bin
54 install -m 755 -d ${PREFIX}/man/man1/
55 install -m 755 -d ${PREFIX}/share/xombrero
56 install -m 644 $(.CURDIR)/xombrero.css ${PREFIX}/share/xombrero
57 install -m 644 ${.CURDIR}/xombreroicon.png ${PREFIX}/share/xombrero
58 install -m 644 ${.CURDIR}/xombreroicon16.png ${PREFIX}/share/xombrero
59 install -m 644 ${.CURDIR}/xombreroicon32.png ${PREFIX}/share/xombrero
60 install -m 644 ${.CURDIR}/xombreroicon48.png ${PREFIX}/share/xombrero
61 install -m 644 ${.CURDIR}/xombreroicon64.png ${PREFIX}/share/xombrero
62 install -m 644 ${.CURDIR}/xombreroicon128.png ${PREFIX}/share/xombrero
63 install -m 644 ${.CURDIR}/tld-rules ${PREFIX}/share/xombrero
64 install -m 644 ${.CURDIR}/style.css ${PREFIX}/share/xombrero
66 ${PROG} ${OBJS} beforedepend: javascript.h
68 # clang targets
69 .if ${.TARGETS:M*analyze*}
70 CFLAGS+= -Wdeclaration-after-statement -Wshadow
71 CC=clang
72 CXX=clang++
73 CPP=clang -E
74 CFLAGS+=--analyze
75 .elif ${.TARGETS:M*clang*}
76 CFLAGS+= -Wdeclaration-after-statement -Wshadow
77 CC=clang
78 CXX=clang++
79 CPP=clang -E
80 .endif
82 analyze: all
83 clang: all
85 .include <bsd.prog.mk>