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

TOMOYO Linux Cross Reference
Linux/tools/lib/api/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/lib/api/Makefile (Version linux-6.12-rc7) and /tools/lib/api/Makefile (Version linux-4.15.18)


  1 # SPDX-License-Identifier: GPL-2.0                  1 # SPDX-License-Identifier: GPL-2.0
  2 include ../../scripts/Makefile.include              2 include ../../scripts/Makefile.include
  3 include ../../scripts/utilities.mak                 3 include ../../scripts/utilities.mak             # QUIET_CLEAN
  4                                                     4 
  5 ifeq ($(srctree),)                                  5 ifeq ($(srctree),)
  6 srctree := $(patsubst %/,%,$(dir $(CURDIR)))        6 srctree := $(patsubst %/,%,$(dir $(CURDIR)))
  7 srctree := $(patsubst %/,%,$(dir $(srctree)))       7 srctree := $(patsubst %/,%,$(dir $(srctree)))
  8 srctree := $(patsubst %/,%,$(dir $(srctree)))       8 srctree := $(patsubst %/,%,$(dir $(srctree)))
  9 #$(info Determined 'srctree' to be $(srctree))      9 #$(info Determined 'srctree' to be $(srctree))
 10 endif                                              10 endif
 11                                                    11 
 12 CC ?= $(CROSS_COMPILE)gcc                          12 CC ?= $(CROSS_COMPILE)gcc
 13 AR ?= $(CROSS_COMPILE)ar                           13 AR ?= $(CROSS_COMPILE)ar
 14 LD ?= $(CROSS_COMPILE)ld                           14 LD ?= $(CROSS_COMPILE)ld
 15                                                    15 
 16 MAKEFLAGS += --no-print-directory                  16 MAKEFLAGS += --no-print-directory
 17                                                    17 
 18 INSTALL = install                              << 
 19                                                << 
 20                                                << 
 21 # Use DESTDIR for installing into a different  << 
 22 # This is useful for building a package. The p << 
 23 # installed in this directory as if it was the << 
 24 # Then the build tool can move it later.       << 
 25 DESTDIR ?=                                     << 
 26 DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))'      << 
 27                                                << 
 28 LIBFILE = $(OUTPUT)libapi.a                        18 LIBFILE = $(OUTPUT)libapi.a
 29                                                    19 
 30 CFLAGS := $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)        20 CFLAGS := $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
 31 CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -U_F     21 CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -U_FORTIFY_SOURCE -fPIC
 32                                                    22 
 33 ifeq ($(DEBUG),0)                                  23 ifeq ($(DEBUG),0)
                                                   >>  24 ifeq ($(CC_NO_CLANG), 0)
 34   CFLAGS += -O3                                    25   CFLAGS += -O3
                                                   >>  26 else
                                                   >>  27   CFLAGS += -O6
                                                   >>  28 endif
 35 endif                                              29 endif
 36                                                    30 
 37 ifeq ($(DEBUG),0)                                  31 ifeq ($(DEBUG),0)
 38   CFLAGS += -D_FORTIFY_SOURCE                      32   CFLAGS += -D_FORTIFY_SOURCE
 39 endif                                              33 endif
 40                                                    34 
 41 # Treat warnings as errors unless directed not     35 # Treat warnings as errors unless directed not to
 42 ifneq ($(WERROR),0)                                36 ifneq ($(WERROR),0)
 43   CFLAGS += -Werror                                37   CFLAGS += -Werror
 44 endif                                              38 endif
 45                                                    39 
 46 CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET     40 CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 47 CFLAGS += -I$(srctree)/tools/lib/api               41 CFLAGS += -I$(srctree)/tools/lib/api
 48 CFLAGS += -I$(srctree)/tools/include               42 CFLAGS += -I$(srctree)/tools/include
 49                                                    43 
 50 RM = rm -f                                         44 RM = rm -f
 51                                                    45 
 52 API_IN := $(OUTPUT)libapi-in.o                     46 API_IN := $(OUTPUT)libapi-in.o
 53                                                    47 
 54 ifeq ($(LP64), 1)                              << 
 55   libdir_relative = lib64                      << 
 56 else                                           << 
 57   libdir_relative = lib                        << 
 58 endif                                          << 
 59                                                << 
 60 prefix ?=                                      << 
 61 libdir = $(prefix)/$(libdir_relative)          << 
 62                                                << 
 63 # Shell quotes                                 << 
 64 libdir_SQ = $(subst ','\'',$(libdir))          << 
 65                                                << 
 66 all:                                               48 all:
 67                                                    49 
 68 export srctree OUTPUT CC LD CFLAGS V               50 export srctree OUTPUT CC LD CFLAGS V
 69 include $(srctree)/tools/build/Makefile.includ     51 include $(srctree)/tools/build/Makefile.include
 70 include $(srctree)/tools/scripts/Makefile.incl << 
 71                                                    52 
 72 all: fixdep $(LIBFILE)                             53 all: fixdep $(LIBFILE)
 73                                                    54 
 74 $(API_IN): FORCE                                   55 $(API_IN): FORCE
 75         @$(MAKE) $(build)=libapi                   56         @$(MAKE) $(build)=libapi
 76                                                    57 
 77 $(LIBFILE): $(API_IN)                              58 $(LIBFILE): $(API_IN)
 78         $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(     59         $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(API_IN)
 79                                                    60 
 80 define do_install_mkdir                        << 
 81         if [ ! -d '$(DESTDIR_SQ)$1' ]; then    << 
 82                 $(INSTALL) -d -m 755 '$(DESTDI << 
 83         fi                                     << 
 84 endef                                          << 
 85                                                << 
 86 define do_install                              << 
 87         if [ ! -d '$2' ]; then             \   << 
 88                 $(INSTALL) -d -m 755 '$2'; \   << 
 89         fi;                                \   << 
 90         $(INSTALL) $1 $(if $3,-m $3,) '$2'     << 
 91 endef                                          << 
 92                                                << 
 93 install_lib: $(LIBFILE)                        << 
 94         $(call QUIET_INSTALL, $(LIBFILE)) \    << 
 95                 $(call do_install_mkdir,$(libd << 
 96                 cp -fpR $(LIBFILE) $(DESTDIR)$ << 
 97                                                << 
 98 HDRS := cpu.h debug.h io.h                     << 
 99 FD_HDRS := fd/array.h                          << 
100 FS_HDRS := fs/fs.h fs/tracing_path.h           << 
101 INSTALL_HDRS_PFX := $(DESTDIR)$(prefix)/includ << 
102 INSTALL_HDRS := $(addprefix $(INSTALL_HDRS_PFX << 
103 INSTALL_FD_HDRS := $(addprefix $(INSTALL_HDRS_ << 
104 INSTALL_FS_HDRS := $(addprefix $(INSTALL_HDRS_ << 
105                                                << 
106 $(INSTALL_HDRS): $(INSTALL_HDRS_PFX)/%.h: %.h  << 
107         $(call QUIET_INSTALL, $@) \            << 
108                 $(call do_install,$<,$(INSTALL << 
109                                                << 
110 $(INSTALL_FD_HDRS): $(INSTALL_HDRS_PFX)/fd/%.h << 
111         $(call QUIET_INSTALL, $@) \            << 
112                 $(call do_install,$<,$(INSTALL << 
113                                                << 
114 $(INSTALL_FS_HDRS): $(INSTALL_HDRS_PFX)/fs/%.h << 
115         $(call QUIET_INSTALL, $@) \            << 
116                 $(call do_install,$<,$(INSTALL << 
117                                                << 
118 install_headers: $(INSTALL_HDRS) $(INSTALL_FD_ << 
119         $(call QUIET_INSTALL, libapi_headers)  << 
120                                                << 
121 install: install_lib install_headers           << 
122                                                << 
123 clean:                                             61 clean:
124         $(call QUIET_CLEAN, libapi) $(RM) $(LI     62         $(call QUIET_CLEAN, libapi) $(RM) $(LIBFILE); \
125         find $(or $(OUTPUT),.) -name \*.o -or  !!  63         find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o -or -name \*.o.cmd -or -name \*.o.d | xargs $(RM)
126                                                    64 
127 FORCE:                                             65 FORCE:
128                                                    66 
129 .PHONY: clean FORCE                                67 .PHONY: clean FORCE
                                                      

~ [ 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