Automake question

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Jul 29 14:20:55 UTC 2009


Sebastian Huber wrote:
> Hi,
> 
> for a BSP I need to compile one module with non standard CFLAGS.  How can I do
> this?  Unfortunately this will not work:
> 
> noinst_PROGRAMS = starthooks.rel
> 
> starthooks_rel_SOURCES = startup/bspstarthooks.c
> starthooks_rel_CFLAGS = $(NON_STANDARD_CFLAGS)
> 
> libbsp_a_LIBADD = starthooks.rel
> 
> Automake still uses the $(CFLAGS) which contains all the $(CPU_CFLAGS).
> 
> Have a nice day!

This works and is quite ugly:

libbsp_a_SOURCES += startup/bspstarthooks.c
bspstarthooks.o: startup/bspstarthooks.c
        $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
	$(AM_CPPFLAGS)$(CPPFLAGS) $(AM_CFLAGS) $(LPC24XX_CFLAGS) \
        -MT bspstarthooks.o -MD -MP -MF $(DEPDIR)/bspstarthooks.Tpo \
	-c -o bspstarthooks.o \
        `test -f 'startup/bspstarthooks.c' || echo \
	'$(srcdir)/'`startup/bspstarthooks.c

-- 
Sebastian Huber, Embedded Brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list