-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (32 loc) · 1.48 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
UNAME := $(shell uname)
ifeq ($(UNAME),Darwin)
oscad = /Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD
else
oscad = /usr/bin/openscad
endif
main = scad/main.scad
config = scad/config.scad
output_dir = stl/
all:$(output_dir)base_universal.stl $(output_dir)base_small_motor.stl $(output_dir)lid_window.stl $(output_dir)lid_no_window.stl $(output_dir)latch.stl $(output_dir)rotor.stl $(output_dir)motor_spacer.stl build
$(output_dir)rotor.stl: $(config) $(main) scad/rotor.scad
$(oscad) -o $@ -D draw_complete=0 -D draw_rotor=1 $(main)
$(output_dir)base_universal.stl: $(config) $(main) scad/base.scad
$(oscad) -o $@ -D draw_complete=0 -D draw_base_universal=1 $(main)
$(output_dir)base_small_motor.stl: $(config) $(main) scad/base.scad
$(oscad) -o $@ -D draw_complete=0 -D draw_base_small_motor=1 $(main)
$(output_dir)latch.stl: $(config) $(main) scad/latch.scad
$(oscad) -o $@ -D draw_complete=0 -D draw_latch=1 $(main)
$(output_dir)lid_window.stl: $(config) $(main) scad/lid.scad
$(oscad) -o $@ -D draw_complete=0 -D draw_lid_window=1 $(main)
$(output_dir)lid_no_window.stl: $(config) $(main) scad/lid.scad
$(oscad) -o $@ -D draw_complete=0 -D draw_lid_no_window=1 $(main)
$(output_dir)motor_spacer.stl: $(config) $(main) scad/motor_spacer.scad
$(oscad) -o $@ -D draw_complete=0 -D draw_motor_spacer=1 $(main)
dxf/window.dxf: $(config) $(main) scad/window.scad
$(oscad) -o $@ -D draw_complete=0 -D draw_window=1 $(main)
build:
pio run
clean:
pio clean
rm $(output_dir)*.stl
rm dxf/*.dxf