How to point to a library in SOURCES

I am converting a driver from x86 only to x86 + AMD64 + IA64.

As part of the driver, I build a library. How to I point at this driver
in the SOURCES file of the components that need it? I am trying to
define a macro to point at the dir, but am having a problem.

BUILD_ALT_DIR refers to the right parent directory, but how can I get
the name of the final subdir? _BUILD_ARCH only works for 64-bit, for
32-bit it is “x86”, not “i386”.

For now I have separate SOURCES files for each architecture and copy the
correct one to SOURCES. before I run build, but that seems like a hack.

Thanks,
ScottR

This is a line from the TARGETLIBS of our sources file the builds a SYS
from several libraries we build preceding the final collection into the
driver:

$(PROJECT_ROOT)\Drivers\SrcLibA\Platform\WDF$(TARGETPATH)$(TARGET_DIRECT
ORY)\ SrcLib.lib \

It’s the two TARGET_ macros you need.

Gary G. Little
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Robins, Scott
Sent: Tuesday, June 13, 2006 9:04 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to point to a library in SOURCES

I am converting a driver from x86 only to x86 + AMD64 + IA64.

As part of the driver, I build a library. How to I point at this driver
in the SOURCES file of the components that need it? I am trying to
define a macro to point at the dir, but am having a problem.

BUILD_ALT_DIR refers to the right parent directory, but how can I get
the name of the final subdir? _BUILD_ARCH only works for 64-bit, for
32-bit it is “x86”, not “i386”.

For now I have separate SOURCES files for each architecture and copy the
correct one to SOURCES. before I run build, but that seems like a hack.

Thanks,
ScottR


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

TARGET_DIRECTORY points to the correct subdirectory. So you could, for
example, construct a library path from $(
SOMEPATH)$(TARGET_DIRECTORY)\yourLib.lib

Alternatively you can use ‘*’ as in $(SOMEPATH)*\yourLib.lib

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Robins, Scott
Sent: Tuesday, June 13, 2006 10:04 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to point to a library in SOURCES

I am converting a driver from x86 only to x86 + AMD64 + IA64.

As part of the driver, I build a library. How to I point at this driver
in the SOURCES file of the components that need it? I am trying to
define a macro to point at the dir, but am having a problem.

BUILD_ALT_DIR refers to the right parent directory, but how can I get
the name of the final subdir? _BUILD_ARCH only works for 64-bit, for
32-bit it is “x86”, not “i386”.

For now I have separate SOURCES files for each architecture and copy the
correct one to SOURCES. before I run build, but that seems like a hack.

Thanks,
ScottR


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thank you, gentlemen.

The help for TARGET_DIRECTORY, which I looked at, is not at all helpful.
And I didn’t think of the “*” trick, although I do see it now in places.

Thanks again,
ScottR