23 # questions. 24 # 25 26 default: all 27 28 include $(SPEC) 29 include MakeBase.gmk 30 31 # Hook to include the corresponding custom file, if present. 32 $(eval $(call IncludeCustomExtension, , StripBinaries.gmk)) 33 34 ################################################################################ 35 # Copy native libraries and executables to a secondary location to strip them 36 # and filter out files that shouldn't go into the image. 37 38 MODULES_CMDS_STRIPPED := $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped 39 MODULES_LIBS_STRIPPED := $(SUPPORT_OUTPUTDIR)/modules_libs-stripped 40 41 ifneq ($(STRIP), ) 42 define StripRecipe 43 $(ECHO) Stripping $(LOG_INFO) $(patsubst $(OUTPUT_ROOT)/%,%,$<) 44 $(MKDIR) -p $(@D) 45 $(CP) $< $@.tmp 46 $(CHMOD) u+w $@.tmp 47 $(STRIP) $(STRIPFLAGS) $@.tmp 48 $(CHMOD) go-w $@.tmp 49 $(MV) $@.tmp $@ 50 endef 51 else 52 define StripRecipe 53 $(call install-file) 54 endef 55 endif 56 57 NO_STRIP_CMDS_FILTER += %.cgi 58 59 # Don't include debug info for executables. 60 ALL_CMDS_SRC := $(filter-out %.bc %.debuginfo %.diz %.map %.pdb, \ 61 $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_cmds -type f -o -type l)) 62 COPY_CMDS_SRC := $(filter $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC)) 63 STRIP_CMDS_SRC := $(filter-out $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC)) 64 | 23 # questions. 24 # 25 26 default: all 27 28 include $(SPEC) 29 include MakeBase.gmk 30 31 # Hook to include the corresponding custom file, if present. 32 $(eval $(call IncludeCustomExtension, , StripBinaries.gmk)) 33 34 ################################################################################ 35 # Copy native libraries and executables to a secondary location to strip them 36 # and filter out files that shouldn't go into the image. 37 38 MODULES_CMDS_STRIPPED := $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped 39 MODULES_LIBS_STRIPPED := $(SUPPORT_OUTPUTDIR)/modules_libs-stripped 40 41 ifneq ($(STRIP), ) 42 define StripRecipe 43 $(call LogInfo, Stripping $(patsubst $(OUTPUT_ROOT)/%,%,$<)) 44 $(call MakeDir, $(@D)) 45 $(CP) $< $@.tmp 46 $(CHMOD) u+w $@.tmp 47 $(STRIP) $(STRIPFLAGS) $@.tmp 48 $(CHMOD) go-w $@.tmp 49 $(MV) $@.tmp $@ 50 endef 51 else 52 define StripRecipe 53 $(call install-file) 54 endef 55 endif 56 57 NO_STRIP_CMDS_FILTER += %.cgi 58 59 # Don't include debug info for executables. 60 ALL_CMDS_SRC := $(filter-out %.bc %.debuginfo %.diz %.map %.pdb, \ 61 $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_cmds -type f -o -type l)) 62 COPY_CMDS_SRC := $(filter $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC)) 63 STRIP_CMDS_SRC := $(filter-out $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC)) 64 |