forked from secondsight/secondsight-hardware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (48 loc) · 1.46 KB
/
Makefile
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Makefile for creating the aetherAR viewer
STLS=\
visor-C.stl\
visor-D.stl\
lens_holders.stl\
optics_support.stl\
visor-C-assembled.stl\
visor-D-assembled.stl
EXTRA_STLS=\
full_optics.stl
SOURCES=\
visor.scad\
visor_body.scad\
visor_elastic_mount.scad\
visor_optics_mount.scad\
optic_plate_support.scad\
lenses.scad
# This is system-specific
OPENSCAD=/usr/local/bin/openscad
SLIC3R=~/3rdparty_sandbox/MM/Slic3r/bin/slic3r
all: $(STLS)
# Create STL files from OpenSCAD files
%.stl: %.scad
$(OPENSCAD) -o $@ $<
# Create gcode files from STL files
%.gcode: %.stl config.ini
$(SLIC3R) --load config.ini -o $@ $<
visor.stl: $(SOURCES) Makefile
visor-C.stl: $(SOURCES) Makefile
$(OPENSCAD) -D 'plate="body"' -D 'variant="C"' -o $@ $<
visor-D.stl: $(SOURCES) Makefile
$(OPENSCAD) -D 'plate="body"' -D 'variant="D"' -o $@ $<
lens_holders.stl: $(SOURCES) Makefile
$(OPENSCAD) -D 'plate="lens_holders"' -o $@ $<
optics_support.stl: $(SOURCES) Makefile
$(OPENSCAD) -D 'plate="optics_support"' -o $@ $<
full_optics.stl: $(SOURCES) Makefile
$(OPENSCAD) -D 'plate="full_optics"' -o $@ $<
visor-C-assembled.stl: $(SOURCES) Makefile
$(OPENSCAD) -D 'plate="assembled"' -D 'variant="C"' -o $@ $<
visor-D-assembled.stl: $(SOURCES) Makefile
$(OPENSCAD) -D 'plate="assembled"' -D 'variant="D"' -o $@ $<
test.stl: $(SOURCES) Makefile
$(OPENSCAD) -D 'plate="test"' -D 'variant="C"' -o $@ $<
.PHONY: clobber
.SECONDARY:
clobber:
rm $(STLS) $(EXTRA_STLS) visor-*.stl *.gcode