3 # SUBDIR - also the same as the MAKECMDGOAL
\r
6 # environment should handle
\r
8 # pc: gcc(_WIN32), ppc: gcc(_PPC) and diab(_PPC)
\r
12 RELDIR := $(subst $(TOPDIR)/,,$(CURDIR))
\r
17 include $(ROOTDIR)/scripts/cc_$(COMPILER).mk
\r
19 # Create the target name...
\r
20 target := $(subst /,_,$(SUBDIR))
\r
25 # build- targets are "end" target that the included makefile want's to build
\r
26 all: $(build-lib-y) $(build-exe-y)
\r
28 # Determine what kind of filetype to build from
\r
36 # Extremly simple depencendy stuff
\r
37 -include $(subst .o,.d,$(obj-y))
\r
42 $(CC) -c $(CFLAGS) -o $@ $(addprefix -I ,$(inc-y)) $(addprefix -D,$(def-y)) $<
\r
46 $(AS) $(ASFLAGS) -o $@ $<
\r
51 $(CPP) -o $@ $(addprefix -I ,$(inc-y)) $(addprefix -D,$(def-y)) $<
\r
54 $(build-lib-y): $(dep-y) $(obj-y)
\r
55 @echo " >> AR $(RELDIR)/$@"
\r
56 $(AR) -r -o $@ $(obj-y) 2> /dev/null
\r
60 $(build-exe-y): $(obj-y) $(sim-y) $(libitem-y)
\r
61 @echo " >> LD $(RELDIR)/$@"
\r
62 $(LD) $(LDFLAGS) $(ldcmdfile-y) -o $@ $(obj-y) $(libpath-y) --start-group $(lib-y) $(libitem-y) --end-group $(LDMAPFILE)
\r
63 @echo " >>>>>>> DONE <<<<<<<<<"
\r