Update to version information to allow vendor customization
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 20 Oct 2005 04:34:17 +0000 (04:34 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 20 Oct 2005 04:34:17 +0000 (04:34 +0000)
Signed-off-by: Fab Tillier (ftillier@silverstorm.com)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@127 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

inc/oib_ver.h
inc/openib.def

index 7d3caf2..59a29d3 100644 (file)
 #include <windows.h>\r
 #include <ntverp.h>\r
 \r
-#ifndef VER_FILEMAJORVERSION\r
-#define VER_FILEMAJORVERSION           1\r
-#endif\r
-\r
-#ifndef VER_FILEMINORVERSION\r
-#define VER_FILEMINORVERSION           0\r
-#endif\r
-\r
-#ifndef VER_FILEBUILD\r
-#define VER_FILEBUILD                          VER_OPENIB\r
-#endif\r
-\r
-#ifndef VER_FILEREV\r
-#define VER_FILEREV                                    0\r
-#endif\r
-\r
 #if            (VER_FILEBUILD < 10)\r
 #define VER_FILEBPAD "000"\r
 #elif  (VER_FILEBUILD < 100)\r
 #ifdef VER_COMPANYNAME_STR\r
 #undef VER_COMPANYNAME_STR\r
 #endif\r
-#define VER_COMPANYNAME_STR            "OpenIB Alliance"\r
+#define VER_COMPANYNAME_STR            IB_COMPANYNAME\r
 \r
 #ifdef VER_PRODUCTNAME_STR\r
 #undef VER_PRODUCTNAME_STR\r
 #endif\r
-#define VER_PRODUCTNAME_STR            "OpenIB Windows"\r
+#define VER_PRODUCTNAME_STR            IB_PRODUCTNAME\r
 \r
 #define VER_LEGALCOPYRIGHT_STR "Copyright\xa9 2005 OpenIB Alliance"\r
index 76cebec..58a14e2 100644 (file)
@@ -1,3 +1,34 @@
 !INCLUDE $(NTMAKEENV)\makefile.def\r
 \r
-C_DEFINES=$(C_DEFINES) -DVER_OPENIB="$(VER_OPENIB)"\r
+# Allow overriding the company name.\r
+!IF !DEFINED(IB_COMPANYNAME)\r
+IB_COMPANYNAME="""OpenIB\x20Alliance"""\r
+!ENDIF\r
+\r
+# Allow overriding the product name.\r
+!IF !DEFINED(IB_PRODUCTNAME)\r
+IB_PRODUCTNAME="""OpenIB\x20Windows"""\r
+!ENDIF\r
+\r
+!IF !DEFINED(IB_MAJORVERSION)\r
+IB_MAJORVERSION=1\r
+!endif\r
+\r
+!IF !DEFINED(IB_MINORVERSION)\r
+IB_MINORVERSION=0\r
+!endif\r
+\r
+!IF !DEFINED(IB_FILEBUILD)\r
+IB_FILEBUILD=0\r
+!endif\r
+\r
+!IF !DEFINED(IB_FILEREV)\r
+IB_FILEREV=$(OPENIB_REV)\r
+!endif\r
+\r
+C_DEFINES=$(C_DEFINES) -DIB_COMPANYNAME=$(IB_COMPANYNAME) \\r
+    -DIB_PRODUCTNAME=$(IB_PRODUCTNAME) \\r
+    -DVER_FILEMAJORVERSION=$(IB_MAJORVERSION) \\r
+    -DVER_FILEMINORVERSION=$(IB_MINORVERSION) \\r
+    -DVER_FILEBUILD=$(IB_FILEBUILD) \\r
+    -DVER_FILEREV=$(IB_FILEREV)\r