[ar7] refresh patches and remove trailing whitespaces
[openwrt.git] / package / uboot-lantiq / patches / 000-build-infos.patch
1 Add output like in linux kernel for current compiled file
2 Used normaly in combination with make option -s
3
4 Like in following example:
5
6 $ make -s V=1
7 [CC] tools/img2srec.c
8 [CC] tools/bmp_logo.c
9 [CC] examples/hello_world.c
10
11 --- a/config.mk
12 +++ b/config.mk
13 @@ -234,17 +234,42 @@ export TEXT_BASE PLATFORM_CPPFLAGS PLATF
14
15 #########################################################################
16
17 +ifndef KBUILD_VERBOSE
18 + KBUILD_VERBOSE:=0
19 +endif
20 +ifeq ("$(origin V)", "command line")
21 + KBUILD_VERBOSE:=$(V)
22 +endif
23 +ifeq (,$(findstring s,$(MAKEFLAGS)))
24 + KBUILD_VERBOSE:=0
25 +endif
26 +
27 +ifneq ($(KBUILD_VERBOSE),0)
28 + define MESSAGE
29 + @printf " %s %s/%s\n" $(1) $(2) $(3)
30 + endef
31 +else
32 + define MESSAGE
33 + endef
34 +endif
35 +
36 # Allow boards to use custom optimize flags on a per dir/file basis
37 BCURDIR := $(notdir $(CURDIR))
38 +
39 $(obj)%.s: %.S
40 + $(call MESSAGE, [CPP],$(subst $(SRCTREE)/,,$(CURDIR)),$<)
41 $(CPP) $(AFLAGS) $(AFLAGS_$(@F)) $(AFLAGS_$(BCURDIR)) -o $@ $<
42 $(obj)%.o: %.S
43 + $(call MESSAGE, [AS], $(subst $(SRCTREE)/,,$(CURDIR)),$<)
44 $(CC) $(AFLAGS) $(AFLAGS_$(@F)) $(AFLAGS_$(BCURDIR)) -o $@ $< -c
45 $(obj)%.o: %.c
46 + $(call MESSAGE, [CC], $(subst $(SRCTREE)/,,$(CURDIR)),$<)
47 $(CC) $(CFLAGS) $(CFLAGS_$(@F)) $(CFLAGS_$(BCURDIR)) -o $@ $< -c
48 $(obj)%.i: %.c
49 + $(call MESSAGE, [CPP],$(subst $(SRCTREE)/,,$(CURDIR)),$<)
50 $(CPP) $(CFLAGS) $(CFLAGS_$(@F)) $(CFLAGS_$(BCURDIR)) -o $@ $< -c
51 $(obj)%.s: %.c
52 + $(call MESSAGE, [CC], $(subst $(SRCTREE)/,,$(CURDIR)),$<)
53 $(CC) $(CFLAGS) $(CFLAGS_$(@F)) $(CFLAGS_$(BCURDIR)) -o $@ $< -c -S
54
55 #########################################################################
This page took 0.046504 seconds and 5 git commands to generate.