blob: 26672df52c28c068f7bf436709b970ca11eb5500 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# 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
# 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
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) $< $@
src/pcb_shape.dxf: src/pcb_shape.scad src/input.preprocessed.dxf
$(OPENSCAD_CMD) $< $@
src/jig.stl: src/jig.scad src/input.preprocessed.dxf
$(OPENSCAD_CMD) $< $@
src/input.preprocessed.svg: input.svg
support/inkscape_svg_filter_layers.py $< $@ --only --name "Test Points" "Mounting Holes" "Grip Slots" "Outline"
|