chiark / gitweb /
curveopt: wip, demos more of the same bug
[moebius3.git] / Makefile
1
2 all: moebius-core.scad moebius-mesh.scad
3
4 PLAY = /home/reprap/play
5 USING_AUTOS = moebius
6
7 COPTIMISE = -O2
8 CDEBUG = -g
9 CWARNINGS = -Wall -Wwrite-strings -Wshadow -Wextra -Wno-unused-parameter
10 CFLAGS = $(COPTIMISE) $(CWARNINGS) $(CDEBUG)
11
12 $(shell set -xe; $(PLAY)/commitid.scad.pl >commitid.scad.tmp; cmp commitid.scad.tmp commitid.scad || mv -f commitid.scad.tmp commitid.scad )
13
14 PYLIBS = $(shell echo *.py)
15
16 moebius-core.scad: genscad $(PYLIBS)
17                 ./$< >$@.tmp && mv -f $@.tmp $@
18
19 moebius-mesh.scad: meshscad $(PYLIBS)
20                 ./$< >$@.tmp && mv -f $@.tmp $@
21
22 AUTO_TOPLEVELS := $(foreach m,$(USING_AUTOS),$(shell $(PLAY)/toplevel-find $m))
23
24 symbolic.c:     gensymbolic symbolic.py
25                 ./gensymbolic -q >$@.tmp && mv -f $@.tmp $@
26
27 findcurve.o:    findcurve.c symbolic.c
28
29 GSL_LIBS := $(shell pkg-config --libs gsl)
30
31 findcurve:      findcurve.o $(GSL_LIBS)
32
33 autoincs:       $(AUTO_INCS)
34 scads:          $(addsuffix .auto.scad, $(AUTO_TOPLEVELS))
35 stls:           $(addsuffix .auto.stl, $(AUTO_TOPLEVELS))
36
37 %.auto.scads: %.scad
38         $(MAKE) $(addsuffix .auto.scad, $(shell $(PLAY)/toplevel-find $*))
39 %.auto.stls:
40         $(MAKE) $(addsuffix .auto.stl, $(shell $(PLAY)/toplevel-find $*))
41
42 .PRECIOUS: %.auto.scad
43 %.auto.scad: $(PLAY)/toplevel-make Makefile $(PLAY)/toplevel-find
44                 @echo ' write $@'
45                 $< $@ >$@.tmp
46                 @mv -f $@.tmp $@
47
48 .PRECIOUS:      %.stl %.gcode %.eps %.dxf
49