forked from hmnapier/tvprusa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (40 loc) · 1.62 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
target metric: OPENSCAD:=$(shell which openscad) -D variant=0 -D linear=0
target metric: TARGET=./metric-prusa
target metric-lm8uu: TARGET=./metric-prusa-linear
target metric-lm8uu: OPENSCAD:=$(shell which openscad) -D variant=0 -D linear=1
target sae: TARGET=./sae-prusa
target sae: OPENSCAD:=$(shell which openscad) -D variant=1 -D linear=0
target sae-lm8uu: TARGET=./sae-prusa-linear
target sae-lm8uu: OPENSCAD:=$(shell which openscad) -D variant=1 -D linear=1
PARTS= $(TARGET)/x-end-motor.stl $(TARGET)/x-end-idler.stl $(TARGET)/bar-clamp.stl
TARGETS=$(PARTS)
help:
@echo Options:
@echo make metric: makes metric parts
@echo make metric-lm8uu: makes metric parts
@echo make sae: makes metric parts
@echo make sae-lm8uu: makes metric parts
@echo make clean: deletes the stl directory with the output files
@echo adding VARIANT=1 to any of these commands generates SAE parts
@echo SAE parts get saved in ./stl-sae, metric parts in ./stl
metric : parts
metric-lm8uu : parts
sae : parts
sae-lm8uu : parts
parts : $(TARGET) $(TARGETS)
$(TARGET) :
mkdir -p $(TARGET)
$(TARGET)/%.stl : source/%.scad
@echo "Processing $@"
$(OPENSCAD) -s $(TARGET)$@ $(subst $(TARGET),.,source$(subst .stl,.scad,$@))
$(TARGET)/frame-vertex-with-foot.stl: source/frame-vertex.scad
$(OPENSCAD) -D basefoot=true -s $@ source/frame-vertex.scad
$(TARGET)/frame-vertex-without-foot.stl: source/frame-vertex.scad
$(OPENSCAD) -D basefoot=false -s $@ source/frame-vertex.scad
$(TARGET)/y-motor-bracket.stl: source/ybrac-t.scad
$(OPENSCAD) -s $@ ybrac-t.scad
#$(PARTS) : $(TARGET)
# @echo "Processing $@"
# $(OPENSCAD) -s $(TARGET)/[email protected] [email protected]
clean :
rm -rf $(TARGET)