summaryrefslogtreecommitdiff
path: root/config.mk
diff options
context:
space:
mode:
authorDaniel Carl <danielcarl@gmx.de>2015-09-19 20:47:37 +0200
committerDaniel Carl <danielcarl@gmx.de>2016-03-30 23:32:23 +0200
commit6608f8fc19ef4b587596c9ed3cb3b3fcc37c1eb6 (patch)
tree12f055b9e671cb41ea8097add3e3833890a65fe8 /config.mk
parente3ea1d3081cc7dbe86f95ee0888660c292c355eb (diff)
Startup webkit2 branch from the scratch.
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk88
1 files changed, 31 insertions, 57 deletions
diff --git a/config.mk b/config.mk
index 3809336..e3f1800 100644
--- a/config.mk
+++ b/config.mk
@@ -1,63 +1,37 @@
-#----------------user/install options----------------
-VERSION = 2.11
-
-PROJECT = vimb
-PREFIX ?= /usr/local
-BINDIR ?= $(PREFIX)/bin
-MANDIR ?= $(PREFIX)/share/man
-EXAMPLEDIR ?= $(PREFIX)/share/$(PROJECT)/examples
-
-#----------------compile options---------------------
-
-VERBOSE ?= 0
-
-LIBS = libsoup-2.4
-
-GTK3LIBS=gtk+-3.0 webkitgtk-3.0
-GTK2LIBS=gtk+-2.0 webkit-1.0
-
-ifeq (${GTK}, 3)
-ifeq ($(shell pkg-config --exists $(GTK3LIBS) && echo 1), 1) #has gtk3 libs
-LIBS += $(GTK3LIBS)
-USEGTK3 = 1
-else
-LIBS += $(GTK2LIBS)
-$(warning Cannot find gtk3-libs, falling back to gtk2)
-endif
-else
-LIBS += $(GTK2LIBS)
-endif
-
-# generate a first char upper case project name
-PROJECT_UCFIRST = $(shell echo '${PROJECT}' | awk '{for(i=1;i<=NF;i++){$$i=toupper(substr($$i,1,1))substr($$i,2)}}1')
-
-CPPFLAGS = -DVERSION=\"${VERSION}\"
-CPPFLAGS += -DPROJECT=\"${PROJECT}\" -DPROJECT_UCFIRST=\"${PROJECT_UCFIRST}\"
+VERSION = dev-3.0
+
+PREFIX ?= /usr/local
+BINPREFIX := $(DESTDIR)$(PREFIX)/bin
+MANPREFIX := $(DESTDIR)$(PREFIX)/share/man
+EXAMPLEPREFIX := $(DESTDIR)$(PREFIX)/share/vimb/example
+RUNPREFIX := $(PREFIX)
+EXTPREFIX := $(RUNPREFIX)/lib/vimb
+
+# define some directories
+SRCDIR = src
+DOCDIR = doc
+SUBDIRS = $(SRCDIR)/scripts $(SRCDIR)/webextension $(SRCDIR)
+
+# used libs
+LIBS = gtk+-3.0 webkit2gtk-4.0
+
+# setup general used CFLAGS
+CFLAGS += -std=c99 -pipe -Wall
+#CPPFLAGS += -pedantic
+CPPFLAGS += -DVERSION=\"${VERSION}\" -DEXTPREFIX=\"${EXTPREFIX}\"
+CPPFLAGS += -DPROJECT=\"vimb\" -DPROJECT_UCFIRST=\"Vimb\"
CPPFLAGS += -D_XOPEN_SOURCE=500
-CPPFLAGS += -D_POSIX_SOURCE
-ifeq ($(USEGTK3), 1)
-CPPFLAGS += -DHAS_GTK3
CPPFLAGS += -DGSEAL_ENABLE
CPPFLAGS += -DGTK_DISABLE_SINGLE_INCLUDES
-CPPFLAGS += -DGTK_DISABLE_DEPRECATED
CPPFLAGS += -DGDK_DISABLE_DEPRECATED
-endif
-
-# prepare the lib flags used for the linker
-LIBFLAGS = $(shell pkg-config --libs $(LIBS))
-
-# some compiler flags in case CFLAGS is not set by user
-# -Wno-typedef-redefinition to avoid redifinition warnings caused by glib
-CFLAGS ?= -Wall -pipe -Wno-overlength-strings -Werror=format-security -Wno-typedef-redefinition
-# normal compiler flags
-CFLAGS += $(shell pkg-config --cflags $(LIBS))
-CFLAGS += -std=c99
-CFLAGS += ${CPPFLAGS}
-LDFLAGS += ${LIBFLAGS}
-TARGET = $(PROJECT)
-LIBTARGET = lib$(PROJECT).so
-DIST_FILE = $(PROJECT)_$(VERSION).tar.gz
-MAN1 = $(PROJECT).1
+# flags used to build webextension
+EXTTARGET = webext_main.so
+EXTCFLAGS = ${CFLAGS} -fPIC $(shell pkg-config --cflags webkit2gtk-4.0)
+EXTCFLAGS += $(CPPFLAGS)
+EXTLDFLAGS = $(shell pkg-config --libs webkit2gtk-4.0) -shared
-MFLAGS ?= --no-print-directory
+# flags used for the main application
+CFLAGS += $(shell pkg-config --cflags $(LIBS))
+CFLAGS += ${CPPFLAGS}
+LDFLAGS += $(shell pkg-config --libs $(LIBS))