[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Make compiling *.S CPPFLAGS aware
From: |
Ralf Corsepius |
Subject: |
Make compiling *.S CPPFLAGS aware |
Date: |
Sat, 10 Jan 2004 10:52:46 +0100 |
Hi,
I'd like to propose the patch below, which
* splits handling of *.s (asm) and *.S (preprocessed asm) into 2
separated rule sets.
* makes handling of *.S-files aware of CPPFLAGS (Similar to gmake's
behavior), AM_CPPFLAGS and *_CPPFLAGS.
Background: I have libraries which consist of *.c + *.S files and
require custom CPPFLAGS:
...
lib_LIBRARIES = libfoo.a
libfoo_a_SOURCES = foo.c bar.S
libfoo_a_CPPFLAGS = -DOPTIMIZE
...
lib_LIBRARIES += libfoo_g.a
libfoo_g_a_SOURCES = $(libfoo_a_SOURCES)
libfoo_g_a_CPPFLAGS = -DDEBUG
...
An unmodified automake generates Makefile rules to build
libfoo_a-foo.o + bar.o and libfoo_g_a-foo.o + bar.o, which share bar.o
for both libraries. Using customized *_CCASFLAGS, it would be possible
to make *.S-compilation rules CPPFLAGS-aware, but doesn't help wrt. to
the file-names.
With this patch, automake generates Makefile rules for
libfoo_a-foo.o + libfoo_a-bar.o and
libfoo_g_a-foo.o + libfoo_g_a-bar.o,
with *-bar.o being compiled with the appropriate CPPFLAGS.
Ralf
automake-1.8-rc-20040110-1.diff
Description: Text Data
- Make compiling *.S CPPFLAGS aware,
Ralf Corsepius <=