1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
4 include $(RTE_SDK)/mk/internal/rte.compile-pre.mk
5 include $(RTE_SDK)/mk/internal/rte.install-pre.mk
6 include $(RTE_SDK)/mk/internal/rte.clean-pre.mk
7 include $(RTE_SDK)/mk/internal/rte.build-pre.mk
9 # VPATH contains at least SRCDIR
17 _INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y)
24 install: build _postinstall
32 exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
34 O_TO_O = $(LD) -r -o $(OBJ) $(OBJS-y)
35 O_TO_O_STR = $(subst ','\'',$(O_TO_O)) #'# fix syntax highlight
36 O_TO_O_DISP = $(if $(V),"$(O_TO_O_STR)"," LD $(@)")
37 O_TO_O_CMD = "cmd_$@ = $(O_TO_O_STR)"
38 O_TO_O_DO = @set -e; \
39 echo $(O_TO_O_DISP); \
41 echo $(O_TO_O_CMD) > $(call exe2cmd,$(@))
46 # Archive objects in .a file if needed
48 $(OBJ): $(OBJS-y) FORCE
49 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
51 @echo -n "$< -> $@ " ; \
52 echo -n "file_missing=$(call boolean,$(file_missing)) " ; \
53 echo -n "cmdline_changed=$(call boolean,$(call cmdline_changed,$(O_TO_O_STR))) " ; \
54 echo -n "depfile_missing=$(call boolean,$(depfile_missing)) " ; \
55 echo "depfile_newer=$(call boolean,$(depfile_newer)) ")
58 $(call cmdline_changed,$(O_TO_O_STR)),\
65 # Clean all generated files
72 @rm -rf $(OBJ) $(OBJS-all) $(DEPS-all) $(DEPSTMP-all) \
73 $(CMDS-all) $(INSTALL-FILES-all)
74 @rm -f $(_BUILD_TARGETS) $(_INSTALL_TARGETS) $(_CLEAN_TARGETS)
76 include $(RTE_SDK)/mk/internal/rte.compile-post.mk
77 include $(RTE_SDK)/mk/internal/rte.install-post.mk
78 include $(RTE_SDK)/mk/internal/rte.clean-post.mk
79 include $(RTE_SDK)/mk/internal/rte.build-post.mk