summary refs log tree commit diff stats
path: root/LICENSE
blob: a976f454fac1f1a845b16e621ab843af2f34e4e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
Copyright (c) 2020, 2021 Andinus <andinus@nand.sh>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
PREFIX?=/usr/local
BINDIR=${PREFIX}/bin
CFLAGS+=-DXT_DS_RESOURCE_DIR=\"$(PREFIX)/share/xombrero/\"

PROG=xombrero
MAN=xombrero.1

DEBUG= -g

SRCS= cookie.c inspector.c marco.c about.c whitelist.c settings.c inputfocus.c
SRCS+= history.c completion.c tldlist.c externaleditor.c unix.c xombrero.c
SRCS+= netbsd.c
.PATH: ${.CURDIR}/..

CFLAGS+= -O2 -Wall -Wno-format-extra-args -Wunused -Wextra -Wno-unused-parameter
CFLAGS+= -Wno-missing-field-initializers -Wno-sign-compare
CFLAGS+= -Wno-deprecated-declarations -Wfloat-equal ${DEBUG}
CFLAGS+= -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE
CFLAGS+= -DGDK_DISABLE_DEPRECATION_WARNINGS -DGLIB_DISABLE_DEPRECATION_WARNINGS
CFLAGS+= -I. -I..
LDADD= -lutil
GTK_VERSION ?= gtk3
.if ${GTK_VERSION} == "gtk2"
LIBS+= gtk+-2.0
LIBS+= webkit-1.0
.else
LIBS+= gtk+-3.0
LIBS+= webkitgtk-3.0
.endif
LIBS+= libsoup-2.4
LIBS+= gnutls
GTK_CFLAGS!= pkg-config --cflags $(LIBS)
GTK_LDFLAGS!= pkg-config --libs $(LIBS)
CFLAGS+= $(GTK_CFLAGS)
LDFLAGS+= $(GTK_LDFLAGS)
BUILDVERSION != sh "${.CURDIR}/../buildver.sh"
.if !${BUILDVERSION} == ""
CPPFLAGS+= -DXOMBRERO_BUILDSTR=\"$(BUILDVERSION)\"
.endif

MANDIR= ${PREFIX}/man/

CLEANFILES += ${.CURDIR}/javascript.h javascript.h tooltip.h xombrero.cat1 xombrero.core xombrero.html1

JSFILES += ../hinting.js
JSFILES += ../input-focus.js
JSFILES += ../autoscroll.js

.for _js in ${JSFILES}
JSCURDIR += ${.CURDIR}/${_js}
.endfor

.NOPATH: javascript.h tooltip.h
javascript.h: ${JSFILES} ../js-merge-helper.pl
	perl ${.CURDIR}/../js-merge-helper.pl \
		${JSCURDIR} > javascript.h

tooltip.h: ${MAN} ../ascii2txt.pl ../txt2tooltip.pl
	mandoc -Tascii ${.CURDIR}/../${MAN} | \
		perl ${.CURDIR}/../ascii2txt.pl | \
		perl ${.CURDIR}/../txt2tooltip.pl > tooltip.h

beforeinstall:
	install -m 755 -d ${PREFIX}/bin
	install -m 755 -d ${MANDIR}/man1/
	install -m 755 -d ${MANDIR}/html1/
	install -m 755 -d ${PREFIX}/share/xombrero
	install -m 755 -d ${PREFIX}/share/applications
	install -m 644 ${.CURDIR}/../xombrero.css ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../xombrero.desktop ${PREFIX}/share/applications
	install -m 644 ${.CURDIR}/../xombreroicon16.png ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../xombreroicon32.png ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../xombreroicon48.png ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../xombreroicon64.png ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../xombreroicon128.png ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../xombreroicon256.png ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../favicon.ico ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../tld-rules ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../style.css ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../hsts-preload ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../user-agent-headers ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../http-accept-headers ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../torenabled.ico ${PREFIX}/share/xombrero
	install -m 644 ${.CURDIR}/../tordisabled.ico ${PREFIX}/share/xombrero

${PROG} ${OBJS} beforedepend: javascript.h tooltip.h

.include <bsd.prog.mk>