Question regarding makefile.inc

Hi,

I am trying to build a driver that needs has dependent libraries that need to be build during the process. I am building all those dependent files in makefile.inc. One issue Im facing is these labraries are getting built at every pass of the build process(Pass0,pass1 & pass2). Is there a way for preventing this ?

Yes, take a look at NTTARGETFILE0

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@gmail.com” wrote in message
news:xxxxx@ntdev:

> Hi,
>
> I am trying to build a driver that needs has dependent libraries that need to be build during the process. I am building all those dependent files in makefile.inc. One issue Im facing is these labraries are getting built at every pass of the build process(Pass0,pass1 & pass2). Is there a way for preventing this ?

You want NTTARGETFILE1, not 0. pass 0 is for idl and header gen, pass 1 is for libs. BUT each lib should be its own sources file and you control the order in the parent dirs file.

d

debt from my phone


From: Don Burn
Sent: 7/23/2012 3:11 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Question regarding makefile.inc

Yes, take a look at NTTARGETFILE0

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@gmail.com” wrote in message
news:xxxxx@ntdev:

> Hi,
>
> I am trying to build a driver that needs has dependent libraries that need to be build during the process. I am building all those dependent files in makefile.inc. One issue Im facing is these labraries are getting built at every pass of the build process(Pass0,pass1 & pass2). Is there a way for preventing this ?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

Hi,

Thanks for the reply. For some reason that didn’t work. I tried something like this:

makefile.inc

lib1.dll : 1.obj 2.obj
1.obj : 1.c
gen 1.obj
2.obj : 2.c
gen 2.obj
3.obj : 3.c

sources

NTTARGETFILE0 : lib1.dll lib2.dll …

And if for some reason you don’t automatically think you need to do
everything Doron says just because Doron was the guy who said it, you’ll get
a parallel multi-processor build if you do it the way he suggested. If you
use your own makefile, it will all be single-processor through that step.

Jake Oshins
Windows Kernel Team

The message offers no warranties and confers no rights.

“Doron Holan” wrote in message
news:xxxxx@ntdev…
You want NTTARGETFILE1, not 0. pass 0 is for idl and header gen, pass 1 is
for libs. BUT each lib should be its own sources file and you control the
order in the parent dirs file.

d

debt from my phone
From: Don Burn
Sent: 7/23/2012 3:11 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Question regarding makefile.inc

Yes, take a look at NTTARGETFILE0

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@gmail.com” wrote in message
news:xxxxx@ntdev:

> Hi,
>
> I am trying to build a driver that needs has dependent libraries that
> need to be build during the process. I am building all those dependent
> files in makefile.inc. One issue Im facing is these labraries are getting
> built at every pass of the build process(Pass0,pass1 & pass2). Is there a
> way for preventing this ?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

By the way I tried NTTARGETFILE1 too. Even with that Im getting the same errors.

xxxxx@gmail.com wrote:

Thanks for the reply. For some reason that didn’t work. I tried something like this:

makefile.inc

lib1.dll : 1.obj 2.obj
1.obj : 1.c
gen 1.obj
2.obj : 2.c
gen 2.obj
3.obj : 3.c

sources

NTTARGETFILE0 : lib1.dll lib2.dll …

No, that won’t work.

Create a tree like this:
lib1\
sources
1.c
lib2\
sources
2.c
lib3\
sources
3.c
mydriver\
sources
a.c
b.c

Then, in the root, you put a file called “dirs” with:
DIRS = lib1 lib2 lib3 mydriver

In each of the libs, set TARGETPATH to a location at the root – all in
one spot. Then, you can refer to that path in TARGETLIBS in
“mydriver\sources”. Now, when you start at the root and do “build”,
everything is done in the right order.

If you cd to “mydriver” and run build, it won’t update the others.
Don’t do that. However, remember that the beauty of a DLL is that you
don’t need to change the lib when the code changes – only if the
exports change.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Im sorry for confusing you. These are not even c files. I have other tools that create these files in several steps (BIOS files). Im creating these bios files using the make. So I m trying to keep all these files in a single makefile.inc

What is your targettype?

d

debt from my phone


From: xxxxx@gmail.com
Sent: 7/23/2012 5:15 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Question regarding makefile.inc

Im sorry for confusing you. These are not even c files. I have other tools that create these files in several steps (BIOS files). Im creating these bios files using the make. So I m trying to keep all these files in a single makefile.inc


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

xxxxx@gmail.com wrote:

Im sorry for confusing you. These are not even c files. I have other tools that create these files in several steps (BIOS files). Im creating these bios files using the make. So I m trying to keep all these files in a single makefile.inc

Well, then, what you showed is more or less correct, once you change the
0 to a 1. What DO you see?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Tim Roberts wrote:

xxxxx@gmail.com wrote:
> Im sorry for confusing you. These are not even c files. I have other tools that create these files in several steps (BIOS files). Im creating these bios files using the make. So I m trying to keep all these files in a single makefile.inc
Well, then, what you showed is more or less correct, once you change the
0 to a 1. What DO you see?

Actually, there is one more thing. Since you haven’t really showed us
the ACTUAL contents of the file, we don’t know what file extensions you
are using. Nmake only processes the file extensions that it knows
about. If you are using extensions that nmake doesn’t know about, then
you have to add those to the .SUFFIXES list.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Pass0 is appropriate for generating .c files

d

debt from my phone


From: Tim Roberts
Sent: 7/23/2012 5:30 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Question regarding makefile.inc

Tim Roberts wrote:

xxxxx@gmail.com wrote:
> Im sorry for confusing you. These are not even c files. I have other tools that create these files in several steps (BIOS files). Im creating these bios files using the make. So I m trying to keep all these files in a single makefile.inc
Well, then, what you showed is more or less correct, once you change the
0 to a 1. What DO you see?

Actually, there is one more thing. Since you haven’t really showed us
the ACTUAL contents of the file, we don’t know what file extensions you
are using. Nmake only processes the file extensions that it knows
about. If you are using extensions that nmake doesn’t know about, then
you have to add those to the .SUFFIXES list.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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