[MTHCA] mthca.inf file stamping support.
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 18 Jul 2008 00:17:11 +0000 (00:17 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 18 Jul 2008 00:17:11 +0000 (00:17 +0000)
rename mthca.inf --> mthca.inx
added makefile.inc

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1412 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mthca/kernel/SOURCES
hw/mthca/kernel/makefile.inc [new file with mode: 0644]
hw/mthca/kernel/mthca.inx [moved from hw/mthca/kernel/mthca.inf with 100% similarity]

index d30cd3e..5364cdb 100644 (file)
@@ -4,6 +4,14 @@ TARGETNAME=mthca
 TARGETPATH=$(TRUNK)\bin\kernel\obj$(BUILD_ALT_DIR)\r
 TARGETTYPE=DRIVER\r
 \r
+!if $(_NT_TOOLS_VERSION) != 0x700\r
+# WDK build only - transform .inx --> .inf adding date & version stamp.\r
+# see .\makefile.inc\r
+INF_NAME=$(TARGETNAME)\r
+INF_TARGET=$(TRUNK)\bin\kernel\$(O)\$(INF_NAME).inf\r
+NTTARGETFILES=$(INF_TARGET)\r
+!endif\r
+\r
 !if $(FREEBUILD)\r
 ENABLE_EVENT_TRACING=1\r
 !else\r
@@ -12,7 +20,6 @@ ENABLE_EVENT_TRACING=1
 \r
 SOURCES= \\r
        mthca_log.mc            \\r
-#      mthca_log.rc            \\r
        hca.rc                  \\r
        mthca_log.c             \\r
                                        \\r
diff --git a/hw/mthca/kernel/makefile.inc b/hw/mthca/kernel/makefile.inc
new file mode 100644 (file)
index 0000000..4f29f50
--- /dev/null
@@ -0,0 +1,17 @@
+\r
+# Transform .inx file to .inf file adding date + major,min & svn.version stamp\r
+# Output .inf file is copied to the $(INF_TARGET) folder (commonly where .sys file resides).\r
+\r
+_LNG=$(LANGUAGE)\r
+\r
+!IF !DEFINED(_INX)\r
+_INX=.\r
+!ENDIF\r
+\r
+STAMP=stampinf -a $(_BUILDARCH)\r
+\r
+!INCLUDE mod_ver.def\r
+\r
+$(INF_TARGET) : $(_INX)\$(INF_NAME).inx\r
+    copy $(_INX)\$(@B).inx $@\r
+    $(STAMP) -f $@ -d * -v $(IB_MAJORVERSION).$(IB_MINORVERSION).$(IB_BUILDVERSION).$(OPENIB_REV)\r