Makefiles are good

This commit is contained in:
XANTRONIX 2023-11-25 13:36:25 -05:00
parent 1a2199793c
commit 203fdb99ed
2 changed files with 22 additions and 2 deletions

22
case/Makefile Normal file
View file

@ -0,0 +1,22 @@
SCAD_MODELS = top-keyboard.scad top-outline.scad
SCAD_INCLUDE = params.scad
STL_MODELS = top-keyboard.stl
STL_MODEL_PARAM = top-keyboard.json
OPENSCAD = /usr/bin/openscad
all: $(SCAD_MODELS) $(STL_MODELS)
top-keyboard.scad: SCAD_INPUT = top.scad
top-outline.scad: SCAD_INPUT = outline.scad
top-outline.scad: outline.scad
$(SCAD_MODELS):
cat $(SCAD_INCLUDE) $(SCAD_INPUT) > $@
$(STL_MODELS): %.stl: %.scad
$(OPENSCAD) $< -o $@
clean:
$(RM) $(SCAD_MODELS) $(STL_MODELS)

View file

@ -1,7 +1,5 @@
$fn = 72; $fn = 72;
include <dimensions.scad>
translate([case_length_bottom, 0, 0]) translate([case_length_bottom, 0, 0])
rotate([0, 0, 90]) rotate([0, 0, 90])
intersection() { intersection() {