Makefile for multiple cpps
Hi guys
I have a project which has 5 CPPs files: each representing a component and runs stand-alone. I know that Makefile can compile things base on the dependency... 1st file: dependence.1 dependence.2 2nd file (which is dependence.1): etc etc But if I have 5 separate cpps, all dependent on the same set of dependecies.. how should I go about it? I tried putting them in 1 makefile, but once it compiles the first one, it won't go beyond that, detecting the 1st as "up to date". anyone? my current file is like this: Code:
Client/client: Client/Common/md5.o Client/Common/tea.o Client/Common/wrappers.o |
I'm going to take a stab at this, but my impression is you haven't looked much at the Make manual online, have you? That's not meant to be mean, but it's a hunch.
I'm assuming you have saved the text you've provided above in a file named "Makefile" and you're running "make" at the commandline, correct? If that is the case, then my impression is correct. When you run make, you must specify a target. As in "make all" or "make clean". If you don't specify a target, then make assumes you want to update the first target listed in Makefile. In this case, that would be "Client/client", or as you said yourself: 'the 1st as "up to date".' You need to add a new target to your Makefile: Code:
.PHONY: all I haven't used the .PHONY target in a while. You'll need to double-check that the syntax is correct. |
thanks for the tip. i'll check them out
|
All times are GMT -5. The time now is 10:26 PM. |