1 MY_TARGET_IN
:= $(MY_TARGET
)
2 MY_TARGETDIR_IN
:= $(MY_TARGETDIR
)
3 MY_SRCDIR_IN
:= $(MY_SRCDIR
)
4 MY_SRCS_IN
:= $(MY_SRCS
)
5 MY_CFLAGS_IN
:= $(MY_CFLAGS
)
6 MY_CPPFLAGS_IN
:= $(MY_CPPFLAGS
)
7 MY_INCLUDES_IN
:= $(MY_INCLUDES
)
9 #$(warning MY_OBJS = $(MY_OBJS))
11 # extract the different source types out of the list
12 #$(warning MY_SRCS_IN = $(MY_SRCS_IN))
13 MY_CPPSRCS_IN
:= $(filter %.
cpp,$(MY_SRCS_IN
))
14 MY_CSRCS_IN
:= $(filter %.c
,$(MY_SRCS_IN
))
15 MY_ASMSRCS_IN
:= $(filter %.S
,$(MY_SRCS_IN
))
17 #$(warning MY_CPPSRCS_IN = $(MY_CPPSRCS_IN))
18 #$(warning MY_CSRCS_IN = $(MY_CSRCS_IN))
19 #$(warning MY_ASMSRCS_IN = $(MY_ASMSRCS_IN))
21 # build a list of objects
22 MY_CPPOBJS_IN
:= $(addprefix $(MY_TARGETDIR_IN
)/,$(patsubst %.
cpp,%.o
,$(MY_CPPSRCS_IN
)))
23 MY_COBJS_IN
:= $(addprefix $(MY_TARGETDIR_IN
)/,$(patsubst %.c
,%.o
,$(MY_CSRCS_IN
)))
24 MY_ASMOBJS_IN
:= $(addprefix $(MY_TARGETDIR_IN
)/,$(patsubst %.S
,%.o
,$(MY_ASMSRCS_IN
)))
25 _TEMP_OBJS
:= $(MY_CPPOBJS_IN
) $(MY_COBJS_IN
) $(MY_ASMOBJS_IN
)
26 #$(warning _TEMP_OBJS = $(_TEMP_OBJS))
28 # add to the global object list
29 ALL_OBJS
:= $(ALL_OBJS
) $(_TEMP_OBJS
)
31 # add to the global deps
32 ALL_DEPS
:= $(ALL_DEPS
) $(_TEMP_OBJS
:.o
=.d
)
34 $(MY_TARGET_IN
): $(_TEMP_OBJS
)
37 @
$(LD
) $(GLOBAL_LDFLAGS
) -r
-o
$@
$^
39 include templates
/compile.mk