Basic Build Question!

Hello

I am trying to use the DDK build to build my project.
I have my file structure as

RootDir ----> Dir1 -----> Inc
-----> Src ----> file1.c, file2.c
----> Dir2 -----> Inc
-----> Src ----> file3.c, file4.c
----> Dir3 -----> Inc
-----> Src ----> file5.c, file6.c

Now how if i have a “dirs” file in each of the RootDir, Dir1 and have a
“sources” and “makefile” directory in each of the Src directory, i get three
separate target executable(*.sys).
But i need a single .sys out of all these three directories…

I also tried having a single sources file in the rootDir but when i put
SOURCES=C:\RootDir\Dir1\Src\File1.c an error props up in make saying that
“Ignoring invalid directory prefix in SOURCES= entry:…”

Could anybody help me out??

TIA
Venky


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

What I would suggest is that you make 2 of the directories generate
DRIVER_LIBRARYs. The 3rd directory should can stay the same, but should
link against the libraries generated in dir 1 and dir 2.

-----Original Message-----
From: Varadan Venkatesh [mailto:xxxxx@tataelxsi.co.in]
Sent: Monday, June 11, 2001 9:05 AM
To: NT Developers Interest List
Subject: [ntdev] Basic Build Question!

Hello

I am trying to use the DDK build to build my project.
I have my file structure as

RootDir ----> Dir1 -----> Inc
-----> Src ----> file1.c, file2.c
----> Dir2 -----> Inc
-----> Src ----> file3.c, file4.c
----> Dir3 -----> Inc
-----> Src ----> file5.c, file6.c

Now how if i have a “dirs” file in each of the RootDir, Dir1 and have a
“sources” and “makefile” directory in each of the Src directory, i get three
separate target executable(*.sys). But i need a single .sys out of all these
three directories…

I also tried having a single sources file in the rootDir but when i put
SOURCES=C:\RootDir\Dir1\Src\File1.c an error props up in make saying that
“Ignoring invalid directory prefix in SOURCES= entry:…”

Could anybody help me out??

TIA
Venky


You are currently subscribed to ntdev as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Build doesn’t like your source tree organization. A) You could turn two of
your DirN’s into library targets and have the other DirN link in those two
libraries. B) Alternatively you could reorganize your source tree into one
big directory - but I’m guessing that you do not want to do that. I’d go for
plan A as it is a simple organizational change and should otherwise not
disturb things. The basic limitation is that SOURCES can refer to source
files ‘up a level’, but not ‘up and over’ or by absolute path name.

-----Original Message-----
From: Varadan Venkatesh [mailto:xxxxx@tataelxsi.co.in]
Sent: Monday, June 11, 2001 9:05 AM
To: NT Developers Interest List
Subject: [ntdev] Basic Build Question!

Hello

I am trying to use the DDK build to build my project.
I have my file structure as

RootDir ----> Dir1 -----> Inc
-----> Src ----> file1.c, file2.c
----> Dir2 -----> Inc
-----> Src ----> file3.c, file4.c
----> Dir3 -----> Inc
-----> Src ----> file5.c, file6.c

Now how if i have a “dirs” file in each of the RootDir, Dir1 and have a
“sources” and “makefile” directory in each of the Src directory, i get three
separate target executable(*.sys). But i need a single .sys out of all these
three directories…

I also tried having a single sources file in the rootDir but when i put
SOURCES=C:\RootDir\Dir1\Src\File1.c an error props up in make saying that
“Ignoring invalid directory prefix in SOURCES= entry:…”

Could anybody help me out??

TIA
Venky


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Mark

Thanks for the suggestion. But does this way of linking two libs to form a
.sys a valid way? Because normally the intermediate files are .obj’s. Is it
acceptable to have .libs instead. This is just a thought!

Thanks
venky

