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 06:21:09 +0200

Hi,


From: Stepan Kasal <address@hidden>
To: Jari Strand <address@hidden>
CC: address@hidden
Subject: Re: no rule to make asm targets
Date: Tue, 5 Dec 2006 20:59:50 +0100

Hello,

On Tue, Dec 05, 2006 at 07:28:28PM +0200, Jari Strand wrote:
> Ralf wrote:
> >Generally, you could
> >- avoid per-target flags here to avoid the renamed object files, or
> >- write manual rules for all those objects, or
> >- write the target dependencies on the objects yourself, to control
> >  the object file names, or
> >- use Automake 1.10, and just use its builtin support for assembly
> >  (but then your source files need to be named *.s/*.S, and you need
> > CCAS/CCASFLAGS/AM_CCASFLAGS, and the AM_PROG_AS macro; see the manual)
[...]
> Ok here is the Slightly modified Makefile.am:

well, it depends how much modified it is.
For example, does bin_PROGRAMS really contain only one program?

Yes, I only changed remove the full path where TLIB_PATH was pointing and removed the files from editorD_SOURCES and added those two imaginary entries and removed many defines from editorD_CPPFLAGS to make it more clear. I could have also removed all the lib paths in AM_CPPFLAGS to make it even more clearer.


> 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
>
>
> CPLUS_INCLUDE_PATH = /usr/include
>
> editorD_CPPFLAGS = $(AM_CPPFLAGS) -DEDITOR_BUILD
>
> editorD_SOURCES = \
> someSource.cc \
> someAsm.asm
>
> SUFFIXES = .asm.o
>
> ..asm.o: $(NASM_PATH) -o $@ -f elf -dLINUX $<

As I said, the `SUFFIXES' variable is redundant in this case.
But when it is used, you have to separate the suffixes by whitespace:
SUFFIXES = .asm .o

Back to your Makefile.am.  If it really is that simple, you can apply
any of the advices given by Ralf.  For example:

> - avoid per-target flags here to avoid the renamed object files

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 $<

> - write manual rules for all those objects

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
editorD_CPPFLAGS = $(AM_CPPFLAGS) -DEDITOR_BUILD
editorD_SOURCES = someSource.cc someAsm.asm
editorD-someAsm.o: someAsm.asm
        $(NASM_PATH) -o $@ -f elf -dLINUX $<

If you think that these advices are not appliable in your case,
post a less simplified version of Makefile.am.

Alright, I can do that but could you tell me how to use global-target flags, instead of the per-target? Because this is the only way I have learned to do things from a tutorial.



> PS: I hope I got that Cc right now?

Yes, you did.

Have a nice day,
        Stepan Kasal


Thanks for the help!

Jari.

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! http://search.msn.com/





reply via email to

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