Root/bom/Makefile

Source at commit 1a5d9f5a1e1ed02cc887498bd4a1f9223d029ff7 created 9 years 11 months ago.
By Werner Almesberger, bom/: automatic BOM generation (work in progress)
1BOOM=PATH=/home/moko/svn.openmoko.org/trunk/eda/boom:../boom:$$PATH boom
2
3KITS=1
4
5EQU=atrf.equ dk/digi-key.equ
6INV=dk/digi-key.inv
7CHR=avx.chr tdk.chr yageo-cap.chr
8
9
10.PHONY: all again show-atusd spotless
11
12all: atusd.ord
13
14again:
15        $(MAKE) spotless
16        $(MAKE) all
17
18atusd.ord: atusd.par $(INV) $(EQU)
19        $(BOOM) part2order $(KITS) $(INV) $(EQU) atusd.par >$@ || \
20          { rm -rf $@; exit 1; }
21
22atusd.par: $(EQU) $(INV) $(CHR) ../atusd/atusd.lst atrf.sub
23        $(BOOM) bom2part $(EQU) $(INV) $(CHR) \
24          ../atusd/atusd.lst atrf.sub \
25          >$@ || { rm -rf $@; exit 1; }
26
27avx.chr: dk/digi-key.equ avx.gen
28        $(BOOM) gen2chr AVX dk/digi-key.equ avx.gen >$@ || \
29          { rm -f $@; exit 1; }
30
31tdk.chr: dk/digi-key.equ tdk.gen
32        $(BOOM) gen2chr TDK dk/digi-key.equ tdk.gen >$@ || \
33          { rm -f $@; exit 1; }
34
35yageo-cap.chr: dk/digi-key.equ yageo-cap.gen
36        $(BOOM) gen2chr YAGEO dk/digi-key.equ yageo-cap.gen >$@ || \
37          { rm -f $@; exit 1; }
38
39dk/digi-key.inv:
40        $(MAKE) -C dk digi-key.inv
41
42SHOW_PRETTY = (echo '\#ORD'; grep '^$(2) ' $(1).ord ; ) | \
43        $(BOOM) prettyord - $(3) | \
44          sed 's/^... //' | \
45          awk '{ s += $$(NF); if ($$(NF)+0) n++; print; } \
46          END { print "$(4)", s, "items:", n }'
47
48show-atusd: atusd.ord dk/digi-key.dsc
49        $(call SHOW_PRETTY,atusd,DIGI-KEY,dk/digi-key.dsc,USD)
50
51spotless:
52        $(MAKE) -C dk spotless
53        rm -f atusd.par atusd.ord
54        rm -f avx.chr tdk.chr yageo-cap.chr
55

Archive Download this file



interactive