[venky]-----Original Message-----
[venky]From: xxxxx@lists.osr.com
[venky][mailto:xxxxx@lists.osr.com]On Behalf Of Roddy, Mark
[venky]Sent: Monday, June 11, 2001 6:45 PM
[venky]To: NT Developers Interest List
[venky]Subject: [ntdev] RE: Basic Build Question!
[venky]
[venky]
[venky]Build doesn’t like your source tree organization. A) You
[venky]could turn two of
[venky]your DirN’s into library targets and have the other DirN
[venky]link in those two
[venky]libraries. B) Alternatively you could reorganize your source
[venky]tree into one
[venky]big directory - but I’m guessing that you do not want to do
[venky]that. I’d go for
[venky]plan A as it is a simple organizational change and should
[venky]otherwise not
[venky]disturb things. The basic limitation is that SOURCES can
[venky]refer to source
[venky]files ‘up a level’, but not ‘up and over’ or by absolute path name.
[venky]
[venky]-----Original Message-----
[venky]From: Varadan Venkatesh [mailto:xxxxx@tataelxsi.co.in]
[venky]Sent: Monday, June 11, 2001 9:05 AM
[venky]To: NT Developers Interest List
[venky]Subject: [ntdev] Basic Build Question!
[venky]
[venky]
[venky]Hello
[venky]
[venky]I am trying to use the DDK build to build my project.
[venky]I have my file structure as
[venky]
[venky]RootDir ----> Dir1 -----> Inc
[venky] -----> Src ----> file1.c, file2.c
[venky] ----> Dir2 -----> Inc
[venky] -----> Src ----> file3.c, file4.c
[venky] ----> Dir3 -----> Inc
[venky] -----> Src ----> file5.c, file6.c
[venky]
[venky]Now how if i have a “dirs” file in each of the RootDir, Dir1
[venky]and have a
[venky]“sources” and “makefile” directory in each of the Src
[venky]directory, i get three
[venky]separate target executable(*.sys). But i need a single .sys
[venky]out of all these
[venky]three directories…
[venky]
[venky]I also tried having a single sources file in the rootDir but
[venky]when i put
[venky]SOURCES=C:\RootDir\Dir1\Src\File1.c an error props up in
[venky]make saying that
[venky]“Ignoring invalid directory prefix in SOURCES= entry:…”
[venky]
[venky]Could anybody help me out??
[venky]
[venky]TIA
[venky]Venky
[venky]
[venky]
[venky]—
[venky]You are currently subscribed to ntdev as: xxxxx@stratus.com To
[venky]unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
[venky]
[venky]—
[venky]You are currently subscribed to ntdev as: xxxxx@tataelxsi.co.in
[venky]To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Mark & others,

I have one more clarification. According to my tree structure,

RootDir ----> Dir1 -----> Inc
-----> Src ----> file1.c, file2.c
----> Dir2 -----> Inc
-----> Src ----> file3.c, file4.c
----> Dir3 -----> Inc
-----> Src ----> file5.c, file6.c

if i have file1.c to file6.c in a single directory and build using a
single sources and makefile, i get teh size of the .sys file as 67 KB.
But if i build two libraries for dir1 and dir2 and link these libraries
while building dir3, the resulting .sys comes as 57 KB.

Do u see any problems? the same .c files are built in different manner
and the sizes are contradicting…

TIA
Venky

