Thread: how to automatically update archive file in another directory

  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    48

    how to automatically update archive file in another directory

    dear there,

    I have two directories: Common and Sub. In Common I have files to generate common.a
    and in Sub, I need to generate executables which all depends on common.a

    how can I ask make to automatically update common.a, if files for its members are changed? I tried VPATH and GPATH, but didn't make it work yet. Looking for help! Thanks!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Add the makefile to the top-level makefile as a dependency which always happens.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 04:27 PM
  2. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  3. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  4. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  5. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM

Tags for this Thread