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?

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

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

Yes, you did.

Have a nice day,
        Stepan Kasal


Reply via email to