equal
deleted
inserted
replaced
26 default: all |
26 default: all |
27 |
27 |
28 include $(SPEC) |
28 include $(SPEC) |
29 include MakeBase.gmk |
29 include MakeBase.gmk |
30 |
30 |
|
31 # Hook to include the corresponding custom file, if present. |
|
32 $(eval $(call IncludeCustomExtension, , StripBinaries.gmk)) |
|
33 |
31 ################################################################################ |
34 ################################################################################ |
32 # Copy native libraries and executables to a secondary location to strip them |
35 # Copy native libraries and executables to a secondary location to strip them |
33 # and filter out files that shouldn't go into the image. |
36 # and filter out files that shouldn't go into the image. |
34 |
37 |
35 MODULES_CMDS_STRIPPED := $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped |
38 MODULES_CMDS_STRIPPED := $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped |
49 define StripRecipe |
52 define StripRecipe |
50 $(call install-file) |
53 $(call install-file) |
51 endef |
54 endef |
52 endif |
55 endif |
53 |
56 |
|
57 NO_STRIP_CMDS_FILTER += %.cgi |
|
58 |
54 # Don't include debug info for executables. |
59 # Don't include debug info for executables. |
55 ALL_CMDS_SRC := $(filter-out %.bc %.debuginfo %.diz %.map %.pdb, \ |
60 ALL_CMDS_SRC := $(filter-out %.bc %.debuginfo %.diz %.map %.pdb, \ |
56 $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_cmds -type f -o -type l)) |
61 $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_cmds -type f -o -type l)) |
57 COPY_CMDS_SRC := $(filter %.cgi, $(ALL_CMDS_SRC)) |
62 COPY_CMDS_SRC := $(filter $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC)) |
58 STRIP_CMDS_SRC := $(filter-out $(COPY_CMDS_SRC), $(ALL_CMDS_SRC)) |
63 STRIP_CMDS_SRC := $(filter-out $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC)) |
59 |
64 |
60 # Make sure symbolic links are copied and not stripped |
65 # Make sure symbolic links are copied and not stripped |
61 COPY_LIBS_SRC := \ |
66 COPY_LIBS_SRC := \ |
62 $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs \ |
67 $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs \ |
63 \( ! -name '*$(SHARED_LIBRARY_SUFFIX)' -type f \) -o -type l) |
68 \( ! -name '*$(SHARED_LIBRARY_SUFFIX)' -type f \) -o -type l) |