forked from RepRap4U/RebeliX
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 791 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 791 Bytes
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
STL_DIR=STL
IMG_DIR=PNGs
SRC_DIR=src
PLATE_DIMMENSIONS=120
SIMARRANGE=/usr/local/bin/simarrange
STLSORT=stlsort
OPENSCAD_APP=openscad
SOURCES=$(wildcard $(SRC_DIR)/*.scad)
TARGETS=$(patsubst $(SRC_DIR)/%.scad, $(STL_DIR)/%.stl, $(SOURCES))
IMAGES=$(patsubst $(SRC_DIR)/%.scad, $(IMG_DIR)/%.png, $(SOURCES))
all: default images
calibration:
openscad -m make -o calibration.stl calibration.scad
default: $(TARGETS)
$(STL_DIR)/%.stl: $(SRC_DIR)/%.scad
$(OPENSCAD_APP) -m make -o $@ $<
$(STLSORT) $@ || :
images: $(IMAGES)
$(IMG_DIR)/%.png: $(SRC_DIR)/%.scad
$(OPENSCAD_APP) -m make --render -o $@ $<
arrange: default
$(SIMARRANGE) -x $(PLATE_DIMMENSIONS) -y $(PLATE_DIMMENSIONS) $(ARRANGE_TARGETS)
clean:
rm -f calibration.stl
rm -f $(STL_DIR)/*.stl
rm -f $(IMG_DIR)/*.png