diff options
author | Mans Rullgard | 2012-08-07 02:11:25 +0100 |
---|---|---|
committer | Mans Rullgard | 2012-08-07 21:36:51 +0100 |
commit | dfd9159f3db987e9115715cded7a4408179e3ed9 (patch) | |
tree | 82f135a2370113d8b91e74a0a372704ce3d0516e /Makefile | |
parent | 00cb52c65cb2913f20dd3d0e6601d1b0db0b657b (diff) |
build: change checkheaders to use regular build rules
Many compilers need special flags to compile *.h files as regular
source code, if they will do so at all. Rather than hoping all
compilers will have such a flag and adding mappings for it, create
wrapper .c files for test building single headers.
This allows using the regular rule for compiling C files without the
need for special flags, and it also provides proper dependency tracking
for these objects.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -45,8 +45,8 @@ COMPILE_S = $(call COMPILE,AS) %.o: %.S $(COMPILE_S) -%.ho: %.h - $(CC) $(CCFLAGS) -c $(CC_O) -x c $< +%.h.c: + $(Q)echo '#include "$*.h"' >$@ %.ver: %.v $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@ |