summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--Makefile4
-rw-r--r--multiswitch-embeddest.scad4
2 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a488056..1d758a3 100644
--- a/Makefile
+++ b/Makefile
@@ -2,33 +2,37 @@
2 2
3OPENSCAD_APP?=/Applications/OpenSCAD.app 3OPENSCAD_APP?=/Applications/OpenSCAD.app
4OPENSCAD_BIN?=${OPENSCAD_APP}/Contents/MacOS/OpenSCAD 4OPENSCAD_BIN?=${OPENSCAD_APP}/Contents/MacOS/OpenSCAD
5OPENSCAD_FLAGS=-D draft=false 5OPENSCAD_FLAGS=-D draft=false
6SED?=sed 6SED?=sed
7ECHO?=/bin/echo 7ECHO?=/bin/echo
8AWK?=awk 8AWK?=awk
9 9
10default: 10default:
11 @echo "And?" 11 @echo "And?"
12 12
13clean: 13clean:
14 rm -f *.stl *.gcode 14 rm -f *.stl *.gcode
15 15
16stl-another-%: 16stl-another-%:
17 $(MAKE) another-$*-{body,lever,knob}.stl 17 $(MAKE) another-$*-{body,lever,knob}.stl
18 18
19another-%-body.stl: another-%.scad another.scad 19another-%-body.stl: another-%.scad another.scad
20 $(OPENSCAD_BIN) $(OPENSCAD_FLAGS) -D 'what="body"' -o "$@" "$<" 20 $(OPENSCAD_BIN) $(OPENSCAD_FLAGS) -D 'what="body"' -o "$@" "$<"
21another-%-lever.stl: another-%.scad another.scad 21another-%-lever.stl: another-%.scad another.scad
22 $(OPENSCAD_BIN) $(OPENSCAD_FLAGS) -D 'what="lever"' -o "$@" "$<" 22 $(OPENSCAD_BIN) $(OPENSCAD_FLAGS) -D 'what="lever"' -o "$@" "$<"
23another-%-knob.stl: another-%.scad another.scad 23another-%-knob.stl: another-%.scad another.scad
24 $(OPENSCAD_BIN) $(OPENSCAD_FLAGS) -D 'what="knob"' -o "$@" "$<" 24 $(OPENSCAD_BIN) $(OPENSCAD_FLAGS) -D 'what="knob"' -o "$@" "$<"
25 25
26multiswitch: multiswitch.c8r.scad $(addsuffix .stl,$(addprefix multiswitch-embeddest-,2 3 4 5 6))
27multiswitch-embeddest-%.stl: multiswitch-embeddest.scad
28 $(OPENSCAD_BIN) $(OPENSCAD_FLAGS) -D inputs=$* -o "$@" "$<"
29
26multiswitch.c8r.scad: multiswitch-c8r.scad threads.scad pushfit_data.scad pushfittery.scad multiswitch.scad 30multiswitch.c8r.scad: multiswitch-c8r.scad threads.scad pushfit_data.scad pushfittery.scad multiswitch.scad
27 @echo "Preprocessing into $@…" 31 @echo "Preprocessing into $@…"
28 @( \ 32 @( \
29 $(ECHO) "/* DO NOT. JUST DO NOT. FORGET THIS FILE, IT'S PREPROCESSED, GET THE SOURCE. */" ;\ 33 $(ECHO) "/* DO NOT. JUST DO NOT. FORGET THIS FILE, IT'S PREPROCESSED, GET THE SOURCE. */" ;\
30 $(AWK) '/^\/\/CUSTOMIZERCUTOFF/ {nextfile} {print}' $^ | $(SED) -Ee 's,^(use|include),//\1,g' \ 34 $(AWK) '/^\/\/CUSTOMIZERCUTOFF/ {nextfile} {print}' $^ | $(SED) -Ee 's,^(use|include),//\1,g' \
31 ) > $@ 35 ) > $@
32 36
33%.stl: %.scad 37%.stl: %.scad
34 ${OPENSCAD_BIN} ${OPENSCAD_FLAGS} -o "$@" "$<" 38 ${OPENSCAD_BIN} ${OPENSCAD_FLAGS} -o "$@" "$<"
diff --git a/multiswitch-embeddest.scad b/multiswitch-embeddest.scad
new file mode 100644
index 0000000..a99261e
--- a/dev/null
+++ b/multiswitch-embeddest.scad
@@ -0,0 +1,4 @@
1use <multiswitch.scad>;
2include <pushfit_data.scad>;
3
4multiswitch(pf=pushfit_embeddest,inputs=inputs,debug=0);