help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: One Makefile for more object files


From: Oleksandr Gavenko
Subject: Re: One Makefile for more object files
Date: Tue, 09 Nov 2010 16:25:36 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

On 09.11.2010 8:38, Csanyi Pal wrote:
Hi,

I'm trying to compile 16 sourcefiles to get 16 executable objectfiles
with one Makefile, but without success. Is this possyble?

All source files are in the same directory.

The makefile is here:
http://pastebin.com/N1WLUJEk

but when I run 'make' I get only the first executable: DPResetBit0
$ make
gcc -ggdb DPResetBit0.c -o DPResetBit0

and the others won't to be compiled.

I'm trying to understand GNU make reading GNU `make' here:
http://www.gnu.org/software/make/manual/make.html

but can't figure out what to do to achieve my goal?

Any advices will be appreciated!

If you don't provide targets by default  make uses first, which is

DPResetBit0 : DPResetBit0.c
        gcc -ggdb DPResetBit0.c -o DPResetBit0

in your case.

To force build all *.c define new goal:

compile-all:  DPResetBit0 DPResetBit1 DPResetBit2 DPResetBit3 ...

and invoke make like:

  $ make compile-all

--
С уважением, Александр Гавенко.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]