sidestep
[mTask.git] / int / Makefile
1 export
2 SHOWPJ = 1
3 AUTOJ = 1
4 MAKES = $(wildcard */Makefile)
5 DIRS = $(patsubst %/Makefile,%,$(MAKES))
6 CLNS = $(patsubst %,%/cln,$(DIRS))
7 BINS = $(foreach a,$(DIRS),$(a)/$(a).bin)
8
9 all: $(BINS)
10 # -test -d com/tools && make -C com/tools all
11 # @echo made $(BINS)
12
13 hb: $(filter homebus-%,$(BINS))
14
15 tools:
16 -test -d com/tools && make -C com/tools all
17
18 info:
19 $(info $(BINS))
20 $(info $(CLNS))
21 $(info $(dir $(BINS)))
22
23 $(BINS):
24 @${MAKE} -C $(dir $@)
25
26 clean: $(CLNS)
27 -test -d com/tools && make -C com/tools clean
28 # -test -d com/homebus-bpi && make -C homebus-bpi clean
29 find . -name *.d -o -name *.o -o -name *.a -o -name *.bin -o -name *.out -o -name *.list -o -name *.map -o -name *.hex -o -name *.s19 -o -name *.sl |xargs rm -fv
30 -rm -rfv */o/* */filelist
31
32 $(CLNS):
33 @${MAKE} -C $(dir $@) clean
34 @touch $@