Makefile.lib (7dd47b95b0f54f2057d40af6e66d477e3fe95d13) Makefile.lib (cf0c3e68aa81f992b0301f62e341b710d385bf68)
1# Backward compatibility
2asflags-y += $(EXTRA_AFLAGS)
3ccflags-y += $(EXTRA_CFLAGS)
4cppflags-y += $(EXTRA_CPPFLAGS)
5ldflags-y += $(EXTRA_LDFLAGS)
6
7#
8# flags that take effect in sub directories

--- 399 unchanged lines hidden (view full) ---

408cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
409 xz --check=crc32 --lzma2=dict=1MiB) > $@ || \
410 (rm -f $@ ; false)
411
412# ASM offsets
413# ---------------------------------------------------------------------------
414
415# Default sed regexp - multiline due to syntax constraints
1# Backward compatibility
2asflags-y += $(EXTRA_AFLAGS)
3ccflags-y += $(EXTRA_CFLAGS)
4cppflags-y += $(EXTRA_CPPFLAGS)
5ldflags-y += $(EXTRA_LDFLAGS)
6
7#
8# flags that take effect in sub directories

--- 399 unchanged lines hidden (view full) ---

408cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
409 xz --check=crc32 --lzma2=dict=1MiB) > $@ || \
410 (rm -f $@ ; false)
411
412# ASM offsets
413# ---------------------------------------------------------------------------
414
415# Default sed regexp - multiline due to syntax constraints
416#
417# Use [:space:] because LLVM's integrated assembler inserts <tab> around
418# the .ascii directive whereas GCC keeps the <space> as-is.
416define sed-offsets
419define sed-offsets
417 "/^->/{s:->#\(.*\):/* \1 */:; \
420 's:^[[:space:]]*\.ascii[[:space:]]*"\(.*\)".*:\1:; \
421 /^->/{s:->#\(.*\):/* \1 */:; \
418 s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
422 s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
419 s:->::; p;}"
423 s:->::; p;}'
420endef
421
422# Use filechk to avoid rebuilds when a header changes, but the resulting file
423# does not
424define filechk_offsets
425 (set -e; \
426 echo "#ifndef $2"; \
427 echo "#define $2"; \
428 echo "/*"; \
429 echo " * DO NOT MODIFY."; \
430 echo " *"; \
431 echo " * This file was generated by Kbuild"; \
432 echo " */"; \
433 echo ""; \
434 sed -ne $(sed-offsets); \
435 echo ""; \
436 echo "#endif" )
437endef
424endef
425
426# Use filechk to avoid rebuilds when a header changes, but the resulting file
427# does not
428define filechk_offsets
429 (set -e; \
430 echo "#ifndef $2"; \
431 echo "#define $2"; \
432 echo "/*"; \
433 echo " * DO NOT MODIFY."; \
434 echo " *"; \
435 echo " * This file was generated by Kbuild"; \
436 echo " */"; \
437 echo ""; \
438 sed -ne $(sed-offsets); \
439 echo ""; \
440 echo "#endif" )
441endef