--- /dev/null
+
+PROJ=power_switch
+SCHEMATICS=$(wildcard $(PROJ)-*.sch)
+PDFS=$(SCHEMATICS:.sch=.pdf)
+
+default:
+ @echo "Select a target, please."
+
+.PHONY: pdf
+pdf: $(PROJ).pdf
+
+.PHONY: drc
+drc: $(PROJ).drc
+
+.PHONY: sch
+sch:
+ gschem $(SCHEMATICS) &
+
+
+#####################
+
+$(PROJ).pdf: $(PDFS)
+ pdftk $(PDFS) cat output $@
+
+
+update-footprints:
+ @#awk '/^Element/ {print $$2}' $(PROJ).pcb | sort -u | tr -d \" | awk '{printf "LoadFrom(ElementToBuffer, %s)\nUpdateFootprintsFromBuffer(auto)\n", $$1}' > fp-update.pcbscript
+ gnetlist -g pcbfwd -o $(PROJ).fpupdate $(SCHEMATICS) && \
+ perl -pi -e 's/(^ElementList\(Need.*)\)/\1,forceupdate)/' $(PROJ).fpupdate
+
+
+.PHONY: renum
+renum: $(SCHEMATICS)
+ refdes_renum --verbose --gentle --pgskip 100 \
+ $(SCHEMATICS) > $(PROJ).renum.log \
+ && (grep -v "^Scanning\|^Now" $(PROJ).renum.log || true) \
+ || cat $(PROJ).renum.log
+
+
+$(PROJ).drc: $(SCHEMATICS)
+ gnetlist -g drc2 -o $@ $^ > /dev/null
+ @grep ^ERROR $@ && mv $@ $@.err; test $$? -eq 1 && rm -f $@.err
+
+
+%.ps: %.sch
+ gschem -p -o $@ -s $(GEDADATA)/scheme/print.scm $<
+
+
+%.pdf: %.ps
+ ps2pdf $< $@
+
+
+clean:
+ rm -f *sch~ $(PROJ).drc{,err} $(PROJ).renum.log $(PDFS) $(PROJ).pdf
+
+squeaky: clean
+ git clean -f
+
--- /dev/null
+/home/dan/waeda/gedasymbols/www/user/dj_delorie/tools/csv2sch
\ No newline at end of file
--- /dev/null
+;only show local symbols
+(reset-component-library)
+
+(load "../gafrc-libraries")
+
+; vi:ft=scheme
--- /dev/null
+; global symbol library
+; git submodule
+(component-library-search "../waeda-sym")
+
+; local-only symbols
+(component-library "../sym" "local-sym")
+
+; subpage symbols
+(component-library ".")
+
+; subpages
+(source-library ".")
+
+; vim: ft=scheme
--- /dev/null
+
+(sort-component-library "enabled")
+
+(define default-titleblock "title-wa-85x110.sym")
+(output-type "extents no margins")
+
+(net-selection-mode "enabled_all")
+
+; vi:ft=scheme
--- /dev/null
+v 20111231 2
+C 40000 40000 0 0 0 title-wa-85x110.sym
+{
+T 49900 40600 5 10 1 1 0 0 1
+date=---
+T 53700 40600 5 10 1 1 0 0 1
+rev=---
+T 53700 40300 5 10 1 1 0 0 1
+auth=DJW
+T 49900 40900 5 8 1 1 0 0 1
+fname=$Id: $
+T 49900 41300 5 14 1 1 0 0 1
+title=usbio power switch
+T 50600 40300 5 10 1 1 0 6 1
+pagenum=1
+T 52100 40300 5 10 1 1 0 6 1
+pageof=1
+}
+C 50900 47800 1 0 0 pad-r-2.sym
+{
+T 51400 47900 5 10 1 1 0 1 1
+refdes=V+ dev
+T 51000 48000 5 10 0 0 0 0 1
+footprint=CON_HDR-254P-1C-1R-1N__Mill-Max_800-Series
+T 51000 48000 5 10 0 0 0 0 1
+pn-digikey=x
+}
+C 48600 45300 1 0 0 nmos-3.sym
+{
+T 49200 45800 5 10 0 0 0 0 1
+device=NMOS_TRANSISTOR
+T 49200 45800 5 10 1 1 0 0 1
+refdes=Qn1
+T 49200 45600 5 10 1 1 0 0 1
+value=VN10KLS
+}
+C 48900 47400 1 270 1 pmos-3.sym
+{
+T 49400 48000 5 10 0 0 90 2 1
+device=PMOS_TRANSISTOR
+T 49100 48200 5 10 1 1 0 0 1
+refdes=Qp1
+T 49100 48000 5 10 1 1 0 0 1
+value=VP2016
+}
+C 48000 47000 1 0 0 resistor-1.sym
+{
+T 48300 47400 5 10 0 0 0 0 1
+device=RESISTOR
+T 48200 47300 5 10 1 1 0 0 1
+refdes=R1
+T 48600 47300 5 10 1 1 0 0 1
+value=10k
+}
+N 49100 47400 49100 46100 4
+N 48900 47100 49100 47100 4
+N 49700 47900 50900 47900 4
+N 48900 47900 46700 47900 4
+N 48000 47100 47700 47100 4
+N 47700 47100 47700 47900 4
+C 46700 48000 1 180 0 pad-r-2.sym
+{
+T 46200 47900 5 10 1 1 180 1 1
+refdes=V+ usbio
+T 46600 47800 5 10 0 0 180 0 1
+footprint=CON_HDR-254P-1C-1R-1N__Mill-Max_800-Series
+T 46600 47800 5 10 0 0 180 0 1
+pn-digikey=x
+}
+C 46700 46400 1 180 0 pad-r-2.sym
+{
+T 46200 46300 5 10 1 1 180 1 1
+refdes=\_SUSPEND\_
+T 46600 46200 5 10 0 0 180 0 1
+footprint=CON_HDR-254P-1C-1R-1N__Mill-Max_800-Series
+T 46600 46200 5 10 0 0 180 0 1
+pn-digikey=x
+}
+C 46700 45200 1 180 0 pad-r-2.sym
+{
+T 46200 45100 5 10 1 1 180 1 1
+refdes=GND
+T 46600 45000 5 10 0 0 180 0 1
+footprint=CON_HDR-254P-1C-1R-1N__Mill-Max_800-Series
+T 46600 45000 5 10 0 0 180 0 1
+pn-digikey=x
+}
+C 50900 45000 1 0 0 pad-r-2.sym
+{
+T 51400 45100 5 10 1 1 0 1 1
+refdes=GND
+T 51000 45200 5 10 0 0 0 0 1
+footprint=CON_HDR-254P-1C-1R-1N__Mill-Max_800-Series
+T 51000 45200 5 10 0 0 0 0 1
+pn-digikey=x
+}
+N 46700 45100 50900 45100 4
+N 49100 45300 49100 45100 4
+N 46700 46300 47900 46300 4
+N 47900 46300 47900 45500 4
+N 47900 45500 48600 45500 4
--- /dev/null
+/home/dan/waeda/gedasymbols/www/user/dj_delorie/tools/sch2csv
\ No newline at end of file
--- /dev/null
+v 20031231 1
+T 600 500 5 10 0 0 0 0 1
+device=NMOS_TRANSISTOR
+T 600 500 5 10 0 0 0 0 1
+numslots=0
+T 600 500 5 10 0 0 0 0 1
+description=generic N channel MOS transistor (enhancement type)
+L 250 600 500 600 3 0 0 0 -1 -1
+L 250 200 500 200 3 0 0 0 -1 -1
+L 250 400 350 450 3 0 0 0 -1 -1
+L 250 400 350 350 3 0 0 0 -1 -1
+P 0 200 200 200 1 0 0
+{
+T 0 300 5 10 0 1 0 0 1
+pinnumber=G
+T 0 300 9 10 0 1 0 0 1
+pinlabel=G
+T 0 300 5 10 0 0 0 0 1
+pinseq=2
+T 0 300 5 10 0 0 0 0 1
+pintype=pas
+}
+P 500 600 500 800 1 0 1
+{
+T 300 700 5 10 0 1 0 0 1
+pinnumber=D
+T 300 700 9 10 0 1 0 0 1
+pinlabel=D
+T 300 700 5 10 0 0 0 0 1
+pinseq=1
+T 300 700 5 10 0 0 0 0 1
+pintype=pas
+}
+P 500 200 500 0 1 0 1
+{
+T 300 0 5 10 0 1 0 0 1
+pinnumber=S
+T 300 0 9 10 0 1 0 0 1
+pinlabel=S
+T 300 0 5 10 0 0 0 0 1
+pinseq=3
+T 300 0 5 10 0 0 0 0 1
+pintype=pas
+}
+T 700 600 8 10 1 1 0 0 1
+refdes=Q?
+L 250 675 250 525 3 0 0 0 -1 -1
+L 250 475 250 325 3 0 0 0 -1 -1
+L 250 275 250 125 3 0 0 0 -1 -1
+L 200 600 200 200 3 0 0 0 -1 -1
+L 250 400 400 400 3 0 0 0 -1 -1
+L 400 400 400 200 3 0 0 0 -1 -1
--- /dev/null
+v 20031231 1
+T 600 500 5 10 0 0 0 0 1
+device=PMOS_TRANSISTOR
+T 600 500 5 10 0 0 0 0 1
+numslots=0
+T 600 500 5 10 0 0 0 0 1
+description=generic P channel MOS transistor (enhancement type)
+L 250 600 500 600 3 0 0 0 -1 -1
+L 250 200 500 200 3 0 0 0 -1 -1
+L 300 350 400 400 3 0 0 0 -1 -1
+L 300 450 400 400 3 0 0 0 -1 -1
+P 0 200 200 200 1 0 0
+{
+T 0 300 5 10 0 1 0 0 1
+pinnumber=G
+T 0 300 9 10 0 1 0 0 1
+pinlabel=G
+T 0 300 5 10 0 0 0 0 1
+pinseq=2
+T 0 300 5 10 0 0 0 0 1
+pintype=pas
+}
+P 500 600 500 800 1 0 1
+{
+T 300 700 5 10 0 1 0 0 1
+pinnumber=D
+T 300 700 9 10 0 1 0 0 1
+pinlabel=D
+T 300 700 5 10 0 0 0 0 1
+pinseq=1
+T 300 700 5 10 0 0 0 0 1
+pintype=pas
+}
+P 500 200 500 0 1 0 1
+{
+T 300 0 5 10 0 1 0 0 1
+pinnumber=S
+T 300 0 9 10 0 1 0 0 1
+pinlabel=S
+T 300 0 5 10 0 0 0 0 1
+pinseq=3
+T 300 0 5 10 0 0 0 0 1
+pintype=pas
+}
+T 700 600 8 10 1 1 0 0 1
+refdes=Q?
+L 250 675 250 525 3 0 0 0 -1 -1
+L 250 475 250 325 3 0 0 0 -1 -1
+L 250 275 250 125 3 0 0 0 -1 -1
+L 200 600 200 200 3 0 0 0 -1 -1
+L 250 400 400 400 3 0 0 0 -1 -1
+L 400 400 400 200 3 0 0 0 -1 -1