This repository has been archived by the owner on Oct 4, 2021. It is now read-only.
forked from rwb27/openflexure_microscope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
156 lines (104 loc) · 8.1 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# Makefile for the openflexure microscope
# Generated by generate_makefile.py
.PHONY: all cleanstl
SOURCE = openscad
OUTPUT = builds
body_versions = LS65 LS65-M LS75 LS75-M
optics_versions = picamera_2_pilens_LS65 logitech_c270_c270_lens_LS65 picamera_2_rms_f40d16_LS65 picamera_2_rms_f50d13_LS65 logitech_c270_rms_f40d16_LS65 logitech_c270_rms_f50d13_LS65 m12_rms_f40d16_LS65 m12_rms_f50d13_LS65 m12_m12_lens_LS65
sample_riser_versions = LS10
slide_riser_versions = LS10
TOOLS := actuator_assembly_tools lens_tool
TOOLS := $(TOOLS) picamera_2_cover picamera_2_gripper picamera_2_lens_gripper actuator_drilling_jig
ACCESSORIES := picamera_2_cover $(sample_riser_versions:%=sample_riser_%) $(slide_riser_versions:%=slide_riser_%) microscope_stand microscope_stand_no_pi motor_driver_case back_foot
COMMONPARTS := feet feet_tall gears sample_clips small_gears
BODIES := $(body_versions:%=main_body_%)
OPTICS := $(optics_versions:%=optics_%) camera_platform_picamera_2_LS65 camera_platform_6led_LS65 lens_spacer_picamera_2_pilens_LS65 lens_spacer_picamera_2_pilens_LS75
ILLUMINATIONS := illumination_dovetail condenser
ALLPARTS := $(COMMONPARTS) $(TOOLS) $(BODIES) $(ILLUMINATIONS) $(OPTICS) $(ACCESSORIES)
ALLSTLFILES := $(ALLPARTS:%=$(OUTPUT)/%.stl)
parameters_file := $(SOURCE)/microscope_parameters.scad
utilities_file := $(SOURCE)/utilities.scad
all_deps := $(parameters_file) $(utilities_file) #All targets depend on these
all: $(ALLSTLFILES)
cleanstl:
rm $(STLFILES)
#parameter and utilities files affect everything
$(OUTPUT)/%.stl: $(all_deps)
main_body_dep_names := compact_nut_seat dovetail logo z_axis
main_body_deps := $(main_body_dep_names:%=$(SOURCE)/%.scad)
$(OUTPUT)/main_body_LS65.stl: $(SOURCE)/main_body.scad $(main_body_deps)
openscad -o $@ -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/main_body_LS65-M.stl: $(SOURCE)/main_body.scad $(main_body_deps)
openscad -o $@ -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=true' $<
$(OUTPUT)/main_body_LS75.stl: $(SOURCE)/main_body.scad $(main_body_deps)
openscad -o $@ -D 'big_stage=true' -D 'sample_z=75' -D 'motor_lugs=false' $<
$(OUTPUT)/main_body_LS75-M.stl: $(SOURCE)/main_body.scad $(main_body_deps)
openscad -o $@ -D 'big_stage=true' -D 'sample_z=75' -D 'motor_lugs=true' $<
$(OUTPUT)/illumination_dovetail_LS65.stl: $(SOURCE)/illumination_dovetail.scad $(main_body_deps) $(SOURCE)/illumination.scad
openscad -o $@ -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/condenser_LS65.stl: $(SOURCE)/condenser.scad $(main_body_deps) $(SOURCE)/illumination.scad
openscad -o $@ -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/illumination_dovetail_LS65-M.stl: $(SOURCE)/illumination_dovetail.scad $(main_body_deps) $(SOURCE)/illumination.scad
openscad -o $@ -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=true' $<
$(OUTPUT)/condenser_LS65-M.stl: $(SOURCE)/condenser.scad $(main_body_deps) $(SOURCE)/illumination.scad
openscad -o $@ -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=true' $<
$(OUTPUT)/illumination_dovetail_LS75.stl: $(SOURCE)/illumination_dovetail.scad $(main_body_deps) $(SOURCE)/illumination.scad
openscad -o $@ -D 'big_stage=true' -D 'sample_z=75' -D 'motor_lugs=false' $<
$(OUTPUT)/condenser_LS75.stl: $(SOURCE)/condenser.scad $(main_body_deps) $(SOURCE)/illumination.scad
openscad -o $@ -D 'big_stage=true' -D 'sample_z=75' -D 'motor_lugs=false' $<
$(OUTPUT)/illumination_dovetail_LS75-M.stl: $(SOURCE)/illumination_dovetail.scad $(main_body_deps) $(SOURCE)/illumination.scad
openscad -o $@ -D 'big_stage=true' -D 'sample_z=75' -D 'motor_lugs=true' $<
$(OUTPUT)/condenser_LS75-M.stl: $(SOURCE)/condenser.scad $(main_body_deps) $(SOURCE)/illumination.scad
openscad -o $@ -D 'big_stage=true' -D 'sample_z=75' -D 'motor_lugs=true' $<
optics_dep_names := dovetail cameras/camera
optics_deps := $(optics_dep_names:%=$(SOURCE)/%.scad)
$(OUTPUT)/optics_picamera_2_pilens_LS65.stl: $(SOURCE)/optics.scad $(optics_deps)
openscad -o $@ -D 'optics="pilens"' -D 'camera="picamera_2"' -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/optics_logitech_c270_c270_lens_LS65.stl: $(SOURCE)/optics.scad $(optics_deps)
openscad -o $@ -D 'optics="c270_lens"' -D 'camera="logitech_c270"' -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/optics_picamera_2_rms_f40d16_LS65.stl: $(SOURCE)/optics.scad $(optics_deps)
openscad -o $@ -D 'optics="rms_f40d16"' -D 'camera="picamera_2"' -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/optics_picamera_2_rms_f50d13_LS65.stl: $(SOURCE)/optics.scad $(optics_deps)
openscad -o $@ -D 'optics="rms_f50d13"' -D 'camera="picamera_2"' -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/optics_logitech_c270_rms_f40d16_LS65.stl: $(SOURCE)/optics.scad $(optics_deps)
openscad -o $@ -D 'optics="rms_f40d16"' -D 'camera="logitech_c270"' -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/optics_logitech_c270_rms_f50d13_LS65.stl: $(SOURCE)/optics.scad $(optics_deps)
openscad -o $@ -D 'optics="rms_f50d13"' -D 'camera="logitech_c270"' -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/optics_m12_rms_f40d16_LS65.stl: $(SOURCE)/optics.scad $(optics_deps)
openscad -o $@ -D 'optics="rms_f40d16"' -D 'camera="m12"' -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/optics_m12_rms_f50d13_LS65.stl: $(SOURCE)/optics.scad $(optics_deps)
openscad -o $@ -D 'optics="rms_f50d13"' -D 'camera="m12"' -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/optics_m12_m12_lens_LS65.stl: $(SOURCE)/optics.scad $(optics_deps)
openscad -o $@ -D 'optics="m12_lens"' -D 'camera="m12"' -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/camera_platform_picamera_2_LS65.stl: $(SOURCE)/camera_platform.scad $(optics_deps)
openscad -o $@ -D 'big_stage=true' -D 'camera="picamera_2"' -D 'optics="pilens"' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/lens_spacer_picamera_2_pilens_LS65.stl: $(SOURCE)/lens_spacer.scad $(optics_deps)
openscad -o $@ -D 'big_stage=true' -D 'camera="picamera_2"' -D 'optics="pilens"' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/camera_platform_picamera_2_LS75.stl: $(SOURCE)/camera_platform.scad $(optics_deps)
openscad -o $@ -D 'big_stage=true' -D 'camera="picamera_2"' -D 'optics="pilens"' -D 'sample_z=75' -D 'motor_lugs=false' $<
$(OUTPUT)/lens_spacer_picamera_2_pilens_LS75.stl: $(SOURCE)/lens_spacer.scad $(optics_deps)
openscad -o $@ -D 'big_stage=true' -D 'camera="picamera_2"' -D 'optics="pilens"' -D 'sample_z=75' -D 'motor_lugs=false' $<
$(OUTPUT)/camera_platform_6led_LS65.stl: $(SOURCE)/camera_platform.scad $(optics_deps)
openscad -o $@ -D 'big_stage=true' -D 'camera="6led"' -D 'optics="pilens"' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/camera_platform_6led_LS75.stl: $(SOURCE)/camera_platform.scad $(optics_deps)
openscad -o $@ -D 'big_stage=true' -D 'camera="6led"' -D 'optics="pilens"' -D 'sample_z=75' -D 'motor_lugs=false' $<
riser_dep_names := main_body
riser_deps := $(optics_dep_names:%=$(SOURCE)/%.scad)
$(OUTPUT)/sample_riser_LS10.stl: $(SOURCE)/sample_riser.scad $(riser_deps)
openscad -o $@ -D 'h=10' -D 'big_stage=true' $<
$(OUTPUT)/slide_riser_LS10.stl: $(SOURCE)/slide_riser.scad $(riser_deps)
openscad -o $@ -D 'h=10' -D 'big_stage=true' $<
stand_dep_names := main_body
stand_deps := $(optics_dep_names:%=$(SOURCE)/%.scad)
$(OUTPUT)/microscope_stand_LS65-30.stl: $(SOURCE)/microscope_stand.scad $(stand_deps)
openscad -o $@ -D 'h=30' -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/microscope_stand_LS65-160.stl: $(SOURCE)/microscope_stand.scad $(stand_deps)
openscad -o $@ -D 'h=160' -D 'big_stage=true' -D 'sample_z=65' -D 'motor_lugs=false' $<
$(OUTPUT)/picamera_2_%.stl: $(SOURCE)/cameras/picamera_2_%.scad $(all_deps)
openscad -o $@ -D 'camera="picamera_2"' $<
$(OUTPUT)/feet_tall.stl: $(SOURCE)/feet.scad $(all_deps)
openscad -o $@ -D 'foot_height=26' $<
$(OUTPUT)/actuator_assembly_tools.stl: $(SOURCE)/actuator_assembly_tools.scad $(all_deps)
openscad -o $@ -D 'foot_height=26' $<
$(OUTPUT)/%.stl: $(SOURCE)/%.scad $(all_deps)
openscad -o $@ $<