Hi!
I was toying around trying to find a little more generic method of
doing dependecies that would work for any GCC compatible make utility
on the various platforms on which it's available when I discovered
that if you regenerate the makefile enough times in DB it eventually
picks up all dependencies and includes them properly (???!!!) Not
sure why it doesn't seem to work on a first go...
Anyway, both our efforts may be for naught. Just regenerate the
makefile a couple (2 or 3?) of times when adding new headers and the
makefile DB generates should work fine.
fyi,
Dave S.
--- In anthemion-devtools
yahoogroups.com, "sglow2000" <sglow
...> wrote:
>
> Hi Dave;
>
> OK, thanks. I had assumed that dialogblocks would track these
> dependencies for me.
>
> For anyone else who's interested, here are a couple lines that can be
> added to the end of the Makefile which will automatically track all
> the dependencies. This uses gcc, so will probably only work under
Linux:
>
> Rgds,
> Steve
>
> ### End DialogBlocks generated body
>
> dep/%.d : c/%.cpp
>
echo ........... Building $
>
mkdir -p dep
>
gcc -MM $(CPPFLAGS) -MT $(patsubst c/%.cpp,$(OBJECTPATH)/%.o,$<)
$< > $
>
gcc -MM $(CPPFLAGS) -MT $(patsubst c/%.cpp,dep/%.d,$<) $< >> $
>
> include $(patsubst $(OBJECTPATH)/%.o,dep/%.d,$(OBJECTS))
>
>
>
>
>
> --- In anthemion-devtools
yahoogroups.com, "ddotedotsdot"
> <dsilvia
> wrote:
> >
> > Hi!
> >
> > DB only knows about dependencies it generates. It does not parse user
> > code for any reason, it only modifies and regenerates code enclosed
> > within its comment markers. It also assumes a one-to-one relationship
> > between implementation files (.cpp) and header files (.h).
> >
> > What you can do is modify the makefile within the DB editor. Open the
> > Sources folder in the Project tree and select the makefile. This will
> > open the source editor with the makefile displayed. Go to the bottom
> > of the makefile, after the comment marker. Let's say, just for
> > discussion purposes, you have a wxFrame class named DoodleFrame with
> > files named doodleframe.cpp and doodleframe.h. In the makefile there
> > will be a target:
> >
> > $(OBJECTPATH)/doodleframe.o: doodleframe.cpp doodleframe.h
> > $(CXX) -c -o $
$(CPPFLAGS) $(GCCFLAGS) $(DEBUGFLAGS) $(OPTFLAGS)
> > $(WARNINGFLAGS) $(CPPINC) doodleframe.cpp
> >
> > (second line is wrapped...)
> >
> > What you do, is at the bottom of the makefile you add another target.
> > Let's say you have a second header named nulla.h that doodleframe
> > depends on, this is what the target at the bottom of the makefile will
> > look like:
> >
> > $(OBJECTPATH)/doodleframe.o: nulla.h
> >
> >
> > (NOTE: no second line with a build command)
> > This will cause doodleframe.o to be remade by the previous rule
> > whenever nulla.h is modified.
> >
> > HTH,
> > Dave S.
> >
> > --- In anthemion-devtools
yahoogroups.com, "sglow2000" <sglow
> wrote:
> > >
> > > I've noticed that the makefiles generated by dialogblocks don't seem
> > > to include most of the header files in my project. As a result I
> > > often have to hit 'rebuild all' in order to properly build my
project.
> > >
> > > This is true for most, but not all the headers. The headers
that are
> > > specified in the 'implementation header file' property of a
dialog do
> > > seem to be added. The majority of my headers are not used to
define a
> > > dialog however, and are not listed in the makefile.
> > >
> > > Am I missing some setting in dialogblocks that will allow me to tell
> > > it where to find the headers? They are all located in a
sub-directory
> > > under the main project directory.
> > >
> > > I have added the option -Iinc to the include path settings for my
> > > compiler (under build->configurations), so the compiler is able to
> > > find the headers when it compiles.
> > >
> > > Thanks,
> > > Steve
> > >
> >
>
.