summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 14 insertions, 27 deletions
diff --git a/Makefile b/Makefile
index 26672df..4b66b0d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,40 +1,27 @@
-# Installation-dependent settings. You can overwrite these in a file called config.mk in the same directory as this makefile. See readme.creole.
-INKSCAPE := inkscape
-OPENSCAD := openscad
-PYTHON := python2
-ASYMPTOTE := asy
+# Environment variables:
+# INKSCAPE_DXF_FLATNESS controls inkscape SVG->DXF export curve flatness (default: 0.1)
+# INKSCAPE, OPENSCAD: Commands to use for inkscape and openscad
-# Settings affecting the compiled results. You can overwrite these in a file called settings.mk in the same directory as this makefile. See readme.creole.
-DXF_FLATNESS := 0.1
-
-# Non-file goals.
-.PHONY: all clean generated dxf stl asy pdf
-
-# Include the configuration files.
--include config.mk settings.mk
-
-# Command to run the Python scripts.
-PYTHON_CMD := PYTHONPATH="support" $(PYTHON)
-INKSCAPE_CMD := INKSCAPE=$(INKSCAPE) DXF_FLATNESS=$(DXF_FLATNESS) $(PYTHON_CMD) -m inkscape
-OPENSCAD_CMD := OPENSCAD=$(OPENSCAD) $(PYTHON_CMD) -m openscad
+OPENSCAD ?= openscad
all: src/jig.stl src/pcb_shape.dxf
-clean:
- rm -f src/input.preprocessed.dxf
- rm -f src/input.preprocessed.svg
- rm -f src/jig.stl
- rm -f src/pcb_shape.dxf
-
src/input.preprocessed.dxf: src/input.preprocessed.svg
- $(INKSCAPE_CMD) $< $@
+ support/inkscape_exporter.py $< $@
src/pcb_shape.dxf: src/pcb_shape.scad src/input.preprocessed.dxf
- $(OPENSCAD_CMD) $< $@
+ $(OPENSCAD) -o $@ $<
src/jig.stl: src/jig.scad src/input.preprocessed.dxf
- $(OPENSCAD_CMD) $< $@
+ $(OPENSCAD) -o $@ $<
src/input.preprocessed.svg: input.svg
support/inkscape_svg_filter_layers.py $< $@ --only --name "Test Points" "Mounting Holes" "Grip Slots" "Outline"
+.PHONY: clean
+clean:
+ rm -f src/input.preprocessed.dxf
+ rm -f src/input.preprocessed.svg
+ rm -f src/jig.stl
+ rm -f src/pcb_shape.dxf
+