[venky]
[venky]-----Original Message-----
[venky]From: xxxxx@lists.osr.com
[venky][mailto:xxxxx@lists.osr.com]On Behalf Of Roddy, Mark
[venky]Sent: Monday, June 11, 2001 6:45 PM
[venky]To: NT Developers Interest List
[venky]Subject: [ntdev] RE: Basic Build Question!
[venky]
[venky]
[venky]Build doesn’t like your source tree organization. A) You
[venky]could turn two of
[venky]your DirN’s into library targets and have the other DirN
[venky]link in those two
[venky]libraries. B) Alternatively you could reorganize your source
[venky]tree into one
[venky]big directory - but I’m guessing that you do not want to do
[venky]that. I’d go for
[venky]plan A as it is a simple organizational change and should
[venky]otherwise not
[venky]disturb things. The basic limitation is that SOURCES can
[venky]refer to source
[venky]files ‘up a level’, but not ‘up and over’ or by absolute path name.
[venky]
[venky]-----Original Message-----
[venky]From: Varadan Venkatesh [mailto:xxxxx@tataelxsi.co.in]
[venky]Sent: Monday, June 11, 2001 9:05 AM
[venky]To: NT Developers Interest List
[venky]Subject: [ntdev] Basic Build Question!
[venky]
[venky]
[venky]Hello
[venky]
[venky]I am trying to use the DDK build to build my project.
[venky]I have my file structure as
[venky]
[venky]RootDir ----> Dir1 -----> Inc
[venky] -----> Src ----> file1.c, file2.c
[venky] ----> Dir2 -----> Inc
[venky] -----> Src ----> file3.c, file4.c
[venky] ----> Dir3 -----> Inc
[venky] -----> Src ----> file5.c, file6.c
[venky]
[venky]Now how if i have a “dirs” file in each of the RootDir, Dir1
[venky]and have a
[venky]“sources” and “makefile” directory in each of the Src
[venky]directory, i get three
[venky]separate target executable(*.sys). But i need a single .sys
[venky]out of all these
[venky]three directories…
[venky]
[venky]I also tried having a single sources file in the rootDir but
[venky]when i put
[venky]SOURCES=C:\RootDir\Dir1\Src\File1.c an error props up in
[venky]make saying that
[venky]“Ignoring invalid directory prefix in SOURCES= entry:…”
[venky]
[venky]Could anybody help me out??
[venky]
[venky]TIA
[venky]Venky
[venky]
[venky]
[venky]—
[venky]You are currently subscribed to ntdev as: xxxxx@stratus.com To
[venky]unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
[venky]
[venky]—
[venky]You are currently subscribed to ntdev as: xxxxx@tataelxsi.co.in
[venky]To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Yes sure this is valid. Your driver is already linking with a bunch of
standard kernel libraries, you are just a adding a few of your own. Search
the DDK src tree for SOURCES files containing the pattern ‘LIBRARY’. For
example DDKROOT\src\kernel\agp is a set of directories that build a kernel
driver library and a kernel driver .sys object that uses that library.

-----Original Message-----
From: Varadan Venkatesh [mailto:xxxxx@tataelxsi.co.in]
Sent: Monday, June 11, 2001 9:59 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Basic Build Question!

Mark

Thanks for the suggestion. But does this way of linking two libs to form a
.sys a valid way? Because normally the intermediate files are .obj’s. Is it
acceptable to have .libs instead. This is just a thought!

Thanks
venky

[venky]-----Original Message-----
[venky]From: xxxxx@lists.osr.com
[venky][mailto:xxxxx@lists.osr.com]On Behalf Of Roddy, Mark
[venky]Sent: Monday, June 11, 2001 6:45 PM
[venky]To: NT Developers Interest List
[venky]Subject: [ntdev] RE: Basic Build Question!
[venky]
[venky]
[venky]Build doesn’t like your source tree organization. A) You [venky]could
turn two of [venky]your DirN’s into library targets and have the other DirN
[venky]link in those two [venky]libraries. B) Alternatively you could
reorganize your source [venky]tree into one [venky]big directory - but I’m
guessing that you do not want to do [venky]that. I’d go for [venky]plan A as
it is a simple organizational change and should [venky]otherwise not
[venky]disturb things. The basic limitation is that SOURCES can [venky]refer
to source [venky]files ‘up a level’, but not ‘up and over’ or by absolute
path name. [venky] [venky]-----Original Message-----
[venky]From: Varadan Venkatesh [mailto:xxxxx@tataelxsi.co.in]
[venky]Sent: Monday, June 11, 2001 9:05 AM
[venky]To: NT Developers Interest List
[venky]Subject: [ntdev] Basic Build Question!
[venky]
[venky]
[venky]Hello
[venky]
[venky]I am trying to use the DDK build to build my project. [venky]I have
my file structure as [venky] [venky]RootDir ----> Dir1 -----> Inc
[venky] -----> Src ----> file1.c, file2.c
[venky] ----> Dir2 -----> Inc
[venky] -----> Src ----> file3.c, file4.c
[venky] ----> Dir3 -----> Inc
[venky] -----> Src ----> file5.c, file6.c
[venky]
[venky]Now how if i have a “dirs” file in each of the RootDir, Dir1
[venky]and have a [venky]“sources” and “makefile” directory in each of the
Src [venky]directory, i get three [venky]separate target executable(*.sys).
But i need a single .sys [venky]out of all these [venky]three directories…
[venky] [venky]I also tried having a single sources file in the rootDir but
[venky]when i put [venky]SOURCES=C:\RootDir\Dir1\Src\File1.c an error props
up in [venky]make saying that [venky]“Ignoring invalid directory prefix in
SOURCES= entry:…” [venky] [venky]Could anybody help me out?? [venky]
[venky]TIA [venky]Venky [venky] [venky]
[venky]—
[venky]You are currently subscribed to ntdev as: xxxxx@stratus.com To
[venky]unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
[venky]
[venky]—
[venky]You are currently subscribed to ntdev as: xxxxx@tataelxsi.co.in
[venky]To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

