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

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

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to