Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.msdos.programmer > #757
| From | pete@nospam.demon.co.uk |
|---|---|
| Newsgroups | comp.os.msdos.programmer |
| Subject | Re: Rebuild all obj/lib via makefile... |
| Date | 2012-08-29 06:33 +0000 |
| Organization | PDL |
| Message-ID | <1346222036snz@nospam.demon.co.uk> (permalink) |
| References | <23564718-5240-46a0-a9ec-a972a3a5fed6@googlegroups.com> |
In article <23564718-5240-46a0-a9ec-a972a3a5fed6@googlegroups.com>
jimmyliaoo@gmail.com "liaoo" writes:
> Dear all,
> I have one question about how to "rebuild all" obj/lib via makefile...
>
> @ My project looks like:
> - main directory "MyProj" includes:
> 1) 3 sub directories(A,B, and C),
> 2) makefile, and
> 3) batch file to compile/link to .exe file
> - in each sub-directory(Ex. A dir) includes:
> 1) a.cpp, a.h
> 2) makefile, and
> 3) batch file to compile cpp file...
>
> @ The situation is: assume header file c.h is "updated" both a.cpp & b.cpp
> reference it, then original steps are:
>
> a. goto directory C
> b. execute batch file in C to compile and c.lib generated...
> c. goto directory A
> d. execute batch file in A to compile and a.lib generated...
> e. goto directory B
> f. execute batch file in B to compile and b.lib generated...
> g. goto main directory and execute the batch file to compile and link
>
> @ My question is: is there any way to do above in "fewer" steps via "makefile"
> ?
>
> Thanks !
> liaoo
Of course there is, depending of course on the capability of your MAKE
utility. It's simply a case of defining your tagets and dependencies
correctly.
One question: why do you have three subdirs? If you had just one
(e.g. ./LIB) it would likely simplify considerably the rules in your
makefile.
Pete
--
Believe those who are seeking the truth.
Doubt those who find it. - André Gide
Back to comp.os.msdos.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Rebuild all obj/lib via makefile... liaoo <jimmyliaoo@gmail.com> - 2012-08-28 20:44 -0700
Re: Rebuild all obj/lib via makefile... pete@nospam.demon.co.uk - 2012-08-29 06:33 +0000
Re: Rebuild all obj/lib via makefile... rugxulo@gmail.com - 2012-08-29 04:12 -0700
Re: Rebuild all obj/lib via makefile... Johann Klammer <klammerj@NOSPAM.a1.net> - 2012-08-29 18:02 +0200
csiph-web