From 3f2826210b1128657d474926f52f5f097d706bf2 Mon Sep 17 00:00:00 2001 From: "John C. Vernaleo" Date: Tue, 1 Jul 2014 16:09:52 -0400 Subject: Set DXT_DS_RESOURCE_DIR as RESDIR in Makefile. This removes the hardcoded path for it on all platforms. Provided by Unit193 on irc (and initially suggested by @jrib on github). --- Makefile | 1 + dragonfly/Makefile | 1 + freebsd/Makefile | 1 + linux/GNUmakefile | 1 + linux/Makefile | 3 ++- netbsd/Makefile | 3 ++- osx/Makefile | 1 + xombrero.h | 1 - 8 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 39cd2bd..79cce54 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ PREFIX?=/usr/local BINDIR=${PREFIX}/bin +CFLAGS+= -DXT_DS_RESOURCE_DIR=\"$(PREFIX)/share/xombrero/\" PROG=xombrero MAN=xombrero.1 diff --git a/dragonfly/Makefile b/dragonfly/Makefile index 8cf82b1..a3e0eb9 100644 --- a/dragonfly/Makefile +++ b/dragonfly/Makefile @@ -16,6 +16,7 @@ PREFIX?= /usr/local BINDIR?= $(PREFIX)/bin MANDIR?= $(PREFIX)/man RESDIR?= $(PREFIX)/share/xombrero/ +CFLAGS+= -DXT_DS_RESOURCE_DIR=\"$(RESDIR)\" CC= cc diff --git a/freebsd/Makefile b/freebsd/Makefile index e67adb1..3e3de1b 100644 --- a/freebsd/Makefile +++ b/freebsd/Makefile @@ -16,6 +16,7 @@ PREFIX?= /usr/local BINDIR?= $(PREFIX)/bin MANDIR?= $(PREFIX)/man RESDIR?= $(PREFIX)/share/xombrero +CFLAGS+= -DXT_DS_RESOURCE_DIR=\"$(RESDIR)\" CC?= cc diff --git a/linux/GNUmakefile b/linux/GNUmakefile index f1dbbd1..0967fd6 100644 --- a/linux/GNUmakefile +++ b/linux/GNUmakefile @@ -25,6 +25,7 @@ BINDIR?= $(PREFIX)/bin APPDIR?= $(PREFIX)/share/applications MANDIR?= $(PREFIX)/share/man RESDIR?= $(PREFIX)/share/xombrero +CFLAGS+= -DXT_DS_RESOURCE_DIR=\"$(RESDIR)\" SRCS= $(shell ls ../*.c) SRCS+= linux.c diff --git a/linux/Makefile b/linux/Makefile index 165c6b0..d87bdee 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -1,5 +1,6 @@ PREFIX?=/usr/local BINDIR=${PREFIX}/bin +CFLAGS+=-DXT_DS_RESOURCE_DIR=\"$(PREFIX)/share/xombrero/\" PROG=xombrero MAN=xombrero.1 @@ -11,7 +12,7 @@ SRCS+= history.c completion.c tldlist.c externaleditor.c unix.c xombrero.c SRCS+= linux.c .PATH: ${.CURDIR}/.. -CFLAGS+= -O2 -Wall -Wno-format-extra-args -Wunused -Wextra -Wno-unused-parameter +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 diff --git a/netbsd/Makefile b/netbsd/Makefile index de7e892..f4d3253 100644 --- a/netbsd/Makefile +++ b/netbsd/Makefile @@ -1,5 +1,6 @@ PREFIX?=/usr/local BINDIR=${PREFIX}/bin +CFLAGS+=-DXT_DS_RESOURCE_DIR=\"$(PREFIX)/share/xombrero/\" PROG=xombrero MAN=xombrero.1 @@ -11,7 +12,7 @@ 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+= -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 diff --git a/osx/Makefile b/osx/Makefile index 691de38..e031b1f 100644 --- a/osx/Makefile +++ b/osx/Makefile @@ -17,6 +17,7 @@ BINDIR?= $(PREFIX)/bin APPDIR?= $(PREFIX)/share/applications MANDIR?= $(PREFIX)/share/man RESDIR?= $(PREFIX)/share/xombrero +CFLAGS+= -DXT_DS_RESOURCE_DIR=\"$(RESDIR)\" SRCS= $(shell ls ../*.c) SRCS+= osx.c diff --git a/xombrero.h b/xombrero.h index afa70cf..45100f9 100644 --- a/xombrero.h +++ b/xombrero.h @@ -689,7 +689,6 @@ int command_mode(struct tab *, struct karg *); #define XT_DS_ALLOW_INSECURE_CONTENT (TRUE) #define XT_DS_ALLOW_INSECURE_SCRIPTS (TRUE) #define XT_DS_WARN_CERT_CHANGES (0) -#define XT_DS_RESOURCE_DIR ("/usr/local/share/xombrero") #define XT_DS_DO_NOT_TRACK (0) #define XT_DS_PRELOAD_STRICT_TRANSPORT (1) #define XT_DS_GNUTLS_PRIORITY_STRING (NULL) -- cgit 1.4.1-2-gfad0