[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to Create Pattern Rule in GNUmake for Source from Multiple Place
From: |
Paul Jarc |
Subject: |
Re: How to Create Pattern Rule in GNUmake for Source from Multiple Places? |
Date: |
Thu, 25 Oct 2001 13:20:20 -0400 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 |
address@hidden (Hon-Chi Ng) wrote:
> So, the ugly and inefficient way is to explicitly write all the rules
> one by one, e.g.
>
> /tmp/abc.o: /aaa/bbb/ccc/abc.c
> $(CC) -c $(CFLAGS) $< -o $@
>
> /tmp/def.o: /ddd/eee/fff/def.c
> $(CC) -c $(CFLAGS) $< -o $@
>
> /tmp/ghi.o: /ggg/hhh/iii/ghi.c
> $(CC) -c $(CFLAGS) $< -o $@
>
> However, it becomes an impossible task when SRC_FILES contains more than
> 50 files.
That's ugly and inefficient if you manually maintain the Makefile, but
it's simple and precise if you manually maintain a script that
generates the Makefile.
paul