> >>>>> "Carl" == Carl van Schaik <[EMAIL PROTECTED]> writes:
> 
> Carl> I am at present trying to get automake to build a library that
> Carl> contains various source files (.c, .s) that I want to compile
> Carl> with different compilers. Automake no matter what I have done,
> Carl> sees the suffix (.c, .s) and automatically starts to compile it
> Carl> with gcc.  If I force the $(COMPILE) variable, the as complains
> Carl> about the "-c" which is inserted for gcc.
> 
> Carl> Is there any nice way to fix this?
> 
> I'm not sure I understand what you are asking.
> Are you asking how to make it so .s files aren't compiled with the C
> compiler?
> I agree this is an automake bug (of long standing).
> You can probably make your own ".s.o" rule.
> Or make your own rule on a per-object basis.

I for the moment have worked out a way to force all the defines through
gcc to the assembler.

Also, there any way to get automake to compile a .c file to .o and not
make a library or program out of it?
I'm doing some cross-compiling stuff that only seems to work if I compile
files to .o and use the linker to create a binary... this is a pain in
automake ...

ie. what I do at the moment

----- Makefile.am -----
all: led_blink.c
        $(CC) -Wall -DAT91M40400 -I$(top_srcdir)/src/include \
                    -c $(srcdir)/led_blink.c -o led_blink.o; \
        $(LD) -Ttext 0x2018000 -e 0x2018000 -o led_blink.bin \
                    ../../library/init/lib32/in_main.o led_blink.o \
                    ../../library/init/lib32/in_eb01.o \
                    ../../library/init/lib32/in_reset.o \
                    ../../angel-lib/libangel.arm \
                    ../../library/lib32/lib32.arm \
                    $(prefix)/arm-AT91-elf/lib/libc.a \
                    $(prefix)/lib/gcc-lib/arm-AT91-elf/2.95.2/libgcc.a

Reply via email to