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_EXTRAOBJS_IN
:= $(MY_EXTRAOBJS
)
6 MY_CFLAGS_IN
:= $(MY_CFLAGS
)
7 MY_CPPFLAGS_IN
:= $(MY_CPPFLAGS
)
8 MY_LDFLAGS_IN
:= $(MY_LDFLAGS
)
9 MY_INCLUDES_IN
:= $(MY_INCLUDES
)
10 MY_LIBS_IN
:= $(MY_LIBS
)
11 MY_LIBPATHS_IN
:= $(MY_LIBPATHS
)
12 MY_DEPS_IN
:= $(MY_DEPS
)
13 MY_LINKSCRIPT_IN
:= $(MY_LINKSCRIPT
)
14 MY_GLUE_IN
:= $(MY_GLUE
)
16 #$(warning MY_OBJS = $(MY_OBJS))
18 # extract the different source types out of the list
19 #$(warning MY_SRCS_IN = $(MY_SRCS_IN))
20 MY_CPPSRCS_IN
:= $(filter %.
cpp,$(MY_SRCS_IN
))
21 MY_CSRCS_IN
:= $(filter %.c
,$(MY_SRCS_IN
))
22 MY_ASMSRCS_IN
:= $(filter %.S
,$(MY_SRCS_IN
))
24 #$(warning MY_CPPSRCS_IN = $(MY_CPPSRCS_IN))
25 #$(warning MY_CSRCS_IN = $(MY_CSRCS_IN))
26 #$(warning MY_ASMSRCS_IN = $(MY_ASMSRCS_IN))
28 # build a list of objects
29 MY_CPPOBJS_IN
:= $(addprefix $(MY_TARGETDIR_IN
)/,$(patsubst %.
cpp,%.o
,$(MY_CPPSRCS_IN
)))
30 MY_COBJS_IN
:= $(addprefix $(MY_TARGETDIR_IN
)/,$(patsubst %.c
,%.o
,$(MY_CSRCS_IN
)))
31 MY_ASMOBJS_IN
:= $(addprefix $(MY_TARGETDIR_IN
)/,$(patsubst %.S
,%.o
,$(MY_ASMSRCS_IN
)))
32 _TEMP_OBJS
:= $(MY_ASMOBJS_IN
) $(MY_CPPOBJS_IN
) $(MY_COBJS_IN
) $(MY_EXTRAOBJS_IN
)
33 #$(warning _TEMP_OBJS = $(_TEMP_OBJS))
35 # add to the global object list
36 ALL_OBJS
:= $(ALL_OBJS
) $(_TEMP_OBJS
)
38 # add to the global deps
39 ALL_DEPS
:= $(ALL_DEPS
) $(_TEMP_OBJS
:.o
=.d
)
41 ifeq ($(MY_LINKSCRIPT_IN
), )
42 MY_LINKSCRIPT_IN
:= $(APPS_LDSCRIPT
)
45 $(MY_TARGET_IN
): MY_LDFLAGS_IN
:=$(MY_LDFLAGS_IN
)
46 $(MY_TARGET_IN
): MY_LIBS_IN
:=$(MY_LIBS_IN
)
47 $(MY_TARGET_IN
): MY_LIBPATHS_IN
:=$(MY_LIBPATHS_IN
)
48 $(MY_TARGET_IN
): MY_LINKSCRIPT_IN
:=$(MY_LINKSCRIPT_IN
)
49 $(MY_TARGET_IN
): MY_GLUE_IN
:=$(MY_GLUE_IN
)
50 $(MY_TARGET_IN
): _TEMP_OBJS
:=$(_TEMP_OBJS
)
51 $(MY_TARGET_IN
):: $(_TEMP_OBJS
) $(MY_DEPS_IN
) $(MY_GLUE_IN
)
54 @
$(LD
) $(GLOBAL_LDFLAGS
) $(MY_LDFLAGS_IN
) --script
=$(MY_LINKSCRIPT_IN
) -L
$(LIBGCC_PATH
) -L
$(LIBS_BUILD_DIR
) $(MY_LIBPATHS_IN
) -o
$@
$(MY_GLUE_IN
) $(_TEMP_OBJS
) $(MY_LIBS_IN
) $(LIBGCC
)
55 @echo creating listing file
$@.lst
56 @
$(OBJDUMP
) -C
-S
$@
> $@.lst
58 include templates
/compile.mk