On 8/10/07, Bernd Jendrissek <[EMAIL PROTECTED]> wrote:
> On 8/10/07, NightStrike <[EMAIL PROTECTED]> wrote:
> > For a particular project, there are a handful of .c files that need to
> > be compiled to .o files and installed as .o files, not linked into any
> > executable.  I came up with this ugly workaround:
>
> How about something like:
>
> startupdir = $(libdir)/nightstrike
>
> # Abusing the notion of "scripts" here...
> startup_SCRIPTS = crt1.o crt2.o crtspecialflags.o
>
> crtspecialflags_o_CFLAGS = $(AM_CFLAGS) $(CFLAGS) -fspecial-flag
>
> Then you let make figure out how to build the objects from C sources
> via the implicit .c.o: rule.

Overloading _SCRIPTS is similar to what I did with overloading
BUILT_SOURCES. I'm still left with the issue that crt1.o and crt2.o
are not built from crt1.c and crt2.c.

Perhaps I could use BUILT_SOURCES for its real intent and actually
create crt1.c and crt2.c from crtexe.c by simply doing:

crt%.c:
    cp crtexe.c $@

But even there, I'm left with the original issue that I then need to
compile crt1 and 2.c into crt1.o and crt2.o.


Reply via email to