This is another problem with BUILD utility. I can’t find a way to specify
sources files from another directories.
Example of source file:
TARGETNAME=tdi_flt
TARGETPATH=obj
TARGETTYPE=DRIVER
TARGETLIBS=$(DDK_LIB_PATH)\tdi.lib
SOURCES= tdi_flt.c \
datapipe.c \
filter.c \
obj_tbl.c \
memtrack.c
If I specify source files from another directory, for example
SOURCES= util\datapipe.c
BUILD utility outputs error message. Maybe solution is to set some variable
to addiditional path of source files?
vlad-ntdev
vlad-ntdev wrote:
This is another problem with BUILD utility. I can’t find a way to specify
sources files from another directories.
Example of source file:
TARGETNAME=tdi_flt
TARGETPATH=obj
TARGETTYPE=DRIVER
TARGETLIBS=$(DDK_LIB_PATH)\tdi.lib
SOURCES= tdi_flt.c \
datapipe.c \
filter.c \
obj_tbl.c \
memtrack.c
If I specify source files from another directory, for example
SOURCES= util\datapipe.c
BUILD utility outputs error message. Maybe solution is to set some
variable
to addiditional path of source files?
vlad-ntdev
Actually, the solution for this is to build a library with a seperate
sources file
in util, then link the library in this build.
Don Burn
Windows NT/2000/XP Filesystem and Device Driver Consulting
> If I specify source files from another directory, for example
SOURCES= util\datapipe.c
BUILD utility outputs error message. Maybe solution is to set some variable
Put another SOURCES to that directory, which will build a .LIB.
Then link this .LIB to your driver binary.
Max
This works but looks more like a workaround.
I tried adding files from other directories to SOURCES a few years back. At that time DDK was
quite shaky, so it didn’t surprise me that it did not work.
Since that time MS has done good job on DDK side, so I’m just curious as to why is it still not
supported? Anyone has any idea?
Unless I miss something obvious this should be trivial thing to do.
– Max.
— “Maxim S. Shatskih” wrote:
> > If I specify source files from another directory, for example
> >
> > SOURCES= util\datapipe.c
> >
> > BUILD utility outputs error message. Maybe solution is to set some variable
>
> Put another SOURCES to that directory, which will build a .LIB.
> Then link this .LIB to your driver binary.
>
> Max
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@yahoo.com
> To unsubscribe send a blank email to %%email.unsub%%
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/
> This works but looks more like a workaround.
I tried adding files from other directories to SOURCES a few years back.
At that time DDK was
quite shaky, so it didn’t surprise me that it did not work.
Since that time MS has done good job on DDK side, so I’m just curious as
to why is it still not
supported? Anyone has any idea?
Unless I miss something obvious this should be trivial thing to do.
Seems like MS don’t use this techniques and thus assume nobody need it. BTW
I am thinking about using GNU Make for building drivers. The only problem is
that VC compiler does not have “generate dependences” option and I need
additional tool for doing this.
Vladimir
The DDK build environment hasn’t been ‘shaky’ as far as I know for the last
6-7 years. The debugger, well, that is another story, one with a happy
ending though.
The source location limitation is by design. There are ugly work-arounds
like #include “…\foo\realfile.c”, but I think the best approach is the one
already suggested by several folks: use a library.
-----Original Message-----
From: Max Paklin [mailto:xxxxx@yahoo.com]
Sent: Monday, March 18, 2002 2:44 PM
To: NT Developers Interest List
Subject: [ntdev] Re: BUILD SOURCES from another directories
This works but looks more like a workaround.
I tried adding files from other directories to SOURCES a few
years back. At that time DDK was quite shaky, so it didn’t
surprise me that it did not work. Since that time MS has done
good job on DDK side, so I’m just curious as to why is it
still not supported? Anyone has any idea? Unless I miss
something obvious this should be trivial thing to do.
– Max.
— “Maxim S. Shatskih” wrote:
> > > If I specify source files from another directory, for example
> > >
> > > SOURCES= util\datapipe.c
> > >
> > > BUILD utility outputs error message. Maybe solution is to
> set some
> > > variable
> >
> > Put another SOURCES to that directory, which will build a
> .LIB. Then
> > link this .LIB to your driver binary.
> >
> > Max
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@yahoo.com To
> > unsubscribe send a blank email to %%email.unsub%%
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@stratus.com To unsubscribe send a blank email to
> %%email.unsub%%
>
Oh, I forgot, the other workaround, equally ugly to the #include
“…\foo\file.c” is to reorganize your sources so that the common source
files are in the top directory and the specialized source files are in
the next level down. Sort of inverted and anti-intuitive, and the top
directory is littered with .c files (thus ugly,) but it is effective for
some cases. “…\file.c” is legal.
=====================
Mark Roddy
Windows XP/2000/NT Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
xxxxx@hollistech.com
For Windows Device Driver Training: see www.azius.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Monday, March 18, 2002 2:54 PM
To: NT Developers Interest List
Subject: [ntdev] Re: BUILD SOURCES from another directories
The DDK build environment hasn’t been ‘shaky’ as far as I
know for the last 6-7 years. The debugger, well, that is
another story, one with a happy ending though.
The source location limitation is by design. There are ugly
work-arounds like #include “…\foo\realfile.c”, but I think
the best approach is the one already suggested by several
folks: use a library.
> -----Original Message-----
> From: Max Paklin [mailto:xxxxx@yahoo.com]
> Sent: Monday, March 18, 2002 2:44 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: BUILD SOURCES from another directories
>
>
> This works but looks more like a workaround.
>
> I tried adding files from other directories to SOURCES a few
> years back. At that time DDK was quite shaky, so it didn’t
> surprise me that it did not work. Since that time MS has done
> good job on DDK side, so I’m just curious as to why is it
> still not supported? Anyone has any idea? Unless I miss
> something obvious this should be trivial thing to do.
>
> – Max.
>
>
>
> — “Maxim S. Shatskih” wrote:
> > > > If I specify source files from another directory, for example
> > > >
> > > > SOURCES= util\datapipe.c
> > > >
> > > > BUILD utility outputs error message. Maybe solution is to
> > set some
> > > > variable
> > >
> > > Put another SOURCES to that directory, which will build a
> > .LIB. Then
> > > link this .LIB to your driver binary.
> > >
> > > Max
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@yahoo.com To
> > > unsubscribe send a blank email to %%email.unsub%%
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/
> >
> > —
> > You are currently subscribed to ntdev as:
> > xxxxx@stratus.com To unsubscribe send a blank email to
> > %%email.unsub%%
> >
>
> —
> You are currently subscribed to ntdev as: xxxxx@hollistech.com
> To unsubscribe send a blank email to %%email.unsub%%
>
>
>
You can build using make files but you must be very careful; specifically, the
compiler/linker version and build flags. build.bat verifies that these are
correct. You can inspect the compiler and linker options set by build.bat and
add them to your makefiles, but each time you receive a DDK update you must go
back and ensure that the options have not changed. The proper compiler and
linker to use depends on the version of the DDK you are building against: NT DDK
requires the VC 4.2 compiler and linker; 2K DDK requires the VC 5.0 or above
compiler and the linker from the DDK; and XP requires the compiler and linker
packaged in the DDK.
Dave
Vladimir Ignatov wrote:
> This works but looks more like a workaround.
>
> I tried adding files from other directories to SOURCES a few years back.
At that time DDK was
> quite shaky, so it didn’t surprise me that it did not work.
> Since that time MS has done good job on DDK side, so I’m just curious as
to why is it still not
> supported? Anyone has any idea?
> Unless I miss something obvious this should be trivial thing to do.
Seems like MS don’t use this techniques and thus assume nobody need it. BTW
I am thinking about using GNU Make for building drivers. The only problem is
that VC compiler does not have “generate dependences” option and I need
additional tool for doing this.
Vladimir
You are currently subscribed to ntdev as: xxxxx@okena.com
To unsubscribe send a blank email to %%email.unsub%%
Yeap, that’s what I do.
I like DevStudio and its browser. Of course, this is absolutely not supported and can qualify as
hackery, but I’ve been doing it only during development and my own testing. Everything that goes
into official installation or to QA is built using BUILD.
There’s a better way of using external makefile in conjunction with DevStudio, but it also relies
on BUILD and therefore inherets its limitations.
As for using appropriate compiler, with XP DDK and Numega’s SETDDKGO utility it’s no longer an
issue. With a little help from SETDDKGO my drivers are built using DevStudio 6 and compiler
shipped with XP DDK.
– Max.
— Dave McCowan wrote:
> You can build using make files but you must be very careful; specifically, the
> compiler/linker version and build flags. build.bat verifies that these are
> correct. You can inspect the compiler and linker options set by build.bat and
> add them to your makefiles, but each time you receive a DDK update you must go
> back and ensure that the options have not changed. The proper compiler and
> linker to use depends on the version of the DDK you are building against: NT DDK
> requires the VC 4.2 compiler and linker; 2K DDK requires the VC 5.0 or above
> compiler and the linker from the DDK; and XP requires the compiler and linker
> packaged in the DDK.
>
> Dave
>
> Vladimir Ignatov wrote:
>
> > > This works but looks more like a workaround.
> > >
> > > I tried adding files from other directories to SOURCES a few years back.
> > At that time DDK was
> > > quite shaky, so it didn’t surprise me that it did not work.
> > > Since that time MS has done good job on DDK side, so I’m just curious as
> > to why is it still not
> > > supported? Anyone has any idea?
> > > Unless I miss something obvious this should be trivial thing to do.
> > Seems like MS don’t use this techniques and thus assume nobody need it. BTW
> > I am thinking about using GNU Make for building drivers. The only problem is
> > that VC compiler does not have “generate dependences” option and I need
> > additional tool for doing this.
> >
> > Vladimir
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@okena.com
> > To unsubscribe send a blank email to %%email.unsub%%
>
> —
> You are currently subscribed to ntdev as: xxxxx@yahoo.com
> To unsubscribe send a blank email to %%email.unsub%%
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/
No workaround, it is standard solution. It is probably because build utility
is designed for building whole trees, not just one driver.
Maybe there is a solution (really workaround) which would allow to use
standard settings (i.e. makefile.def) and still allow sources in other
directories. Try
nmake MAKEDLL=1
in the directory with SOURCES instead of build. I believe the limitation to
current and parent directories is only for build utility and above could
work. Of course, there can be problem with dependencies. Note: I use it only
for quick builds and never tried with files in other directories.
Best regards,
Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]
From: xxxxx@yahoo.com[SMTP:xxxxx@yahoo.com]
Reply To: xxxxx@lists.osr.com
Sent: Monday, March 18, 2002 8:44 PM
To: xxxxx@lists.osr.com
Subject: [ntdev] Re: BUILD SOURCES from another directories
This works but looks more like a workaround.
I tried adding files from other directories to SOURCES a few years back.
At that time DDK was
quite shaky, so it didn’t surprise me that it did not work.
Since that time MS has done good job on DDK side, so I’m just curious as
to why is it still not
supported? Anyone has any idea?
Unless I miss something obvious this should be trivial thing to do.
– Max.
— “Maxim S. Shatskih” wrote:
> > > If I specify source files from another directory, for example
> > >
> > > SOURCES= util\datapipe.c
> > >
> > > BUILD utility outputs error message. Maybe solution is to set some
> variable
> >
> > Put another SOURCES to that directory, which will build a .LIB.
> > Then link this .LIB to your driver binary.
> >
> > Max
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@yahoo.com
> > To unsubscribe send a blank email to %%email.unsub%%
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
> http://sports.yahoo.com/
>
> —
> You are currently subscribed to ntdev as: michal.vodicka@st.com
> To unsubscribe send a blank email to %%email.unsub%%
>