Suppose, I have the following directory structure:

  project
  |
  +bin
  | +Debug
  | +Release
  |
  +include
  | +foo
  |
  +src
  | +foo
  |
  +somelib
    +lib
      +Debug
      +Release

What I want is something like this:

  cd somelib/lib
  make $(CFG)  # build somelib first
  cd (back to where we started from)
  g++ -I somelib/lib -c -o bin/$(CFG)/*.obj src/*.cpp src/foo/*.cxx
  g++ -o -L somelib/lib -l somelib -o bin/$(CFG)/myapp bin/$(CFG)/*.obj

So, build somelib first, then build everything within src (recursively),
taking into account all includes (recursively, with dependencies) and
put all binaries/object files into bin.
Finally link everything together.

Could someone please point me into the right direction?
Unfortunately I have to meet a deadline, so I don't really have time to
read thick manuals. :-(
However, I don't expect a complete solution, some advice on where to
look would already help me a lot!

E.g., do I have do define targets with a path?
I.e. targets like "bin/$(CFG)/*.o:" or something like that?

Thanks,
Andreas

Reply via email to