3 include scripts/config.mk
\r
8 export TOPDIR = $(CURDIR)
\r
12 export RELEASE_TREE=y
\r
17 # Directories we can build
\r
18 subdir-y += examples/simple
\r
21 PATH := /usr/bin/:$(PATH)
\r
22 find := $(shell which find)
\r
26 ifneq ($(MAKECMDGOALS),clean)
\r
28 $(error no ARCH=[ppc55xx], $(ARCH))
\r
32 ARCH_LIST = ppc55xx ppc5xx win32
\r
42 export def-y=$(CFG_ARCH_$(ARCH)) $(CFG_MCU) $(CFG_CPU)
\r
44 objdir = obj_$(ARCH)
\r
47 builddir-y = $(filter $(MAKECMDGOALS),$(subdir-y))
\r
49 .PHONY: $(builddir-y)
\r
54 @echo "make [all|clean] ARCH=[ppc55xx]"
\r
58 # The interesting things in this makefile( uses ideas from http://make.paulandlesley.org/ )
\r
60 # We descend into the object directories and build the. That way it's easier to build
\r
61 # multi-arch support and we don't have to use objdir everywhere.
\r
63 # ROOTDIR - The top-most directory ( this directory )
\r
64 # SUBDIR - The subdirectory we decend into
\r
67 +@[ -d $@/$(objdir) ] || mkdir -p $@/$(objdir)
\r
68 $(Q)$(MAKE) -r -C $@/$(objdir) -f $(CURDIR)/scripts/rules.mk ROOTDIR=$(CURDIR) SUBDIR=$@ all
\r
72 @echo " Removing objectfiles and libs for ARCH=$(ARCH)"
\r
73 $(Q)find $(foreach tmp, $(ARCH_LIST),$(addsuffix /obj_$(tmp),$(subdir-y))) -type f -name '*' | xargs rm -f
\r