Lines Matching +full:files +full:- +full:based

1 # SPDX-License-Identifier: GPL-2.0
9 # tprogs-y := xsk_example
12 # tprogs-y := xdpsock
13 # xdpsock-objs := xdpsock_1.o xdpsock_2.o
15 # xdpsock, based on xdpsock_1.o and xdpsock_2.o
19 __tprogs := $(sort $(tprogs-y))
23 tprog-csingle := $(foreach m,$(__tprogs), \
24 $(if $($(m)-objs),,$(m)))
26 # C executables linked based on several .o files
27 tprog-cmulti := $(foreach m,$(__tprogs),\
28 $(if $($(m)-objs),$(m)))
30 # Object (.o) files compiled from .c files
31 tprog-cobjs := $(sort $(foreach m,$(__tprogs),$($(m)-objs)))
33 tprog-csingle := $(addprefix $(obj)/,$(tprog-csingle))
34 tprog-cmulti := $(addprefix $(obj)/,$(tprog-cmulti))
35 tprog-cobjs := $(addprefix $(obj)/,$(tprog-cobjs))
43 # $(objtree)/$(obj) for including generated headers from checkin source files
46 _tprogc_flags += -I $(objtree)/$(obj)
50 tprogc_flags = -Wp,-MD,$(depfile) $(_tprogc_flags)
53 # tprog-csingle -> Executable
54 quiet_cmd_tprog-csingle = CC $@
55 cmd_tprog-csingle = $(CC) $(tprogc_flags) $(TPROGS_LDFLAGS) -o $@ $< \
57 $(tprog-csingle): $(obj)/%: $(src)/%.c FORCE
58 $(call if_changed_dep,tprog-csingle)
60 # Link an executable based on list of .o files, all plain c
61 # tprog-cmulti -> executable
62 quiet_cmd_tprog-cmulti = LD $@
63 cmd_tprog-cmulti = $(CC) $(tprogc_flags) $(TPROGS_LDFLAGS) -o $@ \
64 $(addprefix $(obj)/,$($(@F)-objs)) \
66 $(tprog-cmulti): $(tprog-cobjs) FORCE
67 $(call if_changed,tprog-cmulti)
68 $(call multi_depend, $(tprog-cmulti), , -objs)
71 # tprog-cobjs -> .o
72 quiet_cmd_tprog-cobjs = CC $@
73 cmd_tprog-cobjs = $(CC) $(tprogc_flags) -c -o $@ $<
74 $(tprog-cobjs): $(obj)/%.o: $(src)/%.c FORCE
75 $(call if_changed_dep,tprog-cobjs)