~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/bpf/resolve_btfids/Makefile

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/bpf/resolve_btfids/Makefile (Version linux-6.12-rc7) and /tools/bpf/resolve_btfids/Makefile (Version linux-5.18.19)


  1 # SPDX-License-Identifier: GPL-2.0-only             1 # SPDX-License-Identifier: GPL-2.0-only
  2 include ../../scripts/Makefile.include              2 include ../../scripts/Makefile.include
  3 include ../../scripts/Makefile.arch                 3 include ../../scripts/Makefile.arch
  4                                                     4 
  5 srctree := $(abspath $(CURDIR)/../../../)           5 srctree := $(abspath $(CURDIR)/../../../)
  6                                                     6 
  7 ifeq ($(V),1)                                       7 ifeq ($(V),1)
  8   Q =                                               8   Q =
  9   msg =                                             9   msg =
 10 else                                               10 else
 11   Q = @                                            11   Q = @
 12   ifeq ($(silent),1)                               12   ifeq ($(silent),1)
 13     msg =                                          13     msg =
 14   else                                             14   else
 15     msg = @printf '  %-8s %s%s\n' "$(1)" "$(no     15     msg = @printf '  %-8s %s%s\n' "$(1)" "$(notdir $(2))" "$(if $(3), $(3))";
 16   endif                                            16   endif
 17   MAKEFLAGS=--no-print-directory                   17   MAKEFLAGS=--no-print-directory
 18 endif                                              18 endif
 19                                                    19 
 20 # Overrides for the prepare step libraries.    !!  20 # always use the host compiler
 21 HOST_OVERRIDES := AR="$(HOSTAR)" CC="$(HOSTCC) !!  21 AR       = $(HOSTAR)
 22                   CROSS_COMPILE="" EXTRA_CFLAG !!  22 CC       = $(HOSTCC)
 23                                                !!  23 LD       = $(HOSTLD)
                                                   >>  24 ARCH     = $(HOSTARCH)
 24 RM      ?= rm                                      25 RM      ?= rm
 25 HOSTCC  ?= gcc                                 << 
 26 HOSTLD  ?= ld                                  << 
 27 HOSTAR  ?= ar                                  << 
 28 CROSS_COMPILE =                                    26 CROSS_COMPILE =
                                                   >>  27 CFLAGS  := $(KBUILD_HOSTCFLAGS)
                                                   >>  28 LDFLAGS := $(KBUILD_HOSTLDFLAGS)
 29                                                    29 
 30 OUTPUT ?= $(srctree)/tools/bpf/resolve_btfids/     30 OUTPUT ?= $(srctree)/tools/bpf/resolve_btfids/
 31                                                    31 
 32 LIBBPF_SRC := $(srctree)/tools/lib/bpf/            32 LIBBPF_SRC := $(srctree)/tools/lib/bpf/
 33 SUBCMD_SRC := $(srctree)/tools/lib/subcmd/         33 SUBCMD_SRC := $(srctree)/tools/lib/subcmd/
 34                                                    34 
 35 BPFOBJ     := $(OUTPUT)/libbpf/libbpf.a            35 BPFOBJ     := $(OUTPUT)/libbpf/libbpf.a
 36 LIBBPF_OUT := $(abspath $(dir $(BPFOBJ)))/         36 LIBBPF_OUT := $(abspath $(dir $(BPFOBJ)))/
 37 SUBCMDOBJ  := $(OUTPUT)/libsubcmd/libsubcmd.a      37 SUBCMDOBJ  := $(OUTPUT)/libsubcmd/libsubcmd.a
 38 SUBCMD_OUT := $(abspath $(dir $(SUBCMDOBJ)))/  << 
 39                                                    38 
 40 LIBBPF_DESTDIR := $(LIBBPF_OUT)                    39 LIBBPF_DESTDIR := $(LIBBPF_OUT)
 41 LIBBPF_INCLUDE := $(LIBBPF_DESTDIR)include         40 LIBBPF_INCLUDE := $(LIBBPF_DESTDIR)include
 42                                                    41 
 43 SUBCMD_DESTDIR := $(SUBCMD_OUT)                << 
 44 SUBCMD_INCLUDE := $(SUBCMD_DESTDIR)include     << 
 45                                                << 
 46 BINARY     := $(OUTPUT)/resolve_btfids             42 BINARY     := $(OUTPUT)/resolve_btfids
 47 BINARY_IN  := $(BINARY)-in.o                       43 BINARY_IN  := $(BINARY)-in.o
 48                                                    44 
 49 all: $(BINARY)                                     45 all: $(BINARY)
 50                                                    46 
 51 prepare: $(BPFOBJ) $(SUBCMDOBJ)                << 
 52                                                << 
 53 $(OUTPUT) $(OUTPUT)/libsubcmd $(LIBBPF_OUT):       47 $(OUTPUT) $(OUTPUT)/libsubcmd $(LIBBPF_OUT):
 54         $(call msg,MKDIR,,$@)                      48         $(call msg,MKDIR,,$@)
 55         $(Q)mkdir -p $(@)                          49         $(Q)mkdir -p $(@)
 56                                                    50 
 57 $(SUBCMDOBJ): fixdep FORCE | $(OUTPUT)/libsubc     51 $(SUBCMDOBJ): fixdep FORCE | $(OUTPUT)/libsubcmd
 58         $(Q)$(MAKE) -C $(SUBCMD_SRC) OUTPUT=$( !!  52         $(Q)$(MAKE) -C $(SUBCMD_SRC) OUTPUT=$(abspath $(dir $@))/ $(abspath $@)
 59                     DESTDIR=$(SUBCMD_DESTDIR)  << 
 60                     $(abspath $@) install_head << 
 61                                                    53 
 62 $(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(L     54 $(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(LIBBPF_OUT)
 63         $(Q)$(MAKE) $(submake_extras) -C $(LIB     55         $(Q)$(MAKE) $(submake_extras) -C $(LIBBPF_SRC) OUTPUT=$(LIBBPF_OUT)    \
 64                     DESTDIR=$(LIBBPF_DESTDIR)  !!  56                     DESTDIR=$(LIBBPF_DESTDIR) prefix= EXTRA_CFLAGS="$(CFLAGS)" \
 65                     $(abspath $@) install_head     57                     $(abspath $@) install_headers
 66                                                    58 
 67 LIBELF_FLAGS := $(shell $(HOSTPKG_CONFIG) libe !!  59 CFLAGS += -g \
 68 LIBELF_LIBS  := $(shell $(HOSTPKG_CONFIG) libe << 
 69                                                << 
 70 HOSTCFLAGS_resolve_btfids += -g \              << 
 71           -I$(srctree)/tools/include \             60           -I$(srctree)/tools/include \
 72           -I$(srctree)/tools/include/uapi \        61           -I$(srctree)/tools/include/uapi \
 73           -I$(LIBBPF_INCLUDE) \                    62           -I$(LIBBPF_INCLUDE) \
 74           -I$(SUBCMD_INCLUDE) \                !!  63           -I$(SUBCMD_SRC)
 75           $(LIBELF_FLAGS)                      << 
 76                                                    64 
 77 LIBS = $(LIBELF_LIBS) -lz                      !!  65 LIBS = -lelf -lz
 78                                                    66 
 79 export srctree OUTPUT HOSTCFLAGS_resolve_btfid !!  67 export srctree OUTPUT CFLAGS Q
 80 include $(srctree)/tools/build/Makefile.includ     68 include $(srctree)/tools/build/Makefile.include
 81                                                    69 
 82 $(BINARY_IN): fixdep FORCE prepare | $(OUTPUT) !!  70 $(BINARY_IN): $(BPFOBJ) fixdep FORCE | $(OUTPUT)
 83         $(Q)$(MAKE) $(build)=resolve_btfids        71         $(Q)$(MAKE) $(build)=resolve_btfids
 84                                                    72 
 85 $(BINARY): $(BPFOBJ) $(SUBCMDOBJ) $(BINARY_IN)     73 $(BINARY): $(BPFOBJ) $(SUBCMDOBJ) $(BINARY_IN)
 86         $(call msg,LINK,$@)                        74         $(call msg,LINK,$@)
 87         $(Q)$(HOSTCC) $(BINARY_IN) $(KBUILD_HO !!  75         $(Q)$(CC) $(BINARY_IN) $(LDFLAGS) -o $@ $(BPFOBJ) $(SUBCMDOBJ) $(LIBS)
 88                                                    76 
 89 clean_objects := $(wildcard $(OUTPUT)/*.o          77 clean_objects := $(wildcard $(OUTPUT)/*.o                \
 90                             $(OUTPUT)/.*.o.cmd     78                             $(OUTPUT)/.*.o.cmd           \
 91                             $(OUTPUT)/.*.o.d       79                             $(OUTPUT)/.*.o.d             \
 92                             $(LIBBPF_OUT)          80                             $(LIBBPF_OUT)                \
 93                             $(LIBBPF_DESTDIR)      81                             $(LIBBPF_DESTDIR)            \
 94                             $(SUBCMD_OUT)      !!  82                             $(OUTPUT)/libsubcmd          \
 95                             $(SUBCMD_DESTDIR)  << 
 96                             $(OUTPUT)/resolve_     83                             $(OUTPUT)/resolve_btfids)
 97                                                    84 
 98 ifneq ($(clean_objects),)                          85 ifneq ($(clean_objects),)
 99 clean: fixdep-clean                                86 clean: fixdep-clean
100         $(call msg,CLEAN,$(BINARY))                87         $(call msg,CLEAN,$(BINARY))
101         $(Q)$(RM) -rf $(clean_objects)             88         $(Q)$(RM) -rf $(clean_objects)
102 else                                               89 else
103 clean:                                             90 clean:
104 endif                                              91 endif
105                                                    92 
106 tags:                                              93 tags:
107         $(call msg,GEN,,tags)                      94         $(call msg,GEN,,tags)
108         $(Q)ctags -R . $(LIBBPF_SRC) $(SUBCMD_     95         $(Q)ctags -R . $(LIBBPF_SRC) $(SUBCMD_SRC)
109                                                    96 
110 FORCE:                                             97 FORCE:
111                                                    98 
112 .PHONY: all FORCE clean tags prepare           !!  99 .PHONY: all FORCE clean tags
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php