1 include ..
/..
/scripts
/Makefile.
include
2 include ..
/..
/scripts
/utilities.mak
# QUIET_CLEAN
5 srctree
:= $(patsubst %/,%,$(dir $(CURDIR
)))
6 srctree
:= $(patsubst %/,%,$(dir $(srctree
)))
7 srctree
:= $(patsubst %/,%,$(dir $(srctree
)))
8 #$(info Determined 'srctree' to be $(srctree))
11 CC ?
= $(CROSS_COMPILE
)gcc
12 AR ?
= $(CROSS_COMPILE
)ar
13 LD ?
= $(CROSS_COMPILE
)ld
15 MAKEFLAGS
+= --no-print-directory
17 LIBFILE
= $(OUTPUT
)libapi.a
19 CFLAGS
:= $(EXTRA_WARNINGS
) $(EXTRA_CFLAGS
)
20 CFLAGS
+= -ggdb3
-Wall
-Wextra
-std
=gnu99
-U_FORTIFY_SOURCE
-fPIC
23 ifeq ($(CC_NO_CLANG
), 0)
31 CFLAGS
+= -D_FORTIFY_SOURCE
34 # Treat warnings as errors unless directed not to
39 CFLAGS
+= -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS
=64
40 CFLAGS
+= -I
$(srctree
)/tools
/lib
/api
41 CFLAGS
+= -I
$(srctree
)/tools
/include
45 API_IN
:= $(OUTPUT
)libapi-in.o
49 export srctree OUTPUT CC LD CFLAGS V
50 include $(srctree
)/tools
/build
/Makefile.
include
52 all: fixdep
$(LIBFILE
)
55 @
$(MAKE
) $(build
)=libapi
58 $(QUIET_AR
)$(RM
) $@
&& $(AR
) rcs
$@
$(API_IN
)
61 $(call QUIET_CLEAN
, libapi
) $(RM
) $(LIBFILE
); \
62 find
$(if
$(OUTPUT
),$(OUTPUT
),.
) -name \
*.o
-or
-name \
*.o.cmd
-or
-name \
*.o.d | xargs
$(RM
)