# used libs
LIBS = gtk+-3.0 'webkit2gtk-4.0 >= 2.3.5'
+COMMIT := $(shell git describe --tags --always 2> /dev/null || echo "unknown")
+
# setup general used CFLAGS
CFLAGS += -std=c99 -pipe -Wall
#CPPFLAGS += -pedantic
-CPPFLAGS += -DVERSION=\"${VERSION}\" -DEXTENSIONDIR=\"${EXTENSIONDIR}\"
+CPPFLAGS += -DVERSION=\"${VERSION}\" -DEXTENSIONDIR=\"${EXTENSIONDIR}\" -DCOMMIT=\"$(COMMIT)\"
CPPFLAGS += -DPROJECT=\"vimb\" -DPROJECT_UCFIRST=\"Vimb\"
CPPFLAGS += -D_XOPEN_SOURCE=500
CPPFLAGS += -D__BSD_VISIBLE
gboolean ver = FALSE;
GOptionEntry opts[] = {
- {"embed", 'e', 0, G_OPTION_ARG_STRING, &winid, "Reparents to window specified by xid", NULL},
+ {"embed", 'e', 0, G_OPTION_ARG_STRING, &winid, "Reparents to window specified by xid", NULL},
{"config", 'c', 0, G_OPTION_ARG_FILENAME, &vb.configfile, "Custom configuration file", NULL},
{"profile", 'p', 0, G_OPTION_ARG_CALLBACK, (GOptionArgFunc*)profileOptionArgFunc, "Profile name", NULL},
{"version", 'v', 0, G_OPTION_ARG_NONE, &ver, "Print version", NULL},
}
if (ver) {
- fprintf(stdout, "%s, version %s\n\n", PROJECT, VERSION);
- fprintf(stdout, "Copyright © 2012 - 2017 Daniel Carl <danielcarl@gmx.de>\n");
- fprintf(stdout, "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n");
- fprintf(stdout, "This is free software; you are free to change and redistribute it.\n");
- fprintf(stdout, "There is NO WARRANTY, to the extent permitted by law.\n");
+ printf("%s, version %s\n\n", PROJECT, VERSION);
+ printf("Commit: %s\n", COMMIT);
+ printf("WebKit compile: %d.%d.%d\n",
+ WEBKIT_MAJOR_VERSION,
+ WEBKIT_MINOR_VERSION,
+ WEBKIT_MICRO_VERSION);
+ printf("WebKit run: %d.%d.%d\n",
+ webkit_get_major_version(),
+ webkit_get_minor_version(),
+ webkit_get_micro_version());
+ printf("GTK compile: %d.%d.%d\n",
+ GTK_MAJOR_VERSION,
+ GTK_MINOR_VERSION,
+ GTK_MICRO_VERSION);
+ printf("GTK run: %d.%d.%d\n",
+ gtk_major_version,
+ gtk_minor_version,
+ gtk_micro_version);
+ printf("libsoup compile: %d.%d.%d\n",
+ SOUP_MAJOR_VERSION,
+ SOUP_MINOR_VERSION,
+ SOUP_MICRO_VERSION);
+ printf("libsoup run: %u.%u.%u\n",
+ soup_get_major_version(),
+ soup_get_minor_version(),
+ soup_get_micro_version());
return EXIT_SUCCESS;
}