about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJohn C. Vernaleo <jcv@conformal.com>2014-07-01 16:09:52 -0400
committerJohn C. Vernaleo <jcv@conformal.com>2014-07-01 16:09:52 -0400
commit3f2826210b1128657d474926f52f5f097d706bf2 (patch)
tree0291f8af306103c3ac72f0c1115f736ac2c8fc56
parentbf6ffda86a0ae6813f32e2b9e1084dd1c4761828 (diff)
downloadxombrero-3f2826210b1128657d474926f52f5f097d706bf2.tar.gz
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).
-rw-r--r--Makefile1
-rw-r--r--dragonfly/Makefile1
-rw-r--r--freebsd/Makefile1
-rw-r--r--linux/GNUmakefile1
-rw-r--r--linux/Makefile3
-rw-r--r--netbsd/Makefile3
-rw-r--r--osx/Makefile1
-rw-r--r--xombrero.h1
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)