]> git.decadent.org.uk Git - videolink.git/commitdiff
Added definition of Mozilla version components for use in webdvd.cpp.
authorBen Hutchings <ben@decadent.org.uk>
Thu, 15 Dec 2005 00:50:55 +0000 (00:50 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 2 Nov 2008 23:19:49 +0000 (23:19 +0000)
Makefile

index be6565ec6b272d75ef8145f76d1ab320ab27087c..989ef7d50271bcb58869ad5a49b2b9b2ba2d34ee 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,13 @@ moz_include_dir := \
 moz_lib_dir := \
     $(shell pkg-config --variable=prefix mozilla-gtkmozembed)/lib/mozilla
 
+moz_version := \
+    $(shell sed 's/\#define MOZILLA_VERSION "\(.*\)"/\1/; t; d' \
+            < $(moz_include_dir)/mozilla-config.h)
+moz_version_major := $(word 1,$(subst ., ,$(moz_version)))
+moz_version_minor := $(word 2,$(subst ., ,$(moz_version)))
+moz_version_patchlevel := $(word 3,$(subst ., ,$(moz_version)))
+
 CFLAGS := -Wall
 CPPFLAGS := -D_REENTRANT
 # Non-virtual destructors are fine in XPCOM interface classes since
@@ -47,7 +54,11 @@ install :
 
 browserwidget.% : CPPFLAGS += -DMOZ_LIB_DIR='"$(moz_lib_dir)"'
 
-webdvd.% : CPPFLAGS += -DWEBDVD_LIB_DIR='"$(webdvd_lib_dir)"'
+webdvd.% \
+    : CPPFLAGS += -DWEBDVD_LIB_DIR='"$(webdvd_lib_dir)"'             \
+                  -DMOZ_VERSION_MAJOR=$(moz_version_major)           \
+                  -DMOZ_VERSION_MINOR=$(moz_version_minor)           \
+                  -DMOZ_VERSION_PATCHLEVEL=$(moz_version_patchlevel)
 
 browserwidget.% pixbufs.% temp_file.% webdvd.% \
     : CPPFLAGS += $(shell pkg-config --cflags gtkmm-2.0)