automake
[Top][All Lists]
Advanced

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

Re: no rule to make asm targets


From: Jari Strand
Subject: Re: no rule to make asm targets
Date: Wed, 06 Dec 2006 16:46:11 +0200

Hello,


From: Stepan Kasal <address@hidden>
To: Jari Strand <address@hidden>
CC: address@hidden
Subject: Re: no rule to make asm targets
Date: Wed, 6 Dec 2006 11:52:19 +0100

Hello,

On Wed, Dec 06, 2006 at 06:21:09AM +0200, Jari Strand wrote:
> >For example, does bin_PROGRAMS really contain only one program?
>
> Yes, [...]

OK, in that case there is no need to use per-target flags.

Alright, I was actually planning on supporting more targets later on and now that this didnt work I didnt want rush to add support for more targets. I have now however changed it to not to use the per-target settings but the global (AM_) target.


Let me show an example:

bin_PROGRAMS = first second third
first_SOURCES = first.c
second_SOURCES = second.c
third_SOURCES = third.c

AM_CFLAGS = ...
second_CFLAGS = ...

In this example, `AM_CFLAGS' is used for all programs, with one
exception: when compiling program `third', `third_CFLAGS' is used
instead.

Thanks for the demonstration! I suppose you meant "second" as that's what you typed but I understand.


This `third_CFLAGS' is called per-target variable, and overrides the
corresponding general one AM_CFLAGS.

The mechanism is the same in your case, when you are using *_CPPFLAGS
instead of *_CFLAGS.

Since you have only one program, you can set `AM_CPPFLAGS' as needed
for the program `editorD', and there is no need to use the override
mechanism.

Then, because of some internal mechanisms of Automake, the suffix
rule `.asm.o' will be used, and you can redefine it if you like.

Start with the following code, adding back the things you removed
to simplify the example.

> >bin_PROGRAMS = editorD
> >TLIB_PATH = /home
> >AM_CPPFLAGS = -I$(TLIB_PATH)/openal/LINUX -I$(TLIB_PATH)/lungif \
> >       -I$(TLIB_PATH)/lungif -I$(TLIB_PATH)/opengl2d3d \
> >       -I$(TLIB_PATH)/zlib -I$(TLIB_PATH)/lpng -I$(TLIB_PATH)/ljpeg \
> >       -I$(TLIB_PATH)/vorbis/include -DEDITOR_BUILD
> >editorD_SOURCES = someSource.cc someAsm.asm
> >.asm.o:
> >       $(NASM_PATH) -o $@ -f elf -dLINUX $<

Ok it's changed now and the new object files were built. Unfortunately this did not solve the asm object file problem but the error remains the same.


Have a nice day,
        Stepan Kasal

Thank you, good day to you too.

Jari.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/





reply via email to

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