Rev 296 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 296 | Rev 320 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | .PHONY: drc partlist |
1 | .PHONY: drc partlist |
| 2 | 2 | ||
| 3 | - | ||
| 4 | SCH=$(shell ls sch/*sch) |
3 | SCH=$(shell ls sch/*sch) |
| 5 | 4 | ||
| 6 | all: dirs drc $(patsubst %.sch, %.bom, $(SCH)); |
5 | all: dirs drc bom $(patsubst %.sch, %.bom, $(SCH)); |
| 7 | 6 | ||
| 8 | # hackish somewhat |
7 | # hackish somewhat |
| 9 | dirs: |
8 | dirs: |
| 10 | if [ ! -e tmp ]; then mkdir tmp; fi |
9 | if [ ! -e tmp ]; then mkdir tmp; fi |
| - | 10 | if [ ! -e bom ]; then mkdir bom; fi |
|
| 11 | 11 | ||
| 12 | # i broke the makefile, (jelle) |
12 | # i broke the makefile, (jelle) |
| 13 | # http://www.gnu.org/software/m4/manual/html_node/Patsubst.html |
13 | # http://www.gnu.org/software/m4/manual/html_node/Patsubst.html |
| 14 | drc: $(addprefix drc/,$(patsubst %.sch,%.drc, $(notdir $(SCH)))) |
14 | drc: $(addprefix drc/,$(patsubst %.sch,%.drc, $(notdir $(SCH)))) |
| 15 | 15 | ||
| - | 16 | bom: $(addprefix bom/,$(patsubst %.sch,%.bom, $(notdir $(SCH)))) |
|
| - | 17 | ||
| 16 | partlist: $(addprefix tmp/,$(patsubst %.sch,%.txt,$(notdir $(SCH)))) |
18 | partlist: $(addprefix tmp/,$(patsubst %.sch,%.txt,$(notdir $(SCH)))) |
| 17 | sort $^ |uniq > $@ |
19 | sort $^ |uniq > $@ |
| 18 | 20 | ||
| 19 | tmp/%.txt: sch/%.sch |
21 | tmp/%.txt: sch/%.sch |
| 20 | gnetlist -g partslist3 -o $@ $^ |
22 | gnetlist -g partslist3 -o $@ $^ |
| 21 | 23 | ||
| 22 | drc/%.drc: sch/%.sch |
24 | drc/%.drc: sch/%.sch |
| 23 | gnetlist -g drc2 -o $@ $^ |
25 | gnetlist -g drc2 -o $@ $^ |
| 24 | 26 | ||
| 25 | sch/%.bom: sch/%.sch |
27 | bom/%.bom: sch/%.sch |
| 26 | gnetlist -g partslist1 -n -o $@ $^ |
28 | gnetlist -g partslist1 -n -o $@ $^ |
| - | 29 | ||
| - | 30 | clean: |
|
| - | 31 | if [ -e tmp ]; then rm tmp; fi |
|
| - | 32 | ||
| - | 33 | .PHONY: clean |
|