]> git.ipfire.org Git - thirdparty/kernel/stable.git/blame - scripts/Makefile.lib
kbuild: simplify modname calculation
[thirdparty/kernel/stable.git] / scripts / Makefile.lib
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
f77bf014
SR
2# Backward compatibility
3asflags-y += $(EXTRA_AFLAGS)
4ccflags-y += $(EXTRA_CFLAGS)
5cppflags-y += $(EXTRA_CPPFLAGS)
6ldflags-y += $(EXTRA_LDFLAGS)
7
8fdc3fbb 8# flags that take effect in current and sub directories
4e13d47c
MY
9KBUILD_AFLAGS += $(subdir-asflags-y)
10KBUILD_CFLAGS += $(subdir-ccflags-y)
720097d8 11
1da177e4
LT
12# Figure out what we need to build from the various variables
13# ===========================================================================
14
15# When an object is listed to be built compiled-in and modular,
16# only build the compiled-in version
1da177e4
LT
17obj-m := $(filter-out $(obj-y),$(obj-m))
18
19# Libraries are always collected in one lib file.
20# Filter out objects already built-in
1da177e4
LT
21lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m)))
22
8fdc3fbb
C
23# Determine modorder.
24# Unfortunately, we don't have information about ordering between -y
25# and -m subdirs. Just put -y's first.
26modorder := $(patsubst %/,%/modules.order, $(filter %/, $(obj-y)) $(obj-m:.o=.ko))
1da177e4
LT
27
28# Handle objects in subdirs
29# ---------------------------------------------------------------------------
f49821ee 30# o if we encounter foo/ in $(obj-y), replace it by foo/built-in.a
1da177e4 31# and add the directory to the list of dirs to descend into: $(subdir-y)
38385f8f 32# o if we encounter foo/ in $(obj-m), remove it from $(obj-m)
1da177e4 33# and add the directory to the list of dirs to descend into: $(subdir-m)
1da177e4
LT
34__subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y)))
35subdir-y += $(__subdir-y)
36__subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m)))
37subdir-m += $(__subdir-m)
f49821ee 38obj-y := $(patsubst %/, %/built-in.a, $(obj-y))
1da177e4
LT
39obj-m := $(filter-out %/, $(obj-m))
40
41# Subdirectories we need to descend into
1da177e4
LT
42subdir-ym := $(sort $(subdir-y) $(subdir-m))
43
8fdc3fbb 44# if $(foo-objs), $(foo-y), or $(foo-m) exists, foo.o is a composite object
1da177e4 45multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
cf4f2193 46multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))), $(m))))
1da177e4
LT
47multi-used := $(multi-used-y) $(multi-used-m)
48single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m)))
49
f5fb9765
SR
50# $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to
51# tell kbuild to descend
f49821ee 52subdir-obj-y := $(filter %/built-in.a, $(obj-y))
1da177e4 53
1da177e4 54# Replace multi-part objects by their individual parts, look at local dir only
10aaa3b7 55real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m)))
cf4f2193 56real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)),$(m)))
1da177e4 57
7e7962dd
MY
58# DTB
59# If CONFIG_OF_ALL_DTBS is enabled, all DT blobs are built
60extra-y += $(dtb-y)
61extra-$(CONFIG_OF_ALL_DTBS) += $(dtb-)
62
1da177e4
LT
63# Add subdir path
64
65extra-y := $(addprefix $(obj)/,$(extra-y))
66always := $(addprefix $(obj)/,$(always))
67targets := $(addprefix $(obj)/,$(targets))
551559e1 68modorder := $(addprefix $(obj)/,$(modorder))
1da177e4
LT
69obj-y := $(addprefix $(obj)/,$(obj-y))
70obj-m := $(addprefix $(obj)/,$(obj-m))
71lib-y := $(addprefix $(obj)/,$(lib-y))
72subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y))
73real-objs-y := $(addprefix $(obj)/,$(real-objs-y))
74real-objs-m := $(addprefix $(obj)/,$(real-objs-m))
75single-used-m := $(addprefix $(obj)/,$(single-used-m))
76multi-used-y := $(addprefix $(obj)/,$(multi-used-y))
77multi-used-m := $(addprefix $(obj)/,$(multi-used-m))
1da177e4 78subdir-ym := $(addprefix $(obj)/,$(subdir-ym))
1da177e4 79
1da177e4 80# These flags are needed for modversions and compiling, so we define them here
8fdc3fbb 81# $(modname_flags) defines KBUILD_MODNAME as the name of the module it will
1da177e4 82# end up in (or would, if it gets compiled in)
b42841b7
MM
83name-fix = $(squote)$(quote)$(subst $(comma),_,$(subst -,_,$1))$(quote)$(squote)
84basename_flags = -DKBUILD_BASENAME=$(call name-fix,$(basetarget))
aeacb019 85modname_flags = -DKBUILD_MODNAME=$(call name-fix,$(modname))
1da177e4 86
4e13d47c 87orig_c_flags = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) \
d8672b40 88 $(ccflags-y) $(CFLAGS_$(basetarget).o)
656ee82c 89_c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))
4e13d47c 90orig_a_flags = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) \
d8672b40 91 $(asflags-y) $(AFLAGS_$(basetarget).o)
a7e137eb 92_a_flags = $(filter-out $(AFLAGS_REMOVE_$(basetarget).o), $(orig_a_flags))
f77bf014 93_cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))
1da177e4 94
2521f2c2
PO
95#
96# Enable gcov profiling flags for a file, directory or for all files depending
97# on variables GCOV_PROFILE_obj.o, GCOV_PROFILE and CONFIG_GCOV_PROFILE_ALL
98# (in this order)
99#
100ifeq ($(CONFIG_GCOV_KERNEL),y)
101_c_flags += $(if $(patsubst n%,, \
102 $(GCOV_PROFILE_$(basetarget).o)$(GCOV_PROFILE)$(CONFIG_GCOV_PROFILE_ALL)), \
103 $(CFLAGS_GCOV))
104endif
105
0b24becc
AR
106#
107# Enable address sanitizer flags for kernel except some files or directories
108# we don't want to check (depends on variables KASAN_SANITIZE_obj.o, KASAN_SANITIZE)
109#
110ifeq ($(CONFIG_KASAN),y)
111_c_flags += $(if $(patsubst n%,, \
112 $(KASAN_SANITIZE_$(basetarget).o)$(KASAN_SANITIZE)y), \
0e410e15 113 $(CFLAGS_KASAN), $(CFLAGS_KASAN_NOSANITIZE))
0b24becc
AR
114endif
115
c6d30853
AR
116ifeq ($(CONFIG_UBSAN),y)
117_c_flags += $(if $(patsubst n%,, \
118 $(UBSAN_SANITIZE_$(basetarget).o)$(UBSAN_SANITIZE)$(CONFIG_UBSAN_SANITIZE_ALL)), \
119 $(CFLAGS_UBSAN))
120endif
121
5c9a8750
DV
122ifeq ($(CONFIG_KCOV),y)
123_c_flags += $(if $(patsubst n%,, \
a4691dea 124 $(KCOV_INSTRUMENT_$(basetarget).o)$(KCOV_INSTRUMENT)$(CONFIG_KCOV_INSTRUMENT_ALL)), \
5c9a8750
DV
125 $(CFLAGS_KCOV))
126endif
127
1da177e4
LT
128# If building the kernel in a separate objtree expand all occurrences
129# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
130
131ifeq ($(KBUILD_SRC),)
132__c_flags = $(_c_flags)
133__a_flags = $(_a_flags)
134__cpp_flags = $(_cpp_flags)
135else
136
1da177e4
LT
137# -I$(obj) locates generated .h files
138# $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files
139# and locates generated .h files
140# FIXME: Replace both with specific CFLAGS* statements in the makefiles
4607ebf0 141__c_flags = $(if $(obj),$(call addtree,-I$(src)) -I$(obj)) \
db547ef1
AB
142 $(call flags,_c_flags)
143__a_flags = $(call flags,_a_flags)
144__cpp_flags = $(call flags,_cpp_flags)
1da177e4
LT
145endif
146
d8672b40
SR
147c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
148 $(__c_flags) $(modkern_cflags) \
b42841b7 149 $(basename_flags) $(modname_flags)
1da177e4 150
d8672b40 151a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
1da177e4
LT
152 $(__a_flags) $(modkern_aflags)
153
d8672b40
SR
154cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
155 $(__cpp_flags)
1da177e4 156
f77bf014 157ld_flags = $(LDFLAGS) $(ldflags-y)
1da177e4 158
50f9ddaf
MY
159DTC_INCLUDE := $(srctree)/scripts/dtc/include-prefixes
160
b0a4d8b3 161dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \
50f9ddaf 162 $(addprefix -I,$(DTC_INCLUDE)) \
e570d7c1
SW
163 -undef -D__DTS__
164
1da177e4 165# Finds the multi-part object the current object will be linked into
aeacb019
MY
166# If the object belongs to two or more multi-part objects, all of them are
167# concatenated with a colon separator.
168modname-multi = $(subst $(space),:,$(sort $(foreach m,$(multi-used),\
c96a294e 169 $(if $(filter $*.o, $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$(m:.o=)))))
1da177e4 170
c8589d1e
MY
171# Useful for describing the dependency of composite objects
172# Usage:
173# $(call multi_depend, multi_used_targets, suffix_to_remove, suffix_to_add)
174define multi_depend
175$(foreach m, $(notdir $1), \
176 $(eval $(obj)/$m: \
177 $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s)))))))
178endef
179
7373f4f8
AL
180# LEX
181# ---------------------------------------------------------------------------
7373f4f8 182quiet_cmd_flex = LEX $@
eea199b4 183 cmd_flex = $(LEX) -o$@ -L $<
7373f4f8 184
033dba2e 185ifdef REGENERATE_PARSERS
58238c81 186.PRECIOUS: $(src)/%.lex.c_shipped
7373f4f8
AL
187$(src)/%.lex.c_shipped: $(src)/%.l
188 $(call cmd,flex)
033dba2e
MY
189endif
190
191.PRECIOUS: $(obj)/%.lex.c
192$(filter %.lex.c,$(targets)): $(obj)/%.lex.c: $(src)/%.l FORCE
193 $(call if_changed,flex)
7373f4f8
AL
194
195# YACC
196# ---------------------------------------------------------------------------
7373f4f8 197quiet_cmd_bison = YACC $@
eea199b4 198 cmd_bison = $(YACC) -o$@ -t -l $<
7373f4f8 199
033dba2e 200ifdef REGENERATE_PARSERS
58238c81 201.PRECIOUS: $(src)/%.tab.c_shipped
7373f4f8
AL
202$(src)/%.tab.c_shipped: $(src)/%.y
203 $(call cmd,bison)
033dba2e
MY
204endif
205
206.PRECIOUS: $(obj)/%.tab.c
207$(filter %.tab.c,$(targets)): $(obj)/%.tab.c: $(src)/%.y FORCE
208 $(call if_changed,bison)
7373f4f8
AL
209
210quiet_cmd_bison_h = YACC $@
211 cmd_bison_h = bison -o/dev/null --defines=$@ -t -l -p $(YACC_PREFIX) $<
212
033dba2e 213ifdef REGENERATE_PARSERS
58238c81 214.PRECIOUS: $(src)/%.tab.h_shipped
7373f4f8
AL
215$(src)/%.tab.h_shipped: $(src)/%.y
216 $(call cmd,bison_h)
7373f4f8
AL
217endif
218
033dba2e
MY
219.PRECIOUS: $(obj)/%.tab.h
220$(filter %.tab.h,$(targets)): $(obj)/%.tab.h: $(src)/%.y FORCE
221 $(call if_changed,bison_h)
222
1da177e4
LT
223# Shipped files
224# ===========================================================================
225
226quiet_cmd_shipped = SHIPPED $@
227cmd_shipped = cat $< > $@
228
991d76c9 229$(obj)/%: $(src)/%_shipped
1da177e4
LT
230 $(call cmd,shipped)
231
232# Commands useful for building a boot image
233# ===========================================================================
38385f8f 234#
1da177e4
LT
235# Use as following:
236#
237# target: source(s) FORCE
238# $(if_changed,ld/objcopy/gzip)
239#
836caba7 240# and add target to extra-y so that we know we have to
1da177e4
LT
241# read in the saved command line
242
243# Linking
244# ---------------------------------------------------------------------------
245
246quiet_cmd_ld = LD $@
f77bf014 247cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \
38385f8f 248 $(filter-out FORCE,$^) -o $@
1da177e4
LT
249
250# Objcopy
251# ---------------------------------------------------------------------------
252
253quiet_cmd_objcopy = OBJCOPY $@
254cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
255
256# Gzip
257# ---------------------------------------------------------------------------
258
259quiet_cmd_gzip = GZIP $@
6ae9ecb8 260cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
d3dd3b5a 261 (rm -f $@ ; false)
1da177e4 262
aab94339
DB
263# DTC
264# ---------------------------------------------------------------------------
6b22b3d1 265DTC ?= $(objtree)/scripts/dtc/dtc
aab94339 266
bc553986 267# Disable noisy checks by default
f759625a 268ifeq ($(findstring 1,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
8654cb8d
RH
269DTC_FLAGS += -Wno-unit_address_vs_reg \
270 -Wno-simple_bus_reg \
271 -Wno-unit_address_format \
272 -Wno-pci_bridge \
273 -Wno-pci_device_bus_num \
274 -Wno-pci_device_reg
bc553986
RH
275endif
276
f759625a 277ifneq ($(findstring 2,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
8654cb8d
RH
278DTC_FLAGS += -Wnode_name_chars_strict \
279 -Wproperty_name_chars_strict
bc553986
RH
280endif
281
331f7416
FR
282DTC_FLAGS += $(DTC_FLAGS_$(basetarget))
283
aab94339 284# Generate an assembly file to wrap the output of the device tree compiler
1c00a47e 285quiet_cmd_dt_S_dtb= DTB $@
aab94339
DB
286cmd_dt_S_dtb= \
287( \
288 echo '\#include <asm-generic/vmlinux.lds.h>'; \
289 echo '.section .dtb.init.rodata,"a"'; \
290 echo '.balign STRUCT_ALIGNMENT'; \
55fe6da9
JH
291 echo '.global __dtb_$(subst -,_,$(*F))_begin'; \
292 echo '__dtb_$(subst -,_,$(*F))_begin:'; \
aab94339 293 echo '.incbin "$<" '; \
55fe6da9
JH
294 echo '__dtb_$(subst -,_,$(*F))_end:'; \
295 echo '.global __dtb_$(subst -,_,$(*F))_end'; \
aab94339
DB
296 echo '.balign STRUCT_ALIGNMENT'; \
297) > $@
298
299$(obj)/%.dtb.S: $(obj)/%.dtb
300 $(call cmd,dt_S_dtb)
301
302quiet_cmd_dtc = DTC $@
77479b38
NR
303cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
304 $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
6b22b3d1 305 $(DTC) -O dtb -o $@ -b 0 \
50f9ddaf 306 $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \
b0a4d8b3
IC
307 -d $(depfile).dtc.tmp $(dtc-tmp) ; \
308 cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
1da177e4 309
90b335fb
SW
310$(obj)/%.dtb: $(src)/%.dts FORCE
311 $(call if_changed_dep,dtc)
312
b0a4d8b3 313dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
22435f38 314
bc22c17e
AK
315# Bzip2
316# ---------------------------------------------------------------------------
317
d3dd3b5a
PA
318# Bzip2 and LZMA do not include size in file... so we have to fake that;
319# append the size as a 32-bit littleendian number as gzip does.
4a2ff67c 320size_append = printf $(shell \
d3dd3b5a
PA
321dec_size=0; \
322for F in $1; do \
a670b0b4 323 fsize=$$($(CONFIG_SHELL) $(srctree)/scripts/file-size.sh $$F); \
d3dd3b5a
PA
324 dec_size=$$(expr $$dec_size + $$fsize); \
325done; \
1373411a
JN
326printf "%08x\n" $$dec_size | \
327 sed 's/\(..\)/\1 /g' | { \
328 read ch0 ch1 ch2 ch3; \
329 for ch in $$ch3 $$ch2 $$ch1 $$ch0; do \
330 printf '%s%03o' '\\' $$((0x$$ch)); \
331 done; \
332 } \
d3dd3b5a
PA
333)
334
335quiet_cmd_bzip2 = BZIP2 $@
336cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
337 bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
338 (rm -f $@ ; false)
bc22c17e
AK
339
340# Lzma
341# ---------------------------------------------------------------------------
342
343quiet_cmd_lzma = LZMA $@
d3dd3b5a
PA
344cmd_lzma = (cat $(filter-out FORCE,$^) | \
345 lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
346 (rm -f $@ ; false)
7dd65feb 347
2d74b2c6 348quiet_cmd_lzo = LZO $@
7dd65feb
AT
349cmd_lzo = (cat $(filter-out FORCE,$^) | \
350 lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
351 (rm -f $@ ; false)
d61931d8 352
e76e1fdf
KL
353quiet_cmd_lz4 = LZ4 $@
354cmd_lz4 = (cat $(filter-out FORCE,$^) | \
355 lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
356 (rm -f $@ ; false)
357
e3393645
SW
358# U-Boot mkimage
359# ---------------------------------------------------------------------------
360
361MKIMAGE := $(srctree)/scripts/mkuboot.sh
362
363# SRCARCH just happens to match slightly more than ARCH (on sparc), so reduces
364# the number of overrides in arch makefiles
365UIMAGE_ARCH ?= $(SRCARCH)
366UIMAGE_COMPRESSION ?= $(if $(2),$(2),none)
367UIMAGE_OPTS-y ?=
368UIMAGE_TYPE ?= kernel
369UIMAGE_LOADADDR ?= arch_must_set_this
370UIMAGE_ENTRYADDR ?= $(UIMAGE_LOADADDR)
371UIMAGE_NAME ?= 'Linux-$(KERNELRELEASE)'
372UIMAGE_IN ?= $<
373UIMAGE_OUT ?= $@
374
375quiet_cmd_uimage = UIMAGE $(UIMAGE_OUT)
376 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(UIMAGE_ARCH) -O linux \
377 -C $(UIMAGE_COMPRESSION) $(UIMAGE_OPTS-y) \
378 -T $(UIMAGE_TYPE) \
379 -a $(UIMAGE_LOADADDR) -e $(UIMAGE_ENTRYADDR) \
380 -n $(UIMAGE_NAME) -d $(UIMAGE_IN) $(UIMAGE_OUT)
381
24fa0402
LC
382# XZ
383# ---------------------------------------------------------------------------
384# Use xzkern to compress the kernel image and xzmisc to compress other things.
385#
386# xzkern uses a big LZMA2 dictionary since it doesn't increase memory usage
387# of the kernel decompressor. A BCJ filter is used if it is available for
388# the target architecture. xzkern also appends uncompressed size of the data
389# using size_append. The .xz format has the size information available at
390# the end of the file too, but it's in more complex format and it's good to
391# avoid changing the part of the boot code that reads the uncompressed size.
392# Note that the bytes added by size_append will make the xz tool think that
393# the file is corrupt. This is expected.
394#
395# xzmisc doesn't use size_append, so it can be used to create normal .xz
396# files. xzmisc uses smaller LZMA2 dictionary than xzkern, because a very
397# big dictionary would increase the memory usage too much in the multi-call
398# decompression mode. A BCJ filter isn't used either.
399quiet_cmd_xzkern = XZKERN $@
400cmd_xzkern = (cat $(filter-out FORCE,$^) | \
401 sh $(srctree)/scripts/xz_wrap.sh && \
402 $(call size_append, $(filter-out FORCE,$^))) > $@ || \
403 (rm -f $@ ; false)
404
405quiet_cmd_xzmisc = XZMISC $@
406cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
407 xz --check=crc32 --lzma2=dict=1MiB) > $@ || \
408 (rm -f $@ ; false)
ebf003f0
MK
409
410# ASM offsets
411# ---------------------------------------------------------------------------
412
413# Default sed regexp - multiline due to syntax constraints
cf0c3e68
JH
414#
415# Use [:space:] because LLVM's integrated assembler inserts <tab> around
416# the .ascii directive whereas GCC keeps the <space> as-is.
ebf003f0 417define sed-offsets
cf0c3e68
JH
418 's:^[[:space:]]*\.ascii[[:space:]]*"\(.*\)".*:\1:; \
419 /^->/{s:->#\(.*\):/* \1 */:; \
ebf003f0 420 s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
cf0c3e68 421 s:->::; p;}'
ebf003f0
MK
422endef
423
424# Use filechk to avoid rebuilds when a header changes, but the resulting file
425# does not
426define filechk_offsets
427 (set -e; \
428 echo "#ifndef $2"; \
429 echo "#define $2"; \
430 echo "/*"; \
431 echo " * DO NOT MODIFY."; \
432 echo " *"; \
433 echo " * This file was generated by Kbuild"; \
434 echo " */"; \
435 echo ""; \
436 sed -ne $(sed-offsets); \
437 echo ""; \
438 echo "#endif" )
439endef