1 include ..
/..
/scripts
/Makefile.
include
2 include ..
/..
/scripts
/utilities.mak
# QUIET_CLEAN
5 srctree
:= $(patsubst %/,%,$(dir $(shell pwd
)))
6 srctree
:= $(patsubst %/,%,$(dir $(srctree
)))
7 srctree
:= $(patsubst %/,%,$(dir $(srctree
)))
8 #$(info Determined 'srctree' to be $(srctree))
11 CC ?
= $(CROSS_COMPILE
)gcc
12 LD ?
= $(CROSS_COMPILE
)ld
13 AR ?
= $(CROSS_COMPILE
)ar
17 MAKEFLAGS
+= --no-print-directory
19 LIBFILE
= $(OUTPUT
)libsubcmd.a
21 CFLAGS
:= $(EXTRA_WARNINGS
) $(EXTRA_CFLAGS
)
22 CFLAGS
+= -ggdb3
-Wall
-Wextra
-std
=gnu99
-Werror
-O6
-U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE
=2 -fPIC
23 CFLAGS
+= -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS
=64 -D_GNU_SOURCE
25 CFLAGS
+= -I
$(srctree
)/tools
/include/
26 CFLAGS
+= -I
$(srctree
)/include/uapi
27 CFLAGS
+= -I
$(srctree
)/include
29 SUBCMD_IN
:= $(OUTPUT
)libsubcmd-in.o
33 export srctree OUTPUT CC LD CFLAGS V
34 include $(srctree
)/tools
/build
/Makefile.
include
36 all: fixdep
$(LIBFILE
)
39 @
$(MAKE
) $(build
)=libsubcmd
41 $(LIBFILE
): $(SUBCMD_IN
)
42 $(QUIET_AR
)$(RM
) $@
&& $(AR
) rcs
$@
$(SUBCMD_IN
)
45 $(call QUIET_CLEAN
, libsubcmd
) $(RM
) $(LIBFILE
); \
46 find
$(if
$(OUTPUT
),$(OUTPUT
),.
) -name \
*.o
-or
-name \
*.o.cmd
-or
-name \
*.o.d | xargs
$(RM
)