My guess is that the linker is better at detecting/eliminating dead code
from linked libraries than an unorganized glob of .obj files. Youdid however
do a clean build each time, right?

-----Original Message-----
From: Varadan Venkatesh [mailto:xxxxx@tataelxsi.co.in]
Sent: Monday, June 11, 2001 10:04 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Basic Build Question!

Mark & others,

I have one more clarification. According to my tree structure,

RootDir ----> Dir1 -----> Inc
-----> Src ----> file1.c, file2.c
----> Dir2 -----> Inc
-----> Src ----> file3.c, file4.c
----> Dir3 -----> Inc
-----> Src ----> file5.c, file6.c

if i have file1.c to file6.c in a single directory and build using a
single sources and makefile, i get teh size of the .sys file as 67 KB. But
if i build two libraries for dir1 and dir2 and link these libraries while
building dir3, the resulting .sys comes as 57 KB.

Do u see any problems? the same .c files are built in different manner and
the sizes are contradicting…

TIA
Venky

[venky]
[venky]-----Original Message-----
[venky]From: xxxxx@lists.osr.com
[venky][mailto:xxxxx@lists.osr.com]On Behalf Of Roddy, Mark
[venky]Sent: Monday, June 11, 2001 6:45 PM
[venky]To: NT Developers Interest List
[venky]Subject: [ntdev] RE: Basic Build Question!
[venky]
[venky]
[venky]Build doesn’t like your source tree organization. A) You
[venky]could turn two of
[venky]your DirN’s into library targets and have the other DirN
[venky]link in those two
[venky]libraries. B) Alternatively you could reorganize your source
[venky]tree into one
[venky]big directory - but I’m guessing that you do not want to do
[venky]that. I’d go for
[venky]plan A as it is a simple organizational change and should
[venky]otherwise not
[venky]disturb things. The basic limitation is that SOURCES can
[venky]refer to source
[venky]files ‘up a level’, but not ‘up and over’ or by absolute path name.
[venky] [venky]-----Original Message-----
[venky]From: Varadan Venkatesh [mailto:xxxxx@tataelxsi.co.in]
[venky]Sent: Monday, June 11, 2001 9:05 AM
[venky]To: NT Developers Interest List
[venky]Subject: [ntdev] Basic Build Question!
[venky]
[venky]
[venky]Hello
[venky]
[venky]I am trying to use the DDK build to build my project. [venky]I have
my file structure as [venky] [venky]RootDir ----> Dir1 -----> Inc
[venky] -----> Src ----> file1.c, file2.c
[venky] ----> Dir2 -----> Inc
[venky] -----> Src ----> file3.c, file4.c
[venky] ----> Dir3 -----> Inc
[venky] -----> Src ----> file5.c, file6.c
[venky]
[venky]Now how if i have a “dirs” file in each of the RootDir, Dir1
[venky]and have a
[venky]“sources” and “makefile” directory in each of the Src
[venky]directory, i get three
[venky]separate target executable(*.sys). But i need a single .sys
[venky]out of all these
[venky]three directories…
[venky]
[venky]I also tried having a single sources file in the rootDir but
[venky]when i put
[venky]SOURCES=C:\RootDir\Dir1\Src\File1.c an error props up in
[venky]make saying that
[venky]“Ignoring invalid directory prefix in SOURCES= entry:…” [venky]
[venky]Could anybody help me out?? [venky] [venky]TIA [venky]Venky [venky]
[venky]
[venky]—
[venky]You are currently subscribed to ntdev as: xxxxx@stratus.com To
[venky]unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
[venky]
[venky]—
[venky]You are currently subscribed to ntdev as: xxxxx@tataelxsi.co.in
[venky]To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> Thanks for the suggestion. But does this way of linking two libs to form a

.sys a valid way? Because normally the intermediate files are .obj’s. Is
it
acceptable to have .libs instead.

Surely, this is a common way for multi-directory build trees